Background
During the live nuxt/ui→b24ui sync ports (#72), regenerating snapshots with a targeted command like:
pnpm exec vitest run -u test/components/Select.spec.ts test/components/SelectMenu.spec.ts ...
intermittently did not update the first component(s) in the run — the test rendered against a stale compiled theme (#build/b24ui/*) and the snapshot wasn't refreshed. A subsequent full pnpm exec vitest run -u always fixed it. This caused a false "green" -u followed by a failing non--u verify.
Proposal — document the rule (and optionally harden)
After editing any src/theme/*.ts, regenerate snapshots with a full run, not a targeted one:
pnpm run dev:prepare
pnpm exec vitest run -u # full suite
pnpm exec vitest run # verify green (no -u)
Where to put it:
- A note in the sync workflow guidance (
.sync/PORTING.md reviewer/runbook section) and/or AGENTS.md "Key Conventions".
- Optionally harden:
vitest.config.ts with cache: false under CI=true, or a test:update script that always runs the full suite.
Priority: P3 (process/DX). Context: PR #72; same staleness hit ContextMenu and InputMenu during that PR.
Background
During the live nuxt/ui→b24ui sync ports (#72), regenerating snapshots with a targeted command like:
intermittently did not update the first component(s) in the run — the test rendered against a stale compiled theme (
#build/b24ui/*) and the snapshot wasn't refreshed. A subsequent fullpnpm exec vitest run -ualways fixed it. This caused a false "green"-ufollowed by a failing non--uverify.Proposal — document the rule (and optionally harden)
After editing any
src/theme/*.ts, regenerate snapshots with a full run, not a targeted one:Where to put it:
.sync/PORTING.mdreviewer/runbook section) and/orAGENTS.md"Key Conventions".vitest.config.tswithcache: falseunderCI=true, or atest:updatescript that always runs the full suite.Priority: P3 (process/DX). Context: PR #72; same staleness hit ContextMenu and InputMenu during that PR.