Commit 32a9d27
authored
🤖 fix: retry workspace onChat subscription after disconnect (#1233)
Fixes a class of "UI got stuck" issues when the renderer misses
workspace chat events (e.g. compaction delete/rewrite) and only catches
up after a restart.
### What changed
- Make the renderer's `workspace.onChat` subscription resilient: if the
async iterator ends or errors unexpectedly, automatically resubscribe
with backoff.
- Before resubscribing, clear derived per-workspace chat state so the
replay rebuilds from the backend source of truth (prevents stale
messages from persisting in-memory).
### Why
If the UI misses the compaction delete + summary replay, it may still
show the old `/compact` message. Editing that message then fails
server-side because the message ID no longer exists in persisted
history.
### Validation
- `bun test src/browser/stores/WorkspaceStore.test.ts`
- `make typecheck`
- `make static-check`
---
_Generated with `mux` • Model: `openai:gpt-5.2` • Thinking: `medium`_1 parent 3e8410d commit 32a9d27
1 file changed
+232
-116
lines changed
0 commit comments