Skip to content

fix: resolve cross-package bugs and type errors in monorepo#50

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2387-1781888209
Open

fix: resolve cross-package bugs and type errors in monorepo#50
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2387-1781888209

Conversation

@stooit

@stooit stooit commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all failing tests and type errors across the multi-package TypeScript monorepo. After these changes bun run test reports 13 pass / 0 fail and tsc --noEmit is clean.

Bugs fixed

  • Renamed hook (packages/utilsapps/web): apps/web/src/lib/api.ts imported useThrottle, which was renamed to useDebounce in @e2e/utils. Updated the import and usage. Kept the public useSearchDebounce re-export alias (asserted by a test) by re-exporting useDebounce as useSearchDebounce.
  • Missing accessibility attribute (packages/ui): Button destructured an aria-label prop but never applied it. Now applies aria-label so icon-only buttons have an accessible name.
  • Stale-closure re-render bug (packages/ui): DataTable.handleSort toggled sort direction off a stale captured sortDir. Switched to the functional updater form setSortDir(prev => ...).
  • Date locale/format (packages/utils): formatDate used explicit Intl {month, day, year} options producing US M/D/Y ordering. Replaced with dateStyle: "short" under en-AU for correct D/M/Y ordering (e.g. 1/03/2024).

Tooling

  • tsconfig.json: added "types": ["bun-types"] so bun:test imports in test files resolve under tsc. bun-types was already present in node_modulesno new dependency added.

Verification

  • bun run test → 13 pass, 0 fail
  • ./node_modules/.bin/tsc --noEmit → clean

Constraints honoured

  • No test files modified.
  • No new dependencies added.

- api.ts: import renamed hook useDebounce (was useThrottle) from @e2e/utils, keep useSearchDebounce re-export alias
- Button: apply aria-label so icon-only buttons have an accessible name
- DataTable: fix stale-closure in handleSort using functional setState updater
- date: use Intl dateStyle 'short' with en-AU for correct D/M/Y ordering
- tsconfig: add bun-types to compilerOptions.types for bun:test resolution

All 13 tests pass; tsc --noEmit clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant