diff --git a/.gitignore b/.gitignore index f57df8c..d16d1d5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ /dist/ *.tmp output +build/ frontend/dist/ frontend/node_modules/ diff --git a/.opencode/package.json b/.opencode/package.json index d36ee0c..67aa133 100644 --- a/.opencode/package.json +++ b/.opencode/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "@opencode-ai/plugin": "1.4.3" + "@opencode-ai/plugin": "1.4.6" } } \ No newline at end of file diff --git a/.trellis/tasks/04-18-04-18-finish-windows-desktop/task.json b/.trellis/tasks/04-18-04-18-finish-windows-desktop/task.json new file mode 100644 index 0000000..2538ac4 --- /dev/null +++ b/.trellis/tasks/04-18-04-18-finish-windows-desktop/task.json @@ -0,0 +1,53 @@ +{ + "id": "04-18-finish-windows-desktop", + "name": "04-18-finish-windows-desktop", + "title": "Finish Windows desktop integration", + "description": "", + "status": "planning", + "dev_type": null, + "scope": null, + "package": null, + "priority": "P2", + "creator": "OpenCode", + "assignee": "OpenCode", + "createdAt": "2026-04-18", + "completedAt": null, + "branch": null, + "base_branch": "master", + "worktree_path": null, + "current_phase": 0, + "next_action": [ + { + "phase": 1, + "action": "brainstorm" + }, + { + "phase": 2, + "action": "research" + }, + { + "phase": 3, + "action": "implement" + }, + { + "phase": 4, + "action": "check" + }, + { + "phase": 5, + "action": "update-spec" + }, + { + "phase": 6, + "action": "record-session" + } + ], + "commit": null, + "pr_url": null, + "subtasks": [], + "children": [], + "parent": null, + "relatedFiles": [], + "notes": "", + "meta": {} +} \ No newline at end of file diff --git a/.trellis/tasks/04-18-windows-desktop-integrations/task.json b/.trellis/tasks/04-18-windows-desktop-integrations/task.json index a85dbb0..72cb4de 100644 --- a/.trellis/tasks/04-18-windows-desktop-integrations/task.json +++ b/.trellis/tasks/04-18-windows-desktop-integrations/task.json @@ -12,7 +12,7 @@ "assignee": "OpenCode", "createdAt": "2026-04-18", "completedAt": "2026-04-18", - "branch": null, + "branch": "master", "base_branch": "master", "worktree_path": null, "current_phase": 6, @@ -42,7 +42,7 @@ "action": "record-session" } ], - "commit": null, + "commit": "5c4f60f", "pr_url": null, "subtasks": [], "children": [], diff --git a/.trellis/workspace/OpenCode/index.md b/.trellis/workspace/OpenCode/index.md new file mode 100644 index 0000000..077b956 --- /dev/null +++ b/.trellis/workspace/OpenCode/index.md @@ -0,0 +1,40 @@ +# Workspace Index - OpenCode + +> Journal tracking for AI development sessions. + +--- + +## Current Status + + +- **Active File**: `journal-1.md` +- **Total Sessions**: 0 +- **Last Active**: - + + +--- + +## Active Documents + + +| File | Lines | Status | +|------|-------|--------| +| `journal-1.md` | ~0 | Active | + + +--- + +## Session History + + +| # | Date | Title | Commits | Branch | +|---|------|-------|---------|--------| + + +--- + +## Notes + +- Sessions are appended to journal files +- New journal file created when current exceeds 2000 lines +- Use `add_session.py` to record sessions diff --git a/.trellis/workspace/OpenCode/journal-1.md b/.trellis/workspace/OpenCode/journal-1.md new file mode 100644 index 0000000..59b36c5 --- /dev/null +++ b/.trellis/workspace/OpenCode/journal-1.md @@ -0,0 +1,70 @@ +# 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.md` +- `internal/desktop/app.go` +- `internal/desktop/tray.go` +- `internal/desktop/tray_wails.go` +- `internal/desktop/notify.go` +- `internal/desktop/autostart.go` +- `internal/desktop/autostart_test.go` +- `internal/desktop/runtime_wails.go` +- `internal/desktop/runtime_fallback.go` +- `internal/fileutil/fileutil.go` +- `internal/fileutil/lock_unix.go` +- `internal/fileutil/lock_windows.go` +- `internal/config/config_test.go` +- `internal/config/file_lock_testhelper_unix_test.go` +- `internal/config/file_lock_testhelper_windows_test.go` +- `frontend/index.html` +- `frontend/src/api.ts` +- `frontend/src/env.d.ts` +- `frontend/tsconfig.json` + +### Git Commits + +(No commits - implementation left in worktree) + +### Testing + +- [OK] `npm run build` (in `frontend/`) +- [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 build` or Windows packaging) on a machine with final packaging prerequisites. +