Repository navigation
fix(console): a screen run finished from Flow Runs no longer reads as paused - #34085
Merged
Merged
Conversation
… paused The Test Run panel kept the trigger's paused answer after the runner completed the run, so it still said "Waiting for input" and offered a "Continue run" that resumed a run the server no longer holds. On completion the panel now re-reads the run and shows it as the result. Claude-Session: https://claude.ai/code/session_01ADHkmSmRojhM8vYjHkVSeg Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmSmRojhM8vYjHkVSeg Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi 维护者速读
席位意见:ACCEPT。完成后重读运行而非沿用触发时的暂停回答,并用代次防止旧回答覆盖新面板,修法到位。 席位核对 — ACCEPT · domain:ui#2 · head
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steve · project thread
Fixes #33856
Clause-②: no
Metadata-protocol: none
Claim by
domain:ui#2(comment 6898241442), card-thread sessionsession_01ADHkmSmRojhM8vYjHkVSeg.维护者速读
automation.getRun),把它当作结果显示(绿色「Result」、最终状态与耗时),不再显示「Waiting for input」和「Continue run」。RUN_NOT_FOUND。FlowRunsPage.tsx的完成回调(加一次运行读取和一个代次守卫,防止旧读取覆盖新一次运行);用户手动关掉对话框、运行仍暂停时的「Continue run」不变。回滚即 revert。ui/apps/console/src/pages/developer/FlowRunsPage.tsx(handleComplete),FlowRunsPage.test.tsx末尾新增的 describe。pnpm --dir ui exec vitest run apps/console/src/pages/developer/FlowRunsPage.test.tsx,预期 4 passed;把onComplete={handleComplete}换回旧的内联回调,新用例转红。What changes
ui/apps/console/src/pages/developer/FlowRunsPage.tsx(FlowTestRunner):FlowRunner'sonCompletenow runshandleComplete. It closes the runner, clears the trigger answer held inresult(the paused envelope, whose screen the server no longer holds), refreshes the run list as before, then reads the run back withclient.automation.getRun(flow.name, runId)and shows the stored run as the result. The panel header then takes its status branch from the run row (completedreads green "Result"), and the "Continue run" affordance, which needsstatus === 'paused'plus ascreen, is gone.FlowRunner'sonCompletetakes no arguments, so the resume answer the runner received is not reachable from this file; reading the run back is the in-surface route (card reading kept on the card, 6895948571).automation.getRungets the page's existing "… is not available on this client" panel error; a failed read shows its message. A ref counter, bumped by every new run and by a flow switch, drops a read that lands after the tester has moved on.onClose) keeps the paused answer and its "Continue run".Tests
ui/apps/console/src/pages/developer/FlowRunsPage.test.tsx, new top-level describe in the existing harness: run the screen flow, submit the screen, then assertgetRun('reassign_wizard', 'run_1')was called, the header reads "Result", the shown run says"status": "completed", and neither "Waiting for input", "This run is paused at screen", nor a "Continue run" button remain.getRunthat answers a completed run row, cleared inbeforeEach.Readings (head 6c401b3)
pnpm --dir ui exec vitest run apps/console/src/pages/developer/FlowRunsPage.test.tsxunder the verify lock: Test Files 1 passed, Tests 4 passed, VERDICT command-exit 0 (afterpnpm --filter '@object-ui/console^...' build, also exit 0).scripts/ablation-replace.mjs(fix committed first): anchoronComplete={handleComplete}replaced by the old inlineonComplete(anchor 1 to 0, blob 8c147b87 to 19a1de0d). The new test went red ("expected vi.fn() to be called with arguments: [ 'reassign_wizard', 'run_1' ]"), 1 failed and 3 passed; restored, blob equals HEAD,git diff HEADempty. The page source is imported fromsrcby the test, so no rebuild leg applies.pnpm --filter @object-ui/console run type-check: exit 0. The console tsc program does not listFlowRunsPage.test.tsx(--listFilescount 0), so this covers the page, not the test.node scripts/pm/dispatch-gates.mjs --commands: 36 commands, each run, each exit 0;--ranreconciliation: 36 derived, 36 run, 0 NOT-MEASURED. Alsopnpm check:changeset-fixed(its roster is under.changeset): exit 0.Acceptance notes
resultshape can followonClosein two cases. (1) A run that endsrefusedshows the refusal in the runner, which never callsonComplete; closing it leaves the paused answer, so "Continue run" would return for a terminal run. (2) A multi-step wizard dismissed at step 2 keeps step 1's screen inresult, so "Continue run" would reopen step 1. Both needFlowRunnerto tell its host where the run ended (a run row has noscreento re-read), which is@object-ui/app-shell, not this page. Carrier: the seat.Verification
Changeset:
.changeset/33856-flow-runs-completed-run.md,@object-ui/consolepatch.Generated by Claude Code