Skip to content

fix: repair cross-package bugs so tests and typecheck pass - #90

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2290-1785001475
Open

fix: repair cross-package bugs so tests and typecheck pass#90
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2290-1785001475

Conversation

@stooit

@stooit stooit commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all failing tests and type errors across the monorepo (bun test → 13/13 pass, tsc --noEmit → 0 errors). Source/config only — no test files modified, no dependencies added.

Fixes

  • ui/Button (packages/ui/src/components/Button/Button.tsx): Props now extends React.ButtonHTMLAttributes; passthrough props (incl. aria-label) are spread onto the <button>, giving icon-only buttons an accessible name.
  • ui/DataTable (packages/ui/src/components/DataTable/DataTable.tsx): sort direction now uses a functional state updater (prev => ...), fixing the stale-closure bug on the second click; rows render from the full data set when no sort is active.
  • web/api (apps/web/src/lib/api.ts): the hook was renamed in packages/utils from useThrottle to useDebounce; import/usage updated and re-exported as useSearchDebounce (as the test expects).
  • utils/date (packages/utils/src/format/date.ts): en-AU formatting now renders day-first without a leading zero, so 1 March is 1/03/2024 (not 01/03/2024).
  • tsconfig (tsconfig.json): added "types": ["bun-types"] so bun:test resolves under tsc --noEmit (bun-types was already an installed devDependency; no new deps).

Verification

  • bun test packages/utils/test packages/ui/test apps/web/test --preload ./packages/ui/test/setup.ts13 pass, 0 fail
  • bun run typecheck (tsc --noEmit) → 0 errors

Assumptions

  • Bugs were fixed in source only, matching existing test expectations; no test behaviour was changed.
  • The bun:test type errors were resolved via tsconfig types rather than editing test files, per the "do not modify test files / no new dependencies" constraints.

- ui/Button: forward aria-label to the rendered <button> for accessible name
- ui/DataTable: use functional updater to fix stale-closure sort direction;
  render rows when no sort is active
- web/api: update renamed hook import (useThrottle -> useDebounce) and
  re-export as useSearchDebounce
- utils/date: format en-AU day-first without leading zero
- tsconfig: include bun-types so bun:test resolves under tsc --noEmit
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