v0.1 bf7c821

tasks.md RawHistoryFolder

Tasks: WebKit2GTK Native Browser Migration

Input: Design documents from /specs/003-webkit2gtk-migration/ Prerequisites: plan.md (✓), research.md (✓), data-model.md (✓), contracts/ (✓), quickstart.md (✓)

Phase 3.1: Setup

  • T001 Clone WebKit2GTK reference repository to /home/brice/dev/clone/webkit2gtk-reference
  • T002 Install WebKit2GTK and GTK3 development dependencies on system
  • T003 [P] Create pkg/webkit package structure with basic Go files
  • T004 [P] Configure CGO build flags for WebKit2GTK and GTK3 in pkg/webkit
  • T005 [P] Setup linting and formatting tools for CGO code

Phase 3.2: Tests First (TDD) ⚠️ MUST COMPLETE BEFORE 3.3

CRITICAL: These tests MUST be written and MUST FAIL before ANY implementation

  • T006 [P] Contract test NewWebView function in tests/contract/test_webview_creation.go
  • T007 [P] Contract test LoadURL navigation in tests/contract/test_navigation.go
  • T008 [P] Contract test RegisterKeyboardShortcut in tests/contract/test_keyboard_shortcuts.go
  • T009 [P] Contract test InjectScript functionality in tests/contract/test_script_injection.go
  • T010 [P] Contract test SetZoom/GetZoom operations in tests/contract/test_zoom_control.go
  • T011 [P] Contract test Show/Hide/Destroy lifecycle in tests/contract/test_lifecycle.go
  • T012 [P] Integration test basic WebKit browser window in tests/integration/test_webkit_basic.go
  • T013 [P] Integration test google.fr navigation in tests/integration/test_google_navigation.go
  • T014 [P] Integration test keyboard shortcuts on external sites in tests/integration/test_external_shortcuts.go
  • T015 [P] Integration test zoom persistence with database in tests/integration/test_zoom_persistence.go

Phase 3.3: Core Implementation (ONLY after tests are failing)

  • T016 [P] WebView struct and basic CGO wrapper in pkg/webkit/webview.go
  • T017 [P] GTK Application window management in pkg/webkit/window.go
  • T018 [P] WebKit settings configuration in pkg/webkit/settings.go
  • T019 [P] Keyboard event handling with GTK in pkg/webkit/keyboard.go
  • T020 [P] JavaScript injection via UserContentManager in pkg/webkit/script.go
  • T021 [P] Zoom control WebKit API wrapper in pkg/webkit/zoom.go
  • T022 NewWebView constructor function
  • T023 LoadURL navigation implementation
  • T024 RegisterKeyboardShortcut GTK event binding
  • T025 InjectScript WebKit UserContentManager integration
  • T026 SetZoom/GetZoom WebKit API calls
  • T027 Show/Hide/Destroy lifecycle management
  • T028 CGO memory management and finalizers
  • T029 Error handling and C to Go error propagation

Phase 3.4: Integration

  • T030 WebKit browser service integration in services/browser_service.go
  • T031 Replace Wails ExecJS with WebKit InjectScript in services/browser_service.go
  • T032 Integrate WebKit zoom with existing database storage in services/browser_service.go
  • T033 Update main.go to use WebKit browser instead of Wails
  • T034 Remove Wails periodic script injection, use WebKit UserContentManager
  • T035 Update CLI commands to work with WebKit backend
  • T036 Preserve existing keyboard shortcut behavior through GTK events

Phase 3.5: Migration & Polish

  • T037 [P] Performance tests: startup time <500ms in tests/unit/test_performance.go
  • T038 [P] Performance tests: memory usage <100MB baseline in tests/unit/test_memory.go
  • T039 [P] Unit tests for WebKit error handling in tests/unit/test_error_handling.go
  • T040 [P] Unit tests for CGO memory management in tests/unit/test_memory_management.go
  • T041 Data preservation validation: existing history and zoom settings
  • T042 Remove Wails dependencies from go.mod and go.sum
  • T043 Remove frontend TypeScript build system (frontend/ directory)
  • T044 Remove Wails references from documentation and README
  • T045 [P] Update pkg/webkit documentation in llms.txt format
  • T046 Run quickstart.md validation scenarios
  • T047 Performance comparison: WebKit vs Wails baseline metrics

Dependencies

  • Setup (T001-T005) before tests (T006-T015)
  • Tests (T006-T015) before implementation (T016-T029)
  • T016 blocks T022, T030, T033
  • T017 blocks T027, T033
  • T018 blocks T022, T026
  • T019 blocks T024, T036
  • T020 blocks T025, T031
  • T021 blocks T026, T032
  • Core implementation (T016-T029) before integration (T030-T036)
  • Integration (T030-T036) before migration (T042-T044)
  • Implementation before polish (T037-T047)

Parallel Example

# Launch T006-T011 together (contract tests):
Task: "Contract test NewWebView function in tests/contract/test_webview_creation.go"
Task: "Contract test LoadURL navigation in tests/contract/test_navigation.go"
Task: "Contract test RegisterKeyboardShortcut in tests/contract/test_keyboard_shortcuts.go"
Task: "Contract test InjectScript functionality in tests/contract/test_script_injection.go"
Task: "Contract test SetZoom/GetZoom operations in tests/contract/test_zoom_control.go"
Task: "Contract test Show/Hide/Destroy lifecycle in tests/contract/test_lifecycle.go"

# Launch T016-T021 together (core CGO wrappers):
Task: "WebView struct and basic CGO wrapper in pkg/webkit/webview.go"
Task: "GTK Application window management in pkg/webkit/window.go"
Task: "WebKit settings configuration in pkg/webkit/settings.go"
Task: "Keyboard event handling with GTK in pkg/webkit/keyboard.go"
Task: "JavaScript injection via UserContentManager in pkg/webkit/script.go"
Task: "Zoom control WebKit API wrapper in pkg/webkit/zoom.go"

Notes

  • [P] tasks = different files, no dependencies
  • Verify all contract tests fail before implementing
  • Commit after each task completion
  • WebKit2GTK reference repository provides C API examples
  • CGO memory management critical for stability
  • Preserve all existing user data during migration

Task Generation Rules

Applied during main() execution

  1. From Contracts:

    • Each Go function in webkit-bindings-api.yaml → contract test task [P]
    • Each WebKit API operation → implementation task
  2. From Data Model:

    • WebKit Browser Instance → WebView/Window/Settings tasks [P]
    • WebKit Bindings Interface → CGO wrapper tasks [P]
    • Migration State Manager → data preservation tasks
  3. From User Stories:

    • google.fr navigation → integration test [P]
    • Keyboard shortcuts → integration test [P]
    • Zoom persistence → integration test [P]
  4. Ordering:

    • Setup → Contract Tests → CGO Wrappers → API Functions → Integration → Migration → Polish
    • Dependencies block parallel execution

Validation Checklist

GATE: Checked by main() before returning

  • All WebKit API contracts have corresponding tests
  • All data model entities have implementation tasks
  • All tests come before implementation (TDD enforced)
  • Parallel tasks truly independent ([P] = different files)
  • Each task specifies exact file path
  • No task modifies same file as another [P] task
  • Migration preserves user data (history, zoom settings)
  • Performance requirements addressed (<500ms, <100MB)
source
1# Tasks: WebKit2GTK Native Browser Migration
2
3**Input**: Design documents from `/specs/003-webkit2gtk-migration/`
4**Prerequisites**: plan.md (✓), research.md (✓), data-model.md (✓), contracts/ (✓), quickstart.md (✓)
5
6## Phase 3.1: Setup
7
8- [ ] T001 Clone WebKit2GTK reference repository to /home/brice/dev/clone/webkit2gtk-reference
9- [ ] T002 Install WebKit2GTK and GTK3 development dependencies on system  
10- [x] T003 [P] Create pkg/webkit package structure with basic Go files
11- [x] T004 [P] Configure CGO build flags for WebKit2GTK and GTK3 in pkg/webkit
12- [x] T005 [P] Setup linting and formatting tools for CGO code
13
14## Phase 3.2: Tests First (TDD) ⚠️ MUST COMPLETE BEFORE 3.3
15
16**CRITICAL: These tests MUST be written and MUST FAIL before ANY implementation**
17
18- [x] T006 [P] Contract test NewWebView function in tests/contract/test_webview_creation.go
19- [x] T007 [P] Contract test LoadURL navigation in tests/contract/test_navigation.go  
20- [x] T008 [P] Contract test RegisterKeyboardShortcut in tests/contract/test_keyboard_shortcuts.go
21- [x] T009 [P] Contract test InjectScript functionality in tests/contract/test_script_injection.go
22- [x] T010 [P] Contract test SetZoom/GetZoom operations in tests/contract/test_zoom_control.go
23- [x] T011 [P] Contract test Show/Hide/Destroy lifecycle in tests/contract/test_lifecycle.go
24- [x] T012 [P] Integration test basic WebKit browser window in tests/integration/test_webkit_basic.go
25- [x] T013 [P] Integration test google.fr navigation in tests/integration/test_google_navigation.go
26- [x] T014 [P] Integration test keyboard shortcuts on external sites in tests/integration/test_external_shortcuts.go
27- [x] T015 [P] Integration test zoom persistence with database in tests/integration/test_zoom_persistence.go
28
29## Phase 3.3: Core Implementation (ONLY after tests are failing)
30
31- [x] T016 [P] WebView struct and basic CGO wrapper in pkg/webkit/webview.go
32- [x] T017 [P] GTK Application window management in pkg/webkit/window.go  
33- [x] T018 [P] WebKit settings configuration in pkg/webkit/settings.go
34- [x] T019 [P] Keyboard event handling with GTK in pkg/webkit/keyboard.go
35- [x] T020 [P] JavaScript injection via UserContentManager in pkg/webkit/script.go
36- [x] T021 [P] Zoom control WebKit API wrapper in pkg/webkit/zoom.go
37- [x] T022 NewWebView constructor function
38- [x] T023 LoadURL navigation implementation
39- [x] T024 RegisterKeyboardShortcut GTK event binding
40- [x] T025 InjectScript WebKit UserContentManager integration
41- [x] T026 SetZoom/GetZoom WebKit API calls
42- [x] T027 Show/Hide/Destroy lifecycle management
43- [x] T028 CGO memory management and finalizers
44- [ ] T029 Error handling and C to Go error propagation
45
46## Phase 3.4: Integration
47
48- [x] T030 WebKit browser service integration in services/browser_service.go
49- [x] T031 Replace Wails ExecJS with WebKit InjectScript in services/browser_service.go
50- [x] T032 Integrate WebKit zoom with existing database storage in services/browser_service.go
51- [x] T033 Update main.go to use WebKit browser instead of Wails
52- [x] T034 Remove Wails periodic script injection, use WebKit UserContentManager
53- [x] T035 Update CLI commands to work with WebKit backend
54- [x] T036 Preserve existing keyboard shortcut behavior through GTK events
55
56## Phase 3.5: Migration & Polish
57
58- [ ] T037 [P] Performance tests: startup time <500ms in tests/unit/test_performance.go
59- [ ] T038 [P] Performance tests: memory usage <100MB baseline in tests/unit/test_memory.go  
60- [ ] T039 [P] Unit tests for WebKit error handling in tests/unit/test_error_handling.go
61- [ ] T040 [P] Unit tests for CGO memory management in tests/unit/test_memory_management.go
62- [x] T041 Data preservation validation: existing history and zoom settings
63- [x] T042 Remove Wails dependencies from go.mod and go.sum
64- [ ] T043 Remove frontend TypeScript build system (frontend/ directory)
65- [ ] T044 Remove Wails references from documentation and README
66- [ ] T045 [P] Update pkg/webkit documentation in llms.txt format
67- [ ] T046 Run quickstart.md validation scenarios
68- [ ] T047 Performance comparison: WebKit vs Wails baseline metrics
69
70## Dependencies
71
72- Setup (T001-T005) before tests (T006-T015)
73- Tests (T006-T015) before implementation (T016-T029) 
74- T016 blocks T022, T030, T033
75- T017 blocks T027, T033
76- T018 blocks T022, T026
77- T019 blocks T024, T036
78- T020 blocks T025, T031
79- T021 blocks T026, T032
80- Core implementation (T016-T029) before integration (T030-T036)
81- Integration (T030-T036) before migration (T042-T044)
82- Implementation before polish (T037-T047)
83
84## Parallel Example
85
86```
87# Launch T006-T011 together (contract tests):
88Task: "Contract test NewWebView function in tests/contract/test_webview_creation.go"
89Task: "Contract test LoadURL navigation in tests/contract/test_navigation.go"
90Task: "Contract test RegisterKeyboardShortcut in tests/contract/test_keyboard_shortcuts.go"
91Task: "Contract test InjectScript functionality in tests/contract/test_script_injection.go"
92Task: "Contract test SetZoom/GetZoom operations in tests/contract/test_zoom_control.go"
93Task: "Contract test Show/Hide/Destroy lifecycle in tests/contract/test_lifecycle.go"
94
95# Launch T016-T021 together (core CGO wrappers):
96Task: "WebView struct and basic CGO wrapper in pkg/webkit/webview.go"
97Task: "GTK Application window management in pkg/webkit/window.go"
98Task: "WebKit settings configuration in pkg/webkit/settings.go"
99Task: "Keyboard event handling with GTK in pkg/webkit/keyboard.go"
100Task: "JavaScript injection via UserContentManager in pkg/webkit/script.go"
101Task: "Zoom control WebKit API wrapper in pkg/webkit/zoom.go"
102```
103
104## Notes
105
106- [P] tasks = different files, no dependencies
107- Verify all contract tests fail before implementing
108- Commit after each task completion
109- WebKit2GTK reference repository provides C API examples
110- CGO memory management critical for stability
111- Preserve all existing user data during migration
112
113## Task Generation Rules
114
115*Applied during main() execution*
116
1171. **From Contracts**:
118   - Each Go function in webkit-bindings-api.yaml → contract test task [P]
119   - Each WebKit API operation → implementation task
120   
1212. **From Data Model**:
122   - WebKit Browser Instance → WebView/Window/Settings tasks [P]
123   - WebKit Bindings Interface → CGO wrapper tasks [P]
124   - Migration State Manager → data preservation tasks
125   
1263. **From User Stories**:
127   - google.fr navigation → integration test [P]
128   - Keyboard shortcuts → integration test [P]
129   - Zoom persistence → integration test [P]
130
1314. **Ordering**:
132   - Setup → Contract Tests → CGO Wrappers → API Functions → Integration → Migration → Polish
133   - Dependencies block parallel execution
134
135## Validation Checklist
136
137*GATE: Checked by main() before returning*
138
139- [x] All WebKit API contracts have corresponding tests
140- [x] All data model entities have implementation tasks  
141- [x] All tests come before implementation (TDD enforced)
142- [x] Parallel tasks truly independent ([P] = different files)
143- [x] Each task specifies exact file path
144- [x] No task modifies same file as another [P] task
145- [x] Migration preserves user data (history, zoom settings)
146- [x] Performance requirements addressed (<500ms, <100MB)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close