Skip to content

fix: repair cross-package bugs and clear type errors#29

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2465-1780880139
Open

fix: repair cross-package bugs and clear type errors#29
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2465-1780880139

Conversation

@stooit

@stooit stooit commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all 5 failing tests and eliminates all tsc --noEmit type errors across the monorepo. Bugs spanned three packages plus a type-resolution config issue.

Area Fix
apps/web/src/lib/api.ts The hook was renamed in packages/utils (useThrottleuseDebounce); the app still imported the old name. Import the current name and re-export it as useSearchDebounce (the export the test expects).
packages/ui/src/components/Button/Button.tsx Icon-only buttons lacked an accessible name. Apply aria-label so the button is reachable by accessible name.
packages/utils/src/format/date.ts formatDate produced ambiguous/locale-wrong output (01/03/2024). Now emits the documented DD/MM/YYYY (en-AU) contract, fixing the day-1 vs month-1 confusion.
tsconfig.json + bun-env.d.ts bun:test types are now resolved via a scoped /// <reference types="bun-types" /> file instead of clobbering the global types array (which had suppressed other ambient @types). Test glob added to include.

Verification

  • bun run test13 pass / 0 fail
  • bunx tsc --noEmit0 errors

Notes / assumptions

  • No test files modified; no dependencies added — changes are minimal and target only what the tests require.
  • The "stale closure re-render" area (DataTable) was investigated; its tests already passed, so it was left unchanged per the "fix only what tests require" constraint.
  • date.ts builds the formatted string from local date parts (getDate/getMonth/getFullYear) because Bun's ICU pads the day under Intl.DateTimeFormat; this matches every test assertion with no timezone/off-by-one risk for the test inputs.

🤖 Generated autonomously.

- apps/web: import renamed hook useDebounce (was stale useThrottle) and
  re-export it as useSearchDebounce
- packages/ui: give icon-only Button an accessible name via aria-label
- packages/utils: fix formatDate to emit DD/MM/YYYY (en-AU contract),
  resolving day/month confusion
- tsconfig: resolve bun:test types via a scoped bun-env.d.ts reference
  instead of clobbering the global types array; include apps test glob
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