Skip to content

Fix live execution reconnects after dashboard navigation#388

Merged
mbakgun merged 2 commits into
mainfrom
agent/fix-live-execution-reconnect
Jul 20, 2026
Merged

Fix live execution reconnects after dashboard navigation#388
mbakgun merged 2 commits into
mainfrom
agent/fix-live-execution-reconnect

Conversation

@mbakgun

@mbakgun mbakgun commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Preserve the owning workflow/execution state when an in-progress canvas run navigates through the dashboard and returns via History → Open live.
  • Keep completed node results and runtime node status available when the same workflow canvas reloads.
  • Send SSE heartbeat comments from the live execution observer during long-running idle nodes.
  • Retry the live observer after transient stream disconnects, replaying the latest snapshot and falling back to persisted history on completion.
  • Extend Playwright coverage for the exact canvas → dashboard → History → live canvas flow and add a backend heartbeat regression test.

Root cause

Leaving the editor cleared currentExecutionId while the original execution stream and abort controller remained active. Returning through Open live started a second observer and aborted the original stream, which could cancel or orphan the request-owned execution lifecycle. The observer stream also emitted no idle heartbeat and treated a dropped connection as terminal.

Impact

Long-running nodes continue to advance and finalize on the canvas after dashboard navigation. Live observers remain connected through idle periods and recover from transient SSE disconnects.

Validation

  • SECRET_KEY=test-secret-key-for-tests-only-32-bytes ./check.sh — 2,296 backend tests plus frontend lint/typecheck passed.
  • ./run_e2e.sh e2e/execution-deep-link.spec.ts --grep "keeps a canvas run live" — passed.
  • ./run_e2e.sh e2e/execution-deep-link.spec.ts --grep "opens one running execution live" — passed.

@mbakgun
mbakgun marked this pull request as ready for review July 20, 2026 19:45
@mbakgun
mbakgun enabled auto-merge July 20, 2026 19:50
@mbakgun
mbakgun merged commit e356609 into main Jul 20, 2026
2 checks passed
@mbakgun
mbakgun deleted the agent/fix-live-execution-reconnect branch July 20, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant