Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

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

@ammar-agent ammar-agent force-pushed the fix/onchat-subscription-retry branch from 2025982 to 211af7b Compare December 20, 2025 19:53
@ammario ammario merged commit 32a9d27 into main Dec 20, 2025
20 checks passed
@ammario ammario deleted the fix/onchat-subscription-retry branch December 20, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants