forked from molecule-ai/molecule-core
Adds a live/reconnecting/offline pill to the Toolbar so users can see
at a glance whether the canvas is receiving real-time updates.
Changes:
- canvas/src/store/canvas.ts: add wsStatus ('connected'|'connecting'|
'disconnected') field + setWsStatus action to CanvasState (initial:
'connecting')
- canvas/src/store/socket.ts: wire setWsStatus into ReconnectingSocket —
'connecting' on connect() call, 'connected' in onopen, 'connecting'
in onclose (will reconnect), 'disconnected' in disconnect()
- canvas/src/components/Toolbar.tsx: subscribe to wsStatus; render
WsStatusPill (green "Live" / amber pulsing "Reconnecting" / red
"Offline") after the workspace count section
- canvas/src/store/__tests__/socket.test.ts: add setWsStatus: vi.fn()
to the canvas store mock (global factory, beforeEach reset, and the
mid-test override in the onmessage test)
369/369 canvas tests passing, production build clean.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| __tests__ | ||
| canvas | ||
| settings | ||
| tabs | ||
| ui | ||
| ApprovalBanner.tsx | ||
| BundleDropZone.tsx | ||
| Canvas.tsx | ||
| CommunicationOverlay.tsx | ||
| ConfirmDialog.tsx | ||
| ContextMenu.tsx | ||
| ConversationTraceModal.tsx | ||
| CreateWorkspaceDialog.tsx | ||
| EmptyState.tsx | ||
| ErrorBoundary.tsx | ||
| Legend.tsx | ||
| MissingKeysModal.tsx | ||
| OnboardingWizard.tsx | ||
| ProvisioningTimeout.tsx | ||
| SearchDialog.tsx | ||
| SidePanel.tsx | ||
| StatusDot.tsx | ||
| TemplatePalette.tsx | ||
| Toaster.tsx | ||
| Toolbar.tsx | ||
| Tooltip.tsx | ||
| WorkspaceNode.tsx | ||