Symptom
src/routes/ExpensesPage.test.tsx > ExpensesPage pagination > appends the next page when 'load more' is clicked (offset advances by a full page) intermittently fails with Test timed out in 5000ms on CI.
Observed on main run 32155208344 (commit 4148f9b, the #271/#555 merge — a backend-only PR touching no web/ files, so pre-existing flake, not a regression). 1778/1779 web tests passed; the prior commit's CI was green.
Likely cause
Async paged-list load race — the 5s default Vitest timeout is too tight under a loaded runner. Same shape as the paged-list/optimistic-UI races (usePagedList, prefill-wipe / async-intent-ticket patterns).
Fix
Make it deterministic, not timing-dependent: wait on the concrete post-load state (appended rows / 'load more' re-enabling) rather than racing the async load; raise this test's timeout only if needed. Do NOT just bump the global timeout — pin the actual awaited side effect. Confirm under repeated / artificially-loaded runs.
Verify
cd web && npm test -- ExpensesPage green across repeated runs.
Symptom
src/routes/ExpensesPage.test.tsx > ExpensesPage pagination > appends the next page when 'load more' is clicked (offset advances by a full page)intermittently fails withTest timed out in 5000mson CI.Observed on main run 32155208344 (commit 4148f9b, the #271/#555 merge — a backend-only PR touching no
web/files, so pre-existing flake, not a regression). 1778/1779 web tests passed; the prior commit's CI was green.Likely cause
Async paged-list load race — the 5s default Vitest timeout is too tight under a loaded runner. Same shape as the paged-list/optimistic-UI races (
usePagedList, prefill-wipe / async-intent-ticket patterns).Fix
Make it deterministic, not timing-dependent: wait on the concrete post-load state (appended rows / 'load more' re-enabling) rather than racing the async load; raise this test's timeout only if needed. Do NOT just bump the global timeout — pin the actual awaited side effect. Confirm under repeated / artificially-loaded runs.
Verify
cd web && npm test -- ExpensesPagegreen across repeated runs.