- Update
README.md(replace boilerplate; correct directory layout; add setup/scripts/testing/stack) - Consolidate date utilities into a single module (
utils/date-utils.ts, date-fns based) - Remove redundant
utils/dateUtils.ts(deleted; no longer present) - Update all imports across the repo to the surviving date utility module
- Add TSDoc to surviving date utility exports
- Add unit tests:
utils/date-utils.test.ts(parse/range/format edge cases, colocated per repo convention alongsideauthUtils.test.ts/paginationUtils.test.ts/transactionUtils.test.ts)
- Run
npm run test(Vitest, includesutils/date-utils.test.tswith coverage) - Ensure tests pass and coverage thresholds (95%) for the suite remain satisfied (98%+ overall, 100% branches in
date-utils.ts) - Run
npm run lintandnpx tsc --noEmitagainst changed files
- Verify no remaining imports of removed date utils modules
- Double-check README does not leak secrets/env values (also removed pre-existing absolute local file paths leaking contributor usernames)
- Update
lib/api/transactions.ts#getTransactionsto accept optionalAbortSignal - Implement abortable delay and abort checks
- Update
hooks/useTransactions.tsto createAbortControllerper effect run - Abort previous request in cleanup
- Add requestId guard so only latest request commits state
- Ensure no setState after unmount
- Create
hooks/useTransactions.test.ts - Simulate overlapping resolutions and assert last-request-wins
- Simulate unmount mid-flight and ensure no stale state commit / no unhandled rejection
- Add TSDoc comments documenting cancellation semantics
- Run
npm run test - Confirm Vitest coverage thresholds pass