Repository navigation
fix(console): following a result screen's record link closes the flow dialog - #36947
Merged
objectstack-fleet[bot] merged 2 commits intoNov 24, 2026
Merged
objectstack-fleet[bot] merged 2 commits into
objectstack-fleet[bot] merged 2 commits into
Conversation
…ow dialog on step one Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude <noreply@anthropic.com>
… dialog Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
Contributor
Author
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ Landing · 2026-11-24T10:53Z · head
|
| Probe | Reading |
|---|---|
check-governed-merges.mjs --pr 36947 |
NOT governed — 269 changed lines |
landing-k |
UI-only PR, no Test Core PRBASE; manual: 8 first-parent commits on main since the merge base (< 15), no shared book under this PR |
pr-state.mjs --pr 36947 |
38 success · 13 expected skip · 0 failed · 0 pending · mergeable_state clean |
| os-regen drift | 0 |
State: L1 ACCEPT at this head (above). pr_ready + auto-merge now; the seat follows it to MERGED and closes out #36849 there.
objectstack-fleet
Bot
deleted the
claude/issue-36849-result-link-closes-flow-dialog
branch
November 24, 2026 11:26
This was referenced Nov 24, 2026
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.
Fixes #36849
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Cause, reproduced on
origin/main(head4f19091997f, which already carries the lost-answer recovery). The record page that launches a screen flow (RecordDetailView) holds only the run's launch state, the step the run first paused on; every later step lives insideFlowRunner. Arecord_linkon the result screen is a routerLinkto another record, and the record page resets its loading flag on every object or record change (thesetIsLoading(true)effect keyed onobjectNameand the record id), which draws its skeleton through an early return. SoFlowRunnerunmounted with the page and came back from the host's launch state: step one, its inputs and a live Next. Pressing Next posted step one's values to a run already on its last screen, and the engine refused them withINVALID_SCREEN_INPUT. The recovery added for a lost resume answer does not cover this path: here no resume is in flight when the dialog falls back; the dialog is simply rebuilt from stale host state.Fix, at the link. Following a record link in the same window now ends the dialog before the route changes, through the same door as the dialog's close button:
ScreenViewtakes an optionalonRecordLinkFollowcallback and runs it from the record link'sLinkon a click the router itself navigates on (primary button, no modifier key, not already handled). A ctrl/cmd/shift/alt click opens the record elsewhere and leaves the dialog alone. The Studio preview passes nothing.FlowRunneranswers it withfollowRecordLink: the host is told to close at once (onClose), so the record page holds no run when it redraws. On a result screen (only record links, nothing after it) the run is then completed exactly as Done completes it: the empty resume, the completion toast,notifyDataChanged('*'),onComplete. On any other screen the link closes as Cancel does and resumes nothing. While a resume is in flight, or after one has failed, it only closes, as the close button does.The completing resume's answer now arrives after the dialog is gone, so a failure there is reported by its toast alone. The run stays suspended in that case, the same outcome as closing after a failed Done today.
Files to read first (by risk):
ui/packages/app-shell/src/views/FlowRunner.tsx:followRecordLink(besidedismiss), and the header section "Following a record link ends the dialog". The risky hunk is the order:onClose()first, thenvoid submit().ui/packages/app-shell/src/views/ScreenView.tsx:navigatesInPlaceand theonClickonRoutedRecordLink'sLink.ui/packages/app-shell/src/views/__tests__/FlowRunner.recordLink-25872.test.tsx: the new top-leveldescribeand itsRecordPageHost, a reduced record page with the same loading flash on route change.Tests
New top-level
describein the existing record-link harness,objectstack#36849. It mountsFlowRunnerunderRecordPageHostinside aMemoryRouterand drives HotCRM's quote wizard: step one declaresquoteName, the result screen only thequoteLinkrecord link.lands on the record with nothing on top, never on step one again: after the link, the quote page has no dialog, noQuote namebox and no Next. The resumes are[{ quoteName }, {}],onCompletefires once, one success toast and no error toast.a link on a step that still takes input closes the dialog as Cancel does, resuming nothing:onCloseonce, noonComplete, only step one's resume.a link opened in a new tab leaves the dialog where it is: a ctrl-click keeps the dialog and Done, and resumes nothing.Red without the fix, green with it
The fix was committed first (
8f7616989e4). For the red leg,FlowRunner.tsxandScreenView.tsxwere restored, tree only, from the test-only commit42b0b768bd4. On diskFlowRunner.tsxhashed2c374ce54e8, the42b0b768bd4blob (the same asorigin/main), andfollowRecordLinkoccurred 0 times. Thengit checkout HEAD --on both files; afterwardsFlowRunner.tsxhashed8fa5a6ed056, the HEAD blob, andgit diff HEADhad 0 lines. The test imports../FlowRunnerfrom source, so no build sits between the edit and the run.The predicted direction was red on the two cases that follow a link in place and green on the new-tab preservation case. That is what was observed, and the red DOM dump is the card's symptom.
Suites and type-check (head 8f76169)
Acceptance notes
FlowRunneron any route change and rebuilds it from the launch state, so a route change that does not go through the dialog (the browser's Back or Forward while a wizard sits on step two over a record page) would show step one again. That path was read from the code, not reproduced; it needs the host to keep the run's current step, which is a change to the hosts and outside this claim's file surface.onCloseand thenonCompletereach the host. Every current host clears its run state on either;FlowRunsPagerefreshes once for each.Verification
Two-minute check: from the repository root,
pnpm --dir ui exec vitest run packages/app-shell/src/views/__tests__/FlowRunner.recordLink-25872.test.tsx. Expect 9 passed, including the threeobjectstack#36849cases.Local gate subset (head 8f76169)
node scripts/pm/dispatch-gates.mjs --commandsderived 38 families from this diff; all 38 ran and each exited 0.--ranreconciliation: "38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED (a DERIVED zero — all 38 recorded an exit code and none of them is 3)". Also run:uicheck:new-line-citations(0 new citations). Repo-wide scans, lint and the type-check lanes are left to CI.Generated by Claude Code