Skip to content

fix: repair cross-package bugs failing tests and type checks#41

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2686-1781546404
Open

fix: repair cross-package bugs failing tests and type checks#41
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2686-1781546404

Conversation

@stooit

@stooit stooit commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all failing tests and type errors across the monorepo (packages/ui, packages/utils, apps/web). The bugs spanned multiple packages: a hook rename, a locale/format mismatch, a missing a11y passthrough, a stale closure, and a missing TS types entry.

Result: 13/13 tests pass, tsc --noEmit clean (0 errors). No test files modified; no dependencies added.

Changes

File Fix
apps/web/src/lib/api.ts Hook renamed useThrottleuseDebounce in @e2e/utils; updated import and the useSearchDebounce re-export alias. Resolves the api.test.ts import failure and TS2305.
packages/utils/src/format/date.ts formatDate uses en-AU with { dateStyle: "short" } — day-first, no leading zero (e.g. 1/03/2024). formatDateTime unchanged.
packages/ui/src/components/Button/Button.tsx aria-label was destructured but never applied; now passed through to the <button> (always present for icon-only, per the test contract).
packages/ui/src/components/DataTable/DataTable.tsx Stale-closure sort toggle fixed via functional state updater (prev => ...).
tsconfig.json Added bun-types to compilerOptions.types so bun:test resolves under tsc.

Assumptions

  • Canonical hook name is useDebounce (what packages/utils exports); consumer reconciled to it.
  • Button test intentionally requires icon-only buttons to always carry a non-null aria-label (empty string acceptable): aria-label={iconOnly ? (ariaLabel ?? "") : ariaLabel}.
  • en-AU dateStyle: "short" is the intended day-first format.

Verification

  • bun run test → 13 pass, 0 fail
  • npx tsc --noEmit → 0 errors
  • No test files modified

- api.ts: import renamed hook useDebounce (was useThrottle) from @e2e/utils
- date.ts: use en-AU dateStyle:short for day-first, no leading-zero day
- Button.tsx: pass aria-label through to button element (present for icon-only)
- DataTable.tsx: fix stale-closure sort toggle via functional state updater
- tsconfig.json: add bun-types so bun:test resolves under tsc
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