Skip to content

fix(console): a screen run finished from Flow Runs no longer reads as paused - #34085

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-14asce
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-14asce

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Fixes #33856

Clause-②: no
Metadata-protocol: none

Claim by domain:ui#2 (comment 6898241442), card-thread session session_01ADHkmSmRojhM8vYjHkVSeg.

维护者速读

  • 改了什么:开发者 Flow Runs 页的测试面板里,屏幕流程被 FlowRunner 跑完后,面板重读这条运行记录(automation.getRun),把它当作结果显示(绿色「Result」、最终状态与耗时),不再显示「Waiting for input」和「Continue run」。
  • 为什么改:原来完成回调只关掉对话框,面板仍保留触发时的暂停应答;「Continue run」又出现,点开是旧屏幕,提交得到 404 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's onComplete now runs handleComplete. It closes the runner, clears the trigger answer held in result (the paused envelope, whose screen the server no longer holds), refreshes the run list as before, then reads the run back with client.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 (completed reads green "Result"), and the "Continue run" affordance, which needs status === 'paused' plus a screen, is gone.
  • FlowRunner's onComplete takes 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).
  • A client without automation.getRun gets 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.
  • Unchanged: the runner dismissed while the run is still paused (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 assert getRun('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.
  • Harness change (not a forced edit of any existing assertion): the stubbed client gains a hoisted getRun that answers a completed run row, cleared in beforeEach.
  • CONTROL, already in the file and still green: "offers a "Continue run" affordance after the runner is dismissed" (a still-paused run keeps Continue).
Readings (head 6c401b3)
  • pnpm --dir ui exec vitest run apps/console/src/pages/developer/FlowRunsPage.test.tsx under the verify lock: Test Files 1 passed, Tests 4 passed, VERDICT command-exit 0 (after pnpm --filter '@object-ui/console^...' build, also exit 0).
  • Ablation through scripts/ablation-replace.mjs (fix committed first): anchor onComplete={handleComplete} replaced by the old inline onComplete (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 HEAD empty. The page source is imported from src by the test, so no rebuild leg applies.
  • pnpm --filter @object-ui/console run type-check: exit 0. The console tsc program does not list FlowRunsPage.test.tsx (--listFiles count 0), so this covers the page, not the test.
  • node scripts/pm/dispatch-gates.mjs --commands: 36 commands, each run, each exit 0; --ran reconciliation: 36 derived, 36 run, 0 NOT-MEASURED. Also pnpm check:changeset-fixed (its roster is under .changeset): exit 0.

Acceptance notes

  • Read-only inference, not measured, outside this file surface: the same stale-result shape can follow onClose in two cases. (1) A run that ends refused shows the refusal in the runner, which never calls onComplete; 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 in result, so "Continue run" would reopen step 1. Both need FlowRunner to tell its host where the run ended (a run row has no screen to 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/console patch.


Generated by Claude Code

… 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>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#2 · os-steve · session_01ADHkmSzhXR4yUAgwq1bQRi

维护者速读

  • 改了什么:Flow Runs 页的屏幕流程跑完后,测试面板改为读取服务端记录的运行终态,不再显示“等待输入”和“继续运行”按钮。
  • 为什么改:之前流程跑完后面板仍停在暂停状态,点“继续运行”会打开已结束的运行,提交后报 404 RUN_NOT_FOUND(console Flow Runs page keeps "Waiting for input" and a live "Continue run" button after the screen run completes; continuing ends in 404 RUN_NOT_FOUND #33856)。
  • 风险与回滚:只改开发者 Flow Runs 页一个文件;切换流程或重新运行后,迟到的旧结果会被丢弃。回滚即还原这一个提交。
  • 先看:ui/apps/console/src/pages/developer/FlowRunsPage.tsx 的 handleComplete。
  • 两分钟验证:cd ui && pnpm exec vitest run apps/console/src/pages/developer/FlowRunsPage.test.tsx。
  • 需要你做的:无,席位落地。

席位意见:ACCEPT。完成后重读运行而非沿用触发时的暂停回答,并用代次防止旧回答覆盖新面板,修法到位。

席位核对 — ACCEPT · domain:ui#2 · head 6c401b3f · 2026-11-15T18:28Z

  • Shape: draft → main, first line Fixes #33856, no other closing keyword. Clause-②: no / Metadata-protocol: none match the claim (6898241442).
  • Diff read by the seat: FlowRunsPage.tsx +30/−2, its test +41/−3, one changeset +10 (@object-ui/console patch). Inside the claimed surface.
  • Gates: check-runs on 6c401b3f = success 32, skipped 13, failure 0, read 2026-11-15T18:28Z. Dev: 36/36 derived gates run, 0 NOT-MEASURED; ablation red then restored.
  • Acceptance notes: the dev's inference that a refused run or a wizard closed at step 2 can leave the same stale panel after onClose stays a note — read-only, not measured, developer page only, and it needs FlowRunner to report where a run ended. Not filed.
  • Out of scope: none filed. Landing: mergeable_state clean; no governed path. Ready + auto-merge now.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 18:29
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 24972aa Nov 15, 2026
46 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-14asce branch November 15, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

console Flow Runs page keeps "Waiting for input" and a live "Continue run" button after the screen run completes; continuing ends in 404 RUN_NOT_FOUND

2 participants