Bug Description
When a file is modified manually (via VSCode or another editor outside of OpenCode), the "Changes" panel in the desktop app does not update automatically. The user has to perform an action in the app (like moving the cursor or switching sessions) to see the changes.
Root Cause
The file watcher system uses SSE events to notify the frontend when a file changes (file.watcher.updated → refreshVcs() ). However, in the desktop app, these SSE events may not arrive reliably, causing the Changes panel to become stale.
Expected Behavior
The Changes panel should automatically refresh within a few seconds when a file is modified externally.
Environment
- OpenCode Desktop app (electron)
- File watcher enabled
Bug Description
When a file is modified manually (via VSCode or another editor outside of OpenCode), the "Changes" panel in the desktop app does not update automatically. The user has to perform an action in the app (like moving the cursor or switching sessions) to see the changes.
Root Cause
The file watcher system uses SSE events to notify the frontend when a file changes (
file.watcher.updated→refreshVcs()). However, in the desktop app, these SSE events may not arrive reliably, causing the Changes panel to become stale.Expected Behavior
The Changes panel should automatically refresh within a few seconds when a file is modified externally.
Environment