Skip to content

Commit 9dfd953

Browse files
author
Connor Byrne
committed
fix(first-run-tour): disarm the acceptance deadline on any reported status
`resetExecutionState` drops a job from `queuedJobs` without clearing its workflow status, so `tourRunAccepted` can read false while the run reports `running`. Watchers batch, so an accept-then-reset inside one tick is never observed and the deadline stays armed against a live run. Acceptance and status now both disarm it. A refused submission produces neither, so #14619 stays caught. Addresses review feedback: #15091 (comment)
1 parent 8ee79b8 commit 9dfd953

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/renderer/extensions/firstRunTour/tour/useFirstRunTourController.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ function useFirstRunTourControllerInternal() {
7474
executionErrorStore.hasNodeError || executionErrorStore.hasPromptError
7575
],
7676
([status, refused], previous) => {
77+
if (status !== undefined) stopAcceptDeadline()
7778
if (status === 'running') runState.value = 'generating'
7879
else if (status === 'completed') runState.value = 'succeeded'
7980
else if (status === 'failed') runState.value = 'failed'
@@ -113,6 +114,10 @@ function useFirstRunTourControllerInternal() {
113114
* queuePrompt response rather than the socket, so this cannot pre-empt the
114115
* longer offline grace: a run accepted at all disarms this immediately and
115116
* leaves the connection question to `OFFLINE_GRACE_MS`.
117+
*
118+
* Acceptance is not the only disarm. `resetExecutionState` drops a job from
119+
* `queuedJobs` without clearing its status, so a run can report a status
120+
* while this reads false. A refusal produces neither signal.
116121
*/
117122
watch(tourRunAccepted, (accepted) => {
118123
if (accepted) stopAcceptDeadline()

0 commit comments

Comments
 (0)