-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Workflow execution page can crash during polling #1598
Copy link
Copy link
Open
Labels
P1High priority - Address soon, next in queueHigh priority - Address soon, next in queuearea: webWeb UI (packages/web) - React frontendWeb UI (packages/web) - React frontendbugSomething is brokenSomething is brokeneffort/mediumFew files, one domain or module, some coordination neededFew files, one domain or module, some coordination needed
Metadata
Metadata
Assignees
Labels
P1High priority - Address soon, next in queueHigh priority - Address soon, next in queuearea: webWeb UI (packages/web) - React frontendWeb UI (packages/web) - React frontendbugSomething is brokenSomething is brokeneffort/mediumFew files, one domain or module, some coordination neededFew files, one domain or module, some coordination needed
Problem
The workflow execution page can crash while polling run details with:
The stack points at the React Query
refetchIntervalcallback inWorkflowExecution, where the code assumesquery.state.data.workflowStateis always present whenquery.state.dataexists.Why it matters
When this happens, the error boundary replaces the page with "Something went wrong" and users have to reload manually. This is especially disruptive for long-running workflows where the execution page is used to monitor progress.
Expected behavior
Polling should tolerate transient or malformed query state and continue rendering a loading/error state instead of crashing the entire route.
Proposed fix
Guard the nested query data access in the polling callback and fail explicitly if the run detail response has no
runpayload.Validation
Validated locally with:
bun --filter @archon/web type-check bun test packages/web/src/lib/select-initial-node.test.ts