Repository navigation
test(agent): pin the consent hold's reason precedence, and mark the one arrange production cannot produce - #18977
Conversation
…ne arrange production cannot produce An audit of every arrange in `agentPanel.test.ts` that writes `gettingStartedVisible`, `firstRunHoldsScreen` or `activeTour` directly, after two defects in a row hid behind a test that arranged state no production ordering reaches. One arrange is unreachable: `withholds a card whose Getting Started screen took over while the offer was in flight`. `gettingStartedVisible` is set true only by `showFirstRunScreen`, which runs once per page load from `handleStartupOutcome` and always before it sets `startupDecided`; `tourHandoffs` only rises from a template click on the rendered screen. Every automatic offer waits on `whenStartupDecided()`, so the first-run hold can only fall while an offer is in flight, never rise. The test stays — it is the only cover on `canShow` reading `screenHolder()` rather than `screenBusyReason()` — renamed so it no longer claims an ordering production produces, with the invariant it leans on written down next to it. One real gap: nothing pinned which reason wins when the first run and another surface hold together. Swapping the precedence in `screenHolder` left all 70 tests green. The screen is built for a dialog over it (`FocusScope` traps focus only while `!dialogOpen`), and the reported reason decides whose `agent_consent_not_offered` denominator the user lands in, so it is behaviour: first run wins while it holds the screen. Red on the swap, green restored. No production change.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎨 Storybook: ✅ Built — View Storybook🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measureExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight This candidate changes nothing the matrix measures, so every expensive stage was skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md 🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 0389dae130926fb313f04090d24402e693fcf7ed
Full docs: ADR-DEVEX-LINT-0015 📦 Bundle Size
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## fix/agent-consent-defer-first-run-screen #18977 +/- ##
============================================================================
- Coverage 85.05% 85.02% -0.04%
============================================================================
Files 2316 2317 +1
Lines 133714 133744 +30
Branches 34247 34266 +19
============================================================================
- Hits 113731 113710 -21
- Misses 19665 19716 +51
Partials 318 318
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
What this PR needs before it lands: a rebase, no content changeVerified as part of reconciling the four open PRs on this file (order and evidence: Suggested position: second, after #18966. It is test-only, so zero production risk, and it puts the Two results from this file's audit that were re-checked in the full composition with #18975 and #18976,
Also confirmed: §8.1's call on #18976 was the load-bearing one. Left to the rebase, the natural resolution |
|
Heads-up for whoever merges this: #18989 is stacked on this branch and slots in right after it in the published order (#18966 → #18977 → #18989 → #18975 → #18976). It is test-only and touches this same file. It pins the trap the comment at Composition probed rather than assumed: merged with #18975 → clean, 75 passed; merged with #18976 → clean auto-merge with 2 failures that are identical without #18989 (the known |
|
Order refreshed — your position is unchanged, but the set grew from five PRs to eleven. Follow-up to my note above (#18977#issuecomment-5845323428) and the #18989 extension Current order: #18966 → #18977 → #18989 → #18975 → #18978 → #18992 → #18976 → #18973 → #18986 → #18985 → #18991. Nothing moves for this PR: still second, still test-only, still needs only a rebase onto
Full evidence, the per-file interaction matrix, and a measured silent-resolution hazard on |
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: one material test-design issue remains; the new precedence regression itself is sound.
I found three inline issues and one documentation issue without a line anchor. There are no P0 or P1 blockers.
Finding without an anchorable line
- P3, PR description: The stated audit of 24 arrangements, classified as 23 reachable and one unreachable, has no inventory or counting rule. I could not reconstruct that population from the file because table rows, helpers, tests that arrange several refs, and later state transitions make "arrange" ambiguous. Please list the 24 test names or table rows and their classifications so reviewers can reproduce the audit.
Checked and cleared
- The new precedence test is behavioral and production-reachable. Reversing
screenHolder()precedence made only that test fail withdialog_openinstead offirst_run_screen. - The statement that a future rebase should need no content change appeared in a later issue comment rather than this PR's description or diff, so I did not treat it as a finding on the reviewed patch. The current stack dependency on #18966 is accurate.
Coverage
Standard-depth review ran the correctness, maintainability, idiomaticity, tests, and documentation lanes. The review covered behavior and blast radius, regression history, TypeScript discipline, test design and mocks, comment quality, and technical prose.
pnpm test:unit src/extensions/core/agentPanel.test.ts passed all 71 tests. ESLint and oxfmt passed for the changed file. Fallow analyzed the changed file and reported no new finding.
Focused and full-file mutations confirmed both claimed falsifiers. The precedence swap failed only the new test. Replacing the in-flight canShow read with screenBusyReason() failed the retained impossible-ordering test.
| }) | ||
|
|
||
| it('withholds a card whose Getting Started screen took over while the offer was in flight, then re-offers', async () => { | ||
| // Kept deliberately as a guard rather than as an expectation: no production |
There was a problem hiding this comment.
P2: Please remove this test and its new explanation. The comment correctly establishes that production cannot make the first-run hold rise after an automatic offer starts, but the test then manufactures exactly that transition through the mocked first-run entry. It only pins canShow to the current helper choice, and it cannot notice a future real trigger because that production path is mocked out. Our testing guidance says to exclude combinations production cannot produce. If a second trigger is added later, that change should add a reachable regression test through the real transition.
There was a problem hiding this comment.
Addressed in 2361f7a: removed the impossible-ordering test and its explanation. The reachable reason-precedence regression remains.
| // The two overlap in production: `GettingStartedScreen.vue` traps focus | ||
| // only while `!dialogOpen`, drops `aria-modal` when one is up and skips | ||
| // taking focus on mount for the same reason, so the screen is built for a | ||
| // dialog over it - and the automatic offer can run in exactly that state. | ||
| // Which reason is reported decides whose denominator this user lands in, | ||
| // so the precedence is behaviour and not an implementation detail: the | ||
| // first run wins for as long as it holds the screen. |
There was a problem hiding this comment.
P3 Nit: Please remove this comment. The test name, screenShown() plus openDialog() arrangement, and literal expected reason already state the precedence contract. The focus-trap, aria-modal, and mount-focus details are owned and tested by GettingStartedScreen; this test cannot detect drift in those copied claims, so the prose creates a second source to maintain.
There was a problem hiding this comment.
Addressed in 2361f7a: removed the copied focus and accessibility commentary. The arrangement and literal expected reason now state the contract.
| // `showFirstRunScreen`, which runs once per page load from | ||
| // `handleStartupOutcome` (GraphCanvas's `onMounted`) and always *before* that | ||
| // function sets `startupDecided`; `tourHandoffs` only rises from a template | ||
| // click on the rendered screen. Every automatic offer waits on |
There was a problem hiding this comment.
P3: This is not click-only. GettingStartedCard.vue routes click, Enter, and Space through the same selection path to dismissIntoFirstRunTour(). Please use input-neutral wording such as "selecting a template on the rendered screen."
There was a problem hiding this comment.
Addressed by removing the impossible-ordering test and its commentary in 2361f7a, so the inaccurate click-only wording is gone.
…tpanel-test-arrange-audit Amp-Thread-ID: https://ampcode.com/threads/T-01a0e581-482b-767d-97e2-48c297cb64f3
|
Merged base |
|
Review repair is pushed at 2361f7a and re-review is requested from @DrJKL.
Dependency order is unchanged: #18966 -> #18977 -> #18989 -> #18975 -> #18978 -> #18992. |
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: ready to approve; all prior findings are fixed at 2361f7a.
Prior finding dispositions:
- P2 fixed: The production-impossible mid-offer first-run test and its explanation were removed.
- The copied focus,
aria-modal, and mount-focus commentary is gone, fixing the first P3. - Removing the unreachable test commentary also fixed the P3 click-only wording.
- The body-only P3 is fixed by the PR description's counting rule and complete 24-row inventory.
I found no new issues in the repair commit. pnpm test:unit src/extensions/core/agentPanel.test.ts --testTimeout=30000 passed all 74 tests. ESLint, oxfmt, and git diff --check also passed for the current diff.
f852ee5
into
fix/agent-consent-defer-first-run-screen
…ling the vitest worker (#18989) ## Problem The release watcher must agree with `screenHolder()` about whether the consent offer is held. If release instead ignores the first-run holder, the offer is released and re-held in a microtask loop; without a bound, Vitest loses the worker rather than reporting an assertion. ## Change - Wrap the mocked `whenStartupDecided` startup probe in a `vi.fn` with a 20-call circuit breaker. The mock owns and automatically resets its call history. - Use that bounded startup probe to let the existing exact `consentStore.load` assertion report a release/hold disagreement across the first-run screen, tours, their composition, and the sign-in dialog. - Keep the source comment scoped to those holder cases. Production code is unchanged. ## Verification At `be2570918f`, stacked on #18977 `2361f7ad65`: - `pnpm test:unit src/extensions/core/agentPanel.test.ts --testTimeout=30000` — 74/74 passed. - Mutating `screenIsClear` from `screenHolder() === null` to `screenBusyReason() === null`, then running the same command, produces an ordinary red result: 4 failed / 70 passed; the first failure reports 21 consent loads instead of 1. The mutation was reverted and the passing command rerun. - The current effective diff against #18977 changes only `src/extensions/core/agentPanel.test.ts`; production code is byte-identical to the base. Full command/result note: #18989 (comment) ## Merge order This remains stacked directly after #18977. The updated #18977 head was merged into this branch before verification; do not merge this PR before #18977. --------- Co-authored-by: Amp <amp@ampcode.com>
…ne arrange production cannot produce (#18977) ## Summary Audits every `agentPanel.test.ts` arrangement that directly writes `gettingStartedVisible`, `firstRunHoldsScreen`, or `activeTour`, after two regressions hid behind impossible test state. Adds one reachable reason-precedence regression. Test-only; no production change. ## Changes - Classified 24 arrangements against production writers and orderings: 23 reachable; one impossible arrangement removed after review. - Pins `first_run_screen` over `dialog_open` when both hold the automatic consent offer. Reversing `screenHolder()` precedence makes this test fail with `dialog_open`; restored production code passes. - Keeps no test for the impossible mid-offer first-run transition. `showFirstRunScreen` runs before `startupDecided`, and every automatic offer waits for that decision, so the first-run hold cannot rise while an offer is in flight. <details> <summary>Audited arrangement inventory and counting rule</summary> Count one row per setup or transition sequence that directly writes one or more audited refs; a row may write multiple refs. Dialog-only rows are included where they compose with an audited ref or establish a comparison reason. 1. beforeEach idle baseline - reachable 2. Getting Started screen up - reachable 3. coachmark tour active - reachable 4. screen and tour active - reachable 5. desktop sign-in dialog open - reachable 6. screen closes - reachable 7. screen closes into first-run tour - reachable 8. holding tour ends - reachable 9. startup decision remains pending after tour ends - reachable 10. tour ends while an offer remains in flight - reachable 11. tour starts while an offer is in flight - reachable 12. tour ends while consent cannot be read - reachable 13. first-run reason deduplication - reachable 14. tour reason deduplication - reachable 15. dialog reason deduplication - reachable 16. undecided-boot reason deduplication - reachable 17. in-flight tour plus workspace switch - reachable 18. second workspace repeats a tour reason - reachable 19. held offer emits no reason after consent resolves - reachable 20. tour ends while Getting Started remains up - reachable 21. tour ends while a dialog remains open - reachable 22. dialog opens while an offer is in flight - reachable 23. first-run hold rises while an offer is in flight - impossible; removed 24. manual consent dialog per identity scope - reachable </details> ## Verification - `pnpm test:unit src/extensions/core/agentPanel.test.ts --testTimeout=30000` - 74 passed. - Precedence mutation `screenBusyReason() ?? (firstRunHoldsScreen ? 'first_run_screen' : null)` - focused regression fails with received reason `dialog_open`. - ESLint, oxfmt, and `git diff --check` pass for the changed file. - CI was green on the rebased parent; fresh CI is running for the review repair. ## Dependency Stacked on #18966 because `firstRunHoldsScreen` is introduced there. Required order remains #18966 -> #18977 -> #18989 -> #18975 -> #18978 -> #18992. --------- Co-authored-by: Amp <amp@ampcode.com>
…ling the vitest worker (#18989) ## Problem The release watcher must agree with `screenHolder()` about whether the consent offer is held. If release instead ignores the first-run holder, the offer is released and re-held in a microtask loop; without a bound, Vitest loses the worker rather than reporting an assertion. ## Change - Wrap the mocked `whenStartupDecided` startup probe in a `vi.fn` with a 20-call circuit breaker. The mock owns and automatically resets its call history. - Use that bounded startup probe to let the existing exact `consentStore.load` assertion report a release/hold disagreement across the first-run screen, tours, their composition, and the sign-in dialog. - Keep the source comment scoped to those holder cases. Production code is unchanged. ## Verification At `be2570918f`, stacked on #18977 `2361f7ad65`: - `pnpm test:unit src/extensions/core/agentPanel.test.ts --testTimeout=30000` — 74/74 passed. - Mutating `screenIsClear` from `screenHolder() === null` to `screenBusyReason() === null`, then running the same command, produces an ordinary red result: 4 failed / 70 passed; the first failure reports 21 consent loads instead of 1. The mutation was reverted and the passing command rerun. - The current effective diff against #18977 changes only `src/extensions/core/agentPanel.test.ts`; production code is byte-identical to the base. Full command/result note: #18989 (comment) ## Merge order This remains stacked directly after #18977. The updated #18977 head was merged into this branch before verification; do not merge this PR before #18977. --------- Co-authored-by: Amp <amp@ampcode.com>
… of dropping it (Comfy-Org#18966) ## Summary Defers the automatic Agent consent offer while Getting Started owns the screen, then re-offers it in the same session after that ownership ends. The template path keeps first-run ownership across the dismissal-to-tour preview gap, so the consent card cannot open underneath the tour. The first-session entry-button/feature-flag timing question is separate and is not changed here. ## Changes - Arms the consent retry for `first_run_screen` instead of dropping that offer. - Uses live first-run screen ownership, including pending screen-to-tour handoffs, when deciding whether consent can be shown. - Cancels and releases an in-flight handoff when the authenticated identity changes, preventing the previous account tour or hold from crossing sessions. - Removes the obsolete `firstRunTookScreen` latch. - Keeps failed template loads on Getting Started and removes duplicate no-tour coverage. ## Review focus - `dismissIntoFirstRunTour` snapshots the owner, passes an identity-change cancellation predicate to `beginTour`, and invalidates pending holds at the auth boundary. - Per-call symbols keep concurrent handoff ownership distinct, while `authGeneration` separately invalidates stale continuations across authenticated-session changes. - Bare dismissal releases consent; template selection retains ownership until the tour has either started, declined, or failed. ## Verification At current head `e93ee8410e`, rebased directly on `main` at `4ff3690047` (eleven-file base-to-head diff): - `pnpm test:unit src/extensions/core/agentPanel.test.ts src/renderer/extensions/firstRunTour/gettingStarted/GettingStartedScreen.test.ts src/renderer/extensions/firstRunTour/gettingStarted/firstRunEntry.test.ts src/renderer/extensions/firstRunTour/tour/useFirstRunTourController.test.ts --testTimeout=30000` — 4 files, 226 tests passed. - `bash scripts/test-browser-offline.sh --project=cloud browser_tests/tests/agent/agentConsent.spec.ts -g 'defers the offer until Getting Started releases the screen' --workers=1 --repeat-each=5` — 5/5 passed in 43.2 seconds from a freshly restarted cloud-distribution Vite process; the scenario-only 90-second budget covers both application boots. - ESLint, Oxlint, oxfmt, `git diff --check`, pre-push Knip, and changed-line Fallow passed. Fallow excluded 17 inherited dependency findings and reported two inherited styling advisories. The branch retains the test-only changes from Comfy-Org#18977 and Comfy-Org#18989. Those PRs were merged into this PR's branch (their GitHub base was `fix/agent-consent-defer-first-run-screen`), not into `main`; dropping them during reconciliation would lose their approved coverage. The rebase preserves the eleven-file product/browser patch while removing the stale `main` ancestry. --------- Co-authored-by: Amp <amp@ampcode.com>
… of dropping it (#18966) Defers the automatic Agent consent offer while Getting Started owns the screen, then re-offers it in the same session after that ownership ends. The template path keeps first-run ownership across the dismissal-to-tour preview gap, so the consent card cannot open underneath the tour. The first-session entry-button/feature-flag timing question is separate and is not changed here. - Arms the consent retry for `first_run_screen` instead of dropping that offer. - Uses live first-run screen ownership, including pending screen-to-tour handoffs, when deciding whether consent can be shown. - Cancels and releases an in-flight handoff when the authenticated identity changes, preventing the previous account tour or hold from crossing sessions. - Removes the obsolete `firstRunTookScreen` latch. - Keeps failed template loads on Getting Started and removes duplicate no-tour coverage. - `dismissIntoFirstRunTour` snapshots the owner, passes an identity-change cancellation predicate to `beginTour`, and invalidates pending holds at the auth boundary. - Per-call symbols keep concurrent handoff ownership distinct, while `authGeneration` separately invalidates stale continuations across authenticated-session changes. - Bare dismissal releases consent; template selection retains ownership until the tour has either started, declined, or failed. At current head `e93ee8410e`, rebased directly on `main` at `4ff3690047` (eleven-file base-to-head diff): - `pnpm test:unit src/extensions/core/agentPanel.test.ts src/renderer/extensions/firstRunTour/gettingStarted/GettingStartedScreen.test.ts src/renderer/extensions/firstRunTour/gettingStarted/firstRunEntry.test.ts src/renderer/extensions/firstRunTour/tour/useFirstRunTourController.test.ts --testTimeout=30000` — 4 files, 226 tests passed. - `bash scripts/test-browser-offline.sh --project=cloud browser_tests/tests/agent/agentConsent.spec.ts -g 'defers the offer until Getting Started releases the screen' --workers=1 --repeat-each=5` — 5/5 passed in 43.2 seconds from a freshly restarted cloud-distribution Vite process; the scenario-only 90-second budget covers both application boots. - ESLint, Oxlint, oxfmt, `git diff --check`, pre-push Knip, and changed-line Fallow passed. Fallow excluded 17 inherited dependency findings and reported two inherited styling advisories. The branch retains the test-only changes from #18977 and #18989. Those PRs were merged into this PR's branch (their GitHub base was `fix/agent-consent-defer-first-run-screen`), not into `main`; dropping them during reconciliation would lose their approved coverage. The rebase preserves the eleven-file product/browser patch while removing the stale `main` ancestry. --------- Co-authored-by: Amp <amp@ampcode.com>
… of dropping it (#18966) Defers the automatic Agent consent offer while Getting Started owns the screen, then re-offers it in the same session after that ownership ends. The template path keeps first-run ownership across the dismissal-to-tour preview gap, so the consent card cannot open underneath the tour. The first-session entry-button/feature-flag timing question is separate and is not changed here. - Arms the consent retry for `first_run_screen` instead of dropping that offer. - Uses live first-run screen ownership, including pending screen-to-tour handoffs, when deciding whether consent can be shown. - Cancels and releases an in-flight handoff when the authenticated identity changes, preventing the previous account tour or hold from crossing sessions. - Removes the obsolete `firstRunTookScreen` latch. - Keeps failed template loads on Getting Started and removes duplicate no-tour coverage. - `dismissIntoFirstRunTour` snapshots the owner, passes an identity-change cancellation predicate to `beginTour`, and invalidates pending holds at the auth boundary. - Per-call symbols keep concurrent handoff ownership distinct, while `authGeneration` separately invalidates stale continuations across authenticated-session changes. - Bare dismissal releases consent; template selection retains ownership until the tour has either started, declined, or failed. At current head `e93ee8410e`, rebased directly on `main` at `4ff3690047` (eleven-file base-to-head diff): - `pnpm test:unit src/extensions/core/agentPanel.test.ts src/renderer/extensions/firstRunTour/gettingStarted/GettingStartedScreen.test.ts src/renderer/extensions/firstRunTour/gettingStarted/firstRunEntry.test.ts src/renderer/extensions/firstRunTour/tour/useFirstRunTourController.test.ts --testTimeout=30000` — 4 files, 226 tests passed. - `bash scripts/test-browser-offline.sh --project=cloud browser_tests/tests/agent/agentConsent.spec.ts -g 'defers the offer until Getting Started releases the screen' --workers=1 --repeat-each=5` — 5/5 passed in 43.2 seconds from a freshly restarted cloud-distribution Vite process; the scenario-only 90-second budget covers both application boots. - ESLint, Oxlint, oxfmt, `git diff --check`, pre-push Knip, and changed-line Fallow passed. Fallow excluded 17 inherited dependency findings and reported two inherited styling advisories. The branch retains the test-only changes from #18977 and #18989. Those PRs were merged into this PR's branch (their GitHub base was `fix/agent-consent-defer-first-run-screen`), not into `main`; dropping them during reconciliation would lose their approved coverage. The rebase preserves the eleven-file product/browser patch while removing the stale `main` ancestry. --------- Co-authored-by: Amp <amp@ampcode.com>
… of dropping it (#18966) Defers the automatic Agent consent offer while Getting Started owns the screen, then re-offers it in the same session after that ownership ends. The template path keeps first-run ownership across the dismissal-to-tour preview gap, so the consent card cannot open underneath the tour. The first-session entry-button/feature-flag timing question is separate and is not changed here. - Arms the consent retry for `first_run_screen` instead of dropping that offer. - Uses live first-run screen ownership, including pending screen-to-tour handoffs, when deciding whether consent can be shown. - Cancels and releases an in-flight handoff when the authenticated identity changes, preventing the previous account tour or hold from crossing sessions. - Removes the obsolete `firstRunTookScreen` latch. - Keeps failed template loads on Getting Started and removes duplicate no-tour coverage. - `dismissIntoFirstRunTour` snapshots the owner, passes an identity-change cancellation predicate to `beginTour`, and invalidates pending holds at the auth boundary. - Per-call symbols keep concurrent handoff ownership distinct, while `authGeneration` separately invalidates stale continuations across authenticated-session changes. - Bare dismissal releases consent; template selection retains ownership until the tour has either started, declined, or failed. At current head `e93ee8410e`, rebased directly on `main` at `4ff3690047` (eleven-file base-to-head diff): - `pnpm test:unit src/extensions/core/agentPanel.test.ts src/renderer/extensions/firstRunTour/gettingStarted/GettingStartedScreen.test.ts src/renderer/extensions/firstRunTour/gettingStarted/firstRunEntry.test.ts src/renderer/extensions/firstRunTour/tour/useFirstRunTourController.test.ts --testTimeout=30000` — 4 files, 226 tests passed. - `bash scripts/test-browser-offline.sh --project=cloud browser_tests/tests/agent/agentConsent.spec.ts -g 'defers the offer until Getting Started releases the screen' --workers=1 --repeat-each=5` — 5/5 passed in 43.2 seconds from a freshly restarted cloud-distribution Vite process; the scenario-only 90-second budget covers both application boots. - ESLint, Oxlint, oxfmt, `git diff --check`, pre-push Knip, and changed-line Fallow passed. Fallow excluded 17 inherited dependency findings and reported two inherited styling advisories. The branch retains the test-only changes from #18977 and #18989. Those PRs were merged into this PR's branch (their GitHub base was `fix/agent-consent-defer-first-run-screen`), not into `main`; dropping them during reconciliation would lose their approved coverage. The rebase preserves the eleven-file product/browser patch while removing the stale `main` ancestry. --------- Co-authored-by: Amp <amp@ampcode.com>
Summary
Audits every
agentPanel.test.tsarrangement that directly writesgettingStartedVisible,firstRunHoldsScreen, oractiveTour, after two regressions hid behind impossible test state. Adds one reachable reason-precedence regression. Test-only; no production change.Changes
first_run_screenoverdialog_openwhen both hold the automatic consent offer. ReversingscreenHolder()precedence makes this test fail withdialog_open; restored production code passes.showFirstRunScreenruns beforestartupDecided, and every automatic offer waits for that decision, so the first-run hold cannot rise while an offer is in flight.Audited arrangement inventory and counting rule
Count one row per setup or transition sequence that directly writes one or more audited refs; a row may write multiple refs. Dialog-only rows are included where they compose with an audited ref or establish a comparison reason.
Verification
pnpm test:unit src/extensions/core/agentPanel.test.ts --testTimeout=30000- 74 passed.screenBusyReason() ?? (firstRunHoldsScreen ? 'first_run_screen' : null)- focused regression fails with received reasondialog_open.git diff --checkpass for the changed file.Dependency
Stacked on #18966 because
firstRunHoldsScreenis introduced there. Required order remains #18966 -> #18977 -> #18989 -> #18975 -> #18978 -> #18992.