Skip to content

fix: persist spinner state so a reconnecting client sees it correctly - #57

Open
ericgozzi wants to merge 3 commits into
mainfrom
fix/spinner-persistence
Open

ericgozzi wants to merge 3 commits into
mainfrom
fix/spinner-persistence

Conversation

@ericgozzi

@ericgozzi ericgozzi commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Spinner visibility is state, not a one-off notification, but Outbox.send_dict skipped persisting "spinner" messages the same way it skips "ui" toasts. If a client's WebSocket dropped mid-load and reconnected, it never got the "stop" and showed the spinner forever.
  • Spinner messages are now persisted. Workspace.start_spinner/stop_spinner pass a stable obj_id="spinner", so each call overwrites one persisted slot instead of adding history entries that a reconnect could replay out of order.

First PR in a stack of fixes: this one → #58 (WebSocket max frame size) → #59 (scale-mode object_transform).

Test plan

  • pytest (new tests/test_spinner_persistence.py)

🤖 Generated with Claude Code

ericgozzi and others added 3 commits September 18, 2026 11:20
Outbox.send_dict previously excluded "spinner" messages from persistence
alongside one-off "ui" toasts. But spinner visibility is a *state* (like
camera position or background color), not a one-shot notification: if a
client's WebSocket connection drops mid-load and reconnects, it needs to
see the CURRENT spinner state, not silently miss the "stop" it never
received while disconnected and get stuck showing a spinner forever.

Workspace.start_spinner/stop_spinner now also pass a stable obj_id="spinner"
so each call overwrites the same persisted slot instead of piling up as
separate history entries a reconnect could replay out of order.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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