Repository navigation
fix(frontend): fast refresh, barrel files, and dark mode fixes - #5
Merged
Merged
Conversation
Fast refresh only works when a file exports only components. Move the cva variants, hooks, contexts, and the Notification API to their own files next to the components, and update the imports. The public names do not change.
The filter-demo route imported types inline with values. With verbatimModuleSyntax the route split left a side-effect import of the filter builder in the route file, so the filter builder, the calendar, and react-aria went into the entry chunk. Import the types with import type. Also put the vendor libraries that the root layout always loads (react, the router, the query client, motion) in their own chunks. The entry chunk goes from 897 kB to 288 kB, and the build has no chunk size warning.
The project rules forbid barrel files. The filter-builder barrel also caused the large entry chunk: an import of it from the filter demo route pulled the whole filter builder into the entry. The route now imports from each source file.
The project rules forbid barrel files, and nothing imported this one.
The three theme buttons were wider than the icon rail, so the rail clipped them. The buttons now stack vertically in the rail.
The variants use the destructive color for text, but the dark value was too dark to read on the dark background. The dark value is now the current shadcn value.
No file imports the useComboboxFilter hook. Remove the file.
pdevito3
force-pushed
the
fix/frontend-cleanup
branch
from
October 18, 2026 16:01
eb55ab0 to
4284e19
Compare
Remove the old filter hook comments in the autocomplete and combobox files. Rename notifications.tsx to toaster.tsx, because the file holds the Toaster.
The name Notifications was too close to the Notification API that shows a toast. The JSDoc now says that the component is the container, and that Notification shows a toast.
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.
These frontend fixes were made during the work on #3, but they are not part of the Kubb contract. This PR moves them to their own review.
Changes
NotificationAPI moved out of the component files into their own files. Fast refresh works only when a file exports only components. The public names do not change.filter-builderbarrel file and the unused svg barrel file. The imports now go to the source files.Toasterintoaster.tsx. The old nameNotificationswas too close to theNotificationAPI that shows a toast.Notes
pnpm buildandpnpm lintpass on this branch.