opencode-provider-switch/.trellis/workspace/OpenCode/journal-1.md
apale7 eb46fa3bd3
Some checks failed
release-please / release-please (push) Has been cancelled
chore: record journal
2026-04-20 03:47:07 +08:00

4.9 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.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.

Session 1: Desktop GUI i18n and UX refresh

Date: 2026-04-19 Task: Desktop GUI i18n and UX refresh Branch: master

Summary

Added desktop theme/language preferences across Go and frontend, rebuilt the app into a tabbed localized shell, refreshed CSS theming/layout, updated Wails desktop prefs models, and verified with npm run build plus go test ./internal/app ./internal/desktop.

Main Changes

(Add details)

Git Commits

(No commits - planning session)

Testing

  • [OK] (Add test results)

Status

[OK] Completed

Next Steps

  • None - task complete

Session 2: Proxy SSE minimal fix

Date: 2026-04-19 Task: Proxy SSE minimal fix Branch: master

Summary

Fixed empty-200 SSE failover and bypassed idle timeout after SSE start in the local Responses proxy; added targeted regression tests.

Main Changes

(Add details)

Git Commits

Hash Message
e4789d0 (see git log)

Testing

  • [OK] (Add test results)

Status

[OK] Completed

Next Steps

  • None - task complete

Session 3: Add WebView2 runtime note to README

Date: 2026-04-20 Task: Add WebView2 runtime note to README Branch: master

Summary

Updated README.md and README_EN.md with a Windows desktop runtime note covering single-file distribution and the fallback WebView2 installation link.

Main Changes

(Add details)

Git Commits

Hash Message
b00ee4c8dc2256a18dd155d5da619b48e0d722cc (see git log)

Testing

  • [OK] (Add test results)

Status

[OK] Completed

Next Steps

  • None - task complete

Session 4: Unify log and network layouts

Date: 2026-04-20 Task: Unify log and network layouts Branch: master

Summary

Refactored the desktop log and network pages to reuse the alias full-width card layout, removed the old narrow trace list styles, added the missing network count i18n key, and verified with frontend build plus a tracked-file secret scan before push.

Main Changes

(Add details)

Git Commits

Hash Message
a82754e (see git log)

Testing

  • [OK] (Add test results)

Status

[OK] Completed

Next Steps

  • None - task complete