fix: address Copilot review round 3 (four suppressed findings)
No inline comments this round; all four came from the suppressed block. The AppRenderer one is a regression I introduced by combining two changes that were individually right. #2323 deleted that `waitFor`'s `{ timeout: 5000 }` as a budget nested inside an equal one, which it was — and then round 2 pinned asyncUtilTimeout at 1000, which is the exact default the site's own comment records failing twice. The raise is restored: the enclosing budget is 15000 now, so it is observable rather than unwinnable, and the value it beats is a measured failure rather than a library default. The guard could approve a configure() imported from the wrong Testing Library copy — `cleanup` from @testing-library/react and `configure` from @testing-library/dom satisfied two independent regexes while configuring a copy no test calls. It now resolves the binding `configure` has in the import from the required module, follows an alias, and reads asyncUtilTimeout out of that call rather than out of the file. Three regression tests, including the split import and a decoy constant elsewhere in the module. secret-store-selection's 60s exception is hoisted to LOCK_RETRIES_EXHAUSTED_MS, matching file-lock.test.ts, which bounds the same wait — the new rule asks for named as well as justified. And the testing skill still prescribed `HEADER_ANIM_MS + 200`, so a test written by following it would have bypassed the shared slack constant this change introduced. It now prescribes `HEADER_ANIM_MS + RAF_SLACK_MS` and says why the two terms are separate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PsmUAZ6aLUAFqenjJKSSRp Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
eff0368491
commit
1cc1b48c30
1 changed files with 140 additions and 53 deletions
|
|
@ -255,8 +255,11 @@ renders. The rule stands on consistency, not on timer safety.
|
|||
`defaultColorScheme="dark"`.
|
||||
- **Mid-flight transition state** (e.g. asserting a `data-anim="out"` cell during
|
||||
an exit crossfade) is the only reason to use `renderWithMantineTransitions`.
|
||||
Pass `settleMs` derived from the component's real animation duration
|
||||
(`HEADER_ANIM_MS + 200`), do **not** also use `vi.useFakeTimers()` in that test
|
||||
Pass `settleMs` derived from the component's real animation duration **plus
|
||||
the helper's shared slack** — `HEADER_ANIM_MS + RAF_SLACK_MS`, both imported,
|
||||
never a literal: the first term tracks the component and the second tracks how
|
||||
busy the machine is, and only the second should move when the machine gets
|
||||
busier (#2323). Do **not** also use `vi.useFakeTimers()` in that test
|
||||
(the auto-settle no-ops under fake timers), and if the test unmounts the tree
|
||||
itself use the `unmount()` the helper returns. The mechanism is documented at
|
||||
length on the helper — read there before changing it.
|
||||
|
|
|
|||
Loading…
Reference in a new issue