Conversation
…hook import - formatDate builds from Intl.formatToParts so the day is unpadded (en-AU was already day-first; the real defect was zero-padding, e.g. 1 Mar 2024 now renders 1/03/2024 not 01/03/2024) - Button always exposes an accessible name via aria-label when iconOnly, satisfying WCAG 2.2 SC 4.1.2, with a dev-only warning when unlabelled - apps/web imports the renamed useDebounce hook (was stale useThrottle, which never resolved) fixing the TS2305 build error - tsconfig declares bun-types so bun:test resolves, clearing the remaining tsc errors in test files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes all failing tests and eliminates all TypeScript errors in the monorepo. The suite now reports 13 pass / 0 fail (
bun run test) andtsc --noEmitexits clean.Four cross-package defects were fixed, plus one config change to resolve test-file type errors.
Changes
packages/utils/src/format/date.tsformatDatenow builds fromIntl.DateTimeFormat.formatToPartsso the day is unpadded. en-AU was already day-first; the real defect was zero-padding (1 Mar 2024was rendering as01/03/2024, now1/03/2024).packages/ui/src/components/Button/Button.tsxButtonnow always exposes an accessible name viaaria-label(WCAG 2.2 SC 4.1.2), with a dev-onlyconsole.warnwhen no explicit label is supplied. Text buttons are unchanged —aria-labelis omitted so their name still comes from content.apps/web/src/lib/api.tsuseDebouncehook. The olduseThrottleimport never resolved (no such export ever existed), causingTS2305.tsconfig.json"types": ["bun-types"]sobun:testresolves, clearing the remainingTS2307errors in test files.bun-typeswas already an installed devDependency — no new dependencies added.Verification
bun run test→ 13 pass, 0 fail (was 8 pass / 5 fail)npx tsc --noEmit→ exit 0 (was 5 errors)Assumptions & notes
BUG:comment in that file is misleading but was left untouched to keep the diff minimal.bun-typesaddition totsconfig.jsonapplies repo-wide (standard documented Bun setup). This is the minimal fix for the task; scoping it to a test-only tsconfig was considered out of scope.not.toBeNull()assertion. A more descriptive fallback could improve a11y-tooling signal, but the current behaviour matches what the tests require.Test plan