Skip to content

fix(conversation): resync session status on WS reconnect - #433

Open
RonenMars wants to merge 1 commit into
mainfrom
fix/thinking-bubble-status-resync
Open

fix(conversation): resync session status on WS reconnect#433
RonenMars wants to merge 1 commit into
mainfrom
fix/thinking-bubble-status-resync

Conversation

@RonenMars

Copy link
Copy Markdown
Owner

Summary

The chat view's "thinking" indicator (ThinkingBubble) is gated on session.status, which is only ever updated by a live session_update WebSocket push.
If the app is backgrounded (socket suspended) right when the server emits the completion event, that frame is lost and never replayed.
Reconnecting re-authenticates the socket but never re-syncs session status, so the thinking bubble can get stuck visible indefinitely even though the response finished long ago.

This adds a wsManager.onStatusChange listener that invalidates the cached session-status query on every WS reconnect, so a missed status flip gets picked up as soon as the socket comes back.

Test plan

  • Added a regression test asserting the reconnect listener is wired up in LiveConversationView
  • npx jest __tests__/integration/components/LiveConversationView.test.tsx — 5/5 passing
  • tsc --noEmit clean for the changed files

session_update is a fire-once push; one lost while backgrounded
strands the thinking bubble indefinitely since reconnect never
replays it or refetches status.
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.

1 participant