fix: repair cross-package bugs causing test and type failures#38
Open
stooit wants to merge 1 commit into
Open
Conversation
- api.ts: import useDebounce (hook was renamed from useThrottle in @e2e/utils) - Button: apply aria-label for icon-only buttons with a fallback accessible name - DataTable: use functional setState updater to fix stale-closure sort toggle - date.ts: use locale-driven dateStyle:short (en-AU) so day is not read as month - tsconfig: add bun-types so bun:test types resolve
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
Repairs four cross-package bugs (and a related type-resolution issue) that were causing failing tests and
tsc --noEmiterrors across the monorepo. After these changesbun run testis 13/13 green andnpx tsc --noEmitexits clean.Changes
apps/web/src/lib/api.ts— The hook was renameduseThrottle→useDebouncein@e2e/utils, but the consumer still imported the old name. Updated the import and theuseSearchDebouncere-export.packages/ui/.../Button/Button.tsx— Icon-only buttons now applyaria-labelto the rendered element, with a fallback accessible name when none is provided.packages/ui/.../DataTable/DataTable.tsx— Fixed a stale-closure bug in the sort toggle by switching to the functionalsetStateupdater form.packages/utils/src/format/date.ts— Explicit field options overrode locale ordering, producing M/D/YYYY. Switched to locale-drivendateStyle: "short"(en-AU) so day-1 is not confused with month-1.tsconfig.json— Addedbun-typessobun:testtype imports resolve.Verification
bun run test→ 13 pass, 0 failnpx tsc --noEmit→ clean (exit 0)Assumptions
useDebounceexport rather than renaming the export back.en-AUchosen as the day-first locale satisfying the date test.No test files were modified and no dependencies were added.