Skip to content

fix: improve WS event delivery and add breakpoint node glow#70

Merged
cristipufu merged 1 commit intomainfrom
fix/ws-event-delivery-and-breakpoint-glow
Feb 17, 2026
Merged

fix: improve WS event delivery and add breakpoint node glow#70
cristipufu merged 1 commit intomainfrom
fix/ws-event-delivery-and-breakpoint-glow

Conversation

@cristipufu
Copy link
Member

Summary

  • Serialize WebSocket sends per connection using an asyncio Queue + consumer task, preventing concurrent send_json calls on the same socket that could corrupt frames or silently fail
  • Remove redundant run.updated broadcasts from handle_trace and handle_log — each trace/log was triggering both its own event AND a full run.updated, doubling message volume for fast scripts
  • Conditional REST refetch on terminal status — when a run completes/fails, only refetch via REST if the store's trace/log counts don't match the run summary (recovers any missed WS events without causing canvas flicker)
  • Isolate WS handler errors — wrap each handler in its own try-catch so one failure doesn't swallow the message for all handlers
  • Red pulsing glow for breakpoint-hit nodesisPausedHere nodes now use var(--error) border + node-pulse-red animation, matching the green pulse on executing nodes

Test plan

  • Run a fast script (no I/O, completes in <100ms) and verify all traces/spans appear without needing a page refresh
  • Run a slower script and verify real-time trace streaming still works
  • Set a breakpoint and verify the paused node has a red pulsing glow
  • Verify executing nodes still show green pulsing glow
  • Verify no canvas flicker when a run completes

🤖 Generated with Claude Code

…glow

- Serialize WebSocket sends per connection using asyncio Queue + consumer
  task, preventing concurrent sends on the same socket
- Remove redundant run.updated broadcasts from handle_trace/handle_log
  (halves message volume for fast scripts)
- Add conditional REST refetch when run reaches terminal status only if
  trace/log counts don't match (recovers missed events without flicker)
- Isolate per-handler errors in WS client to prevent one failure from
  dropping the message for all handlers
- Add red pulsing glow (node-pulse-red) for breakpoint-hit nodes,
  matching the green pulse used for executing nodes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cristipufu cristipufu merged commit 93774b9 into main Feb 17, 2026
11 checks passed
@cristipufu cristipufu deleted the fix/ws-event-delivery-and-breakpoint-glow branch February 17, 2026 09:59
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