Repository navigation
test(app): act-wrap the hydrate-reconcile boot render and store reset - #28126
Conversation
Make website/src/test/App.terminalHydrateReconcile.test.tsx stop emitting React act() warnings, and drop its row from website/integration/act-warning-baseline.json so the guard in website/integration/setup.ts checks it.
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The PR changes only a test file and a test baseline, so no user-visible control changes and no screenshot is needed. [UX-REVIEWED] 8c8690b Description read[DESCRIPTION-READ] 2b7beb5761d854af2f59a93bc0125c8f37b68fa043858b9ce12815c329d2c3a9 That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change only touches a test and its baseline row, and nothing outside it reads that row. Notes
[DESIGN-REVIEWED] 8c8690b Description read[DESCRIPTION-READ] 7059273d3df71232666f30d4eb764f44595885e21f567c6870d9a3c123682edc That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
bolichen97
left a comment
There was a problem hiding this comment.
Approving at 8c8690b.
Test only. In website/src/test/App.terminalHydrateReconcile.test.tsx:
bootApp()now rendersAppinsideawait act(async () => ...), so the boot effects (the status fetch into redux and the topbar measure) land inside the scope.- The
afterEachstore reset and terminal-flag reset run insideact, because the dock panel is still mounted and re-renders on that emit.
The file's row also leaves website/integration/act-warning-baseline.json. No assertion changes and no component code is touched.
CI: 0 red. Every Frontend Tests shard has passed with this change, so the hydrate-pending assertions still hold. Backend test shards and PR Readiness were still running when I checked, and every other check had passed. Auto-merge waits for them.
Problem / Motivation
Goal:
website/src/test/App.terminalHydrateReconcile.test.tsxstops emitting React act() warnings, so its row leaveswebsite/integration/act-warning-baseline.jsonand the guard inwebsite/integration/setup.tschecks it like any file outside the list.Before this change, a run of the file emitted 24 act() warnings (late state updates in
App): a state update landed after the test's last barrier. Because the file is on the baseline, the guard kept those warnings out of the log.Why it matters
website/docs/testing.md(Rules every test keeps) treats an act() warning as a finding: the update lands after the assertions, so whether the test sees it depends on timing. The baseline is shrink-only, and each file that leaves it is held to the rule from then on.Not a goal
What changed (motivation → approach → change)
The tests now wait for the state the late update produces before they finish, so the update lands inside the test's barrier.
website/src/test/App.terminalHydrateReconcile.test.tsx:import { waitFor, act } from '@testing-library/react'website/src/test/App.terminalHydrateReconcile.test.tsx:await act(async () => { renderWithProviders(<App />, { route: '/chat' }) })website/integration/act-warning-baseline.json: removedsrc/test/App.terminalHydrateReconcile.test.tsx.Backwards compatibility
Compatible: test-only change.
Removes nothing: a baseline row is a tolerance the guard stops needing, not a capability.
Tests
KIROCREW_ACT_STRICT=1 npx vitest run src/test/App.terminalHydrateReconcile.test.tsxfromwebsite/: 4 of 4 tests fail on act() warnings.integration/setup.refactor.determinism.test.tspasses (the baseline stays sorted, unique and existing);npx eslintis clean on the file.Manual verification
N/A: test-only change; the strict runs above are the check.
Screenshots / video
Why no screenshot: nothing renders; this change touches one test file and a test baseline only.
No issue exists; burn-down of the act() warning baseline that #17673 introduced.