2.6 KiB
2.6 KiB
Journal - OpenCode (Part 1)
AI development session journal Started: 2026-04-18
Session 1: Finish Windows desktop integrations
Date: 2026-04-18
Task: Finish Windows desktop integrations
Branch: master
Summary
Completed the Windows-focused desktop integration pass for ocswitch desktop by fixing the Wails bridge path, adding native tray controls, wiring desktop notifications, implementing Windows launch-at-login, and fixing cross-platform file locking that previously blocked Windows builds.
Main Changes
| Area | Description |
|---|---|
| Wails bridge | Corrected frontend bridge detection and access from window.go.main.App to window.go.desktop.App. |
| Tray | Added Wails-only native tray integration via github.com/getlantern/systray with open/hide/start/stop/quit actions and proxy status display. |
| Notifications | Hooked desktop preference state to Wails runtime notifications for proxy start/stop, sync apply, and notification enablement. |
| Launch at login | Added Windows Startup-folder .cmd launcher generation while preserving existing Linux XDG autostart flow. |
| Windows compatibility | Replaced direct syscall.Flock usage with platform-specific file locking helpers and aligned config tests with cross-platform lock helpers. |
| Task docs | Added implementation PRD for .trellis/tasks/04-18-windows-desktop-integrations/. |
Updated Files:
.trellis/tasks/04-18-windows-desktop-integrations/prd.md.trellis/tasks/04-18-windows-desktop-integrations/task.json.trellis/workspace/OpenCode/journal-1.mdinternal/desktop/app.gointernal/desktop/tray.gointernal/desktop/tray_wails.gointernal/desktop/notify.gointernal/desktop/autostart.gointernal/desktop/autostart_test.gointernal/desktop/runtime_wails.gointernal/desktop/runtime_fallback.gointernal/fileutil/fileutil.gointernal/fileutil/lock_unix.gointernal/fileutil/lock_windows.gointernal/config/config_test.gointernal/config/file_lock_testhelper_unix_test.gointernal/config/file_lock_testhelper_windows_test.gofrontend/index.htmlfrontend/src/api.tsfrontend/src/env.d.tsfrontend/tsconfig.json
Git Commits
(No commits - implementation left in worktree)
Testing
- [OK]
npm run build(infrontend/) - [OK]
go test ./internal/desktop - [OK]
go test -tags desktop_wails ./internal/desktop - [OK]
go test ./internal/config ./internal/opencode
Status
[OK] Completed
Next Steps
- If needed, run a full desktop binary build path (
wails buildor Windows packaging) on a machine with final packaging prerequisites.