Skip to content

fix: repair cross-package bugs and test harness wiring#59

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2507-1782664435
Open

fix: repair cross-package bugs and test harness wiring#59
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2507-1782664435

Conversation

@stooit

@stooit stooit commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all failing tests and type errors across the monorepo. bun test now reports 13 pass / 0 fail and npx tsc --noEmit is clean.

Root causes & fixes

File Bug Fix
apps/web/src/lib/api.ts Imported stale useThrottle (hook renamed in packages/utils) Import the actual export useDebounce
packages/ui/.../Button.tsx ariaLabel prop never applied to the DOM Propagate ariaLabel to aria-label
packages/ui/.../DataTable.tsx Stale-closure bug: second click didn't toggle to descending Functional state updater for sortDir
packages/utils/.../date.ts Explicit field options overrode en-AU ordering (US M/D/YYYY) Use formatToParts for day-first ordering
bunfig.toml Bare bun test failed: document is not defined Add preload for happy-dom setup
tsconfig.json Test files couldn't resolve bun:test Add bun-types to types

Verification

  • bun test → 13 pass / 0 fail
  • npx tsc --noEmit → exit 0

Scope

No test files modified; no dependencies added (bun-types + happy-dom already installed). Optional hardening flagged in review left out per the "fix only what tests require" constraint.

🤖 Generated autonomously by QuantCode.

- api.ts: import renamed hook useDebounce (was stale useThrottle)
- Button: propagate ariaLabel to aria-label for icon-only buttons
- DataTable: use functional state updater to fix sort stale-closure bug
- date.ts: use Intl formatToParts for correct en-AU day-first ordering
- bunfig.toml: preload happy-dom setup so bare 'bun test' registers DOM globals
- tsconfig.json: add bun-types so test files resolve 'bun:test'
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