You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix per-workspace settings not reloading on sync (v1.0.7)
When `.shockwave/workspace.json` changed on disk (GitHub sync pull,
another machine, hand edit), the live app never picked up the new
daily-note / templates / builtin-skill config, and synced bookmarks
could be silently dropped. Three distinct bugs:
1. Watcher never fired (root cause). `bookmarksWatcher` watched the
single file `workspace.json`. In chokidar 5 a single-file watch
unreliably drops the change — a `git merge` (what sync runs) fired
zero events, so the renderer was never told the file changed. Now
watch the `.shockwave/` dir (depth 0) and filter to `workspace.json`,
which fires reliably.
2. Narrow reload. Even when the event did fire, the renderer re-read
only `bookmarks`, never dailyNote/templates/builtinSkills. The
external-change handler now does a full `workspaceSettings.read()` +
`loadWorkspaceData()`.
3. Destructive prune. The bookmark re-read pruned against a possibly
stale file tree and wrote the pruned set back to disk, which sync
then pushed — deleting a just-synced bookmark everywhere. External
changes now use `replaceBookmarks()` (in-memory, no prune/write-back);
pruning still happens on full workspace load against fresh data.
Adds `tests/workspaceWatcher.test.js`: real git repo + real `git merge`
with main's exact chokidar config, asserting the dir watch notifies once
for workspace.json and never for sibling files. Guards against
regressing to single-file watching.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>