feat(frontend): replace the hand-rolled widgets with Ark UI and lucide-react - #147
Merged
Conversation
`validVestingSchedule` checks each milestone fraction against the one before it, and a NaN loses every comparison. So a NaN fraction was read as valid, and it then became `prevFraction`, which let every milestone after it pass too. A schedule that still ended at 100% was accepted with a meaningless fraction inside it. The same loop already guarded milestone dates this way. The fractions now get the same check.
…e-react Every interactive control in the dApp now comes from Ark UI, which wraps the same Zag state machines `canton-dappbooster` already resolves, so the lock file holds one copy of each. A reader studying the app can look any control up in public docs instead of reverse-engineering ours. - menus, the dialog, the tooltip, the select, toasts, the wizard's steps, the number input and the toggle groups are all Ark's - `hooks/useDismissable.ts`, `utils/topLayer.ts`, and the toast store with its timer map are deleted - the dashboard filters and the create form's curve switch share the new `components/Pills` - generic icons come from `lucide-react`; `src/icons/` keeps only the brand and house marks, each renamed `*Mark` - `utils/popover.ts` holds the panel surface the three dropdowns share, and `components/Spinner` owns the spin animation Two behaviours worth naming. The toast region is portalled to `<body>`, which is what keeps it announced and clickable over an open dialog. The create form mounts a step's panel when the step is reached rather than when the dialog opens, because Ark hides a panel it is not on rather than unmounting it.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
…l position Follow-up to the Ark UI move, all in the vesting dApp. - The create dialog closed the moment it opened. Ark dismisses a layer when focus lands outside it, and mounting is what opens ours, so no Dialog.Trigger is registered for Ark to skip. The focus trap handing focus back to the button that opened the dialog then read as an interaction outside. Modal refuses that dismissal now; a press outside and Escape still close it. - Locking or disconnecting the wallet drops `?create=1`, so the dialog closes and does not reopen on the next connect. The connect prompt inside the dialog goes with it, along with the line about the receiver accepting. - The eye button had no hover state: `enabled:` only ever matches form controls, and that button renders a link. Every variant uses `not-disabled:` now. Icon buttons are 32px and sit closer together. - Opening a grant starts at the top of the page, through ScrollRestoration keyed on the pathname so the role and create params do not reset it. - Tooltips grew a tip and a 4px radius. Card titles are only as wide as their text and cut with an ellipsis. The wizard's steps are three bars that fill as you advance. - Only error toasts stay on screen, and copying a party id raises none.
Collaborator
Author
|
I checked out things manually and everything seems to be working as it did before. This is mostly mechanical replacements of hand-rolled components by Ark UI's. I'd say just check manually (the preview should work just fine AFAIK), skim or skip code, a deeper review is not worth our time. |
gabitoesmiapodo
marked this pull request as ready for review
September 4, 2026 13:59
vercel
Bot
temporarily deployed
to
Preview – demo.canton-dappbooster
September 4, 2026 14:20
Inactive
fernandomg
approved these changes
Sep 4, 2026
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
Closes #138
The demo app hand-rolled its dropdowns, tooltip, dialog, toasts, segmented controls and progress bar, so anyone studying it to learn Canton had to reverse-engineer our inventions. Every interactive control now comes from Ark UI, which wraps the same Zag machines the kit already resolves, so no second copy lands in the lock file.
Changes
Deviations
*Mark, so what stays hand-rolled is visible andXIconno longer collides with lucide's owncomponents/Spinnerkeeps the spin animation that left withSpinnerIconutils/popover.tsholds the panel surface the three dropdowns shareCopyButtonruns a caller's click handler instead of dropping it, so the copy control can be a menu itemAcceptance criteria
AccountMenuandRoleSelectuse ArkMenu, andhooks/useDismissable.tsis deletedToast, and the store and timer map inutils/toast.tsare deletedModaluses ArkDialog, andutils/topLayer.tsis deletedInfoTipuses ArkTooltipand opens on touchStepsinstead of astepcounterScheduleBaruses ArkProgressand reports its value to a screen readerNumberInputinstead of stripping characters by regexSelectuses ArkSelectlucide-react, and only the brand and house marks stay hand-rolledTest plan
Automated tests
pnpm installpnpm -C dapp/frontend testpnpm lint,pnpm typecheck,pnpm build,pnpm knip,pnpm docs:checkandpnpm run check:anatomyManual verification
pnpm run app:devBreaking changes
None.
Checklist
Screenshots