Commit 572302b
fix(workspace): heal browser/server active-workspace split-brain on every load
The server's active workspace is in-memory per process, so every stack
restart silently resets it to the alphabetical default while the
browser keeps its localStorage pick. loadWorkspaces only re-asserted
the pick to the server when the BROWSER's own value changed — a
persisted pick that still exists was kept locally without ever telling
the server, leaving the shell showing one tenant while domain services
scoped to another (surfaced today by the didi sign-in reloads and a
stack restart: browser said reach-edu, every backend said humain-vc).
Now the browser re-asserts whenever the server disagrees, making the
operator's persisted pick authoritative and converging the whole stack
on every page load. Workspace package typecheck clean.
Files changed:
- packages/workspace/src/state.svelte.ts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent ebf1339 commit 572302b
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
129 | 138 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
| |||
0 commit comments