Skip to content

Consolidate UI primitives onto base-ui (drop radix-ui)#179

Merged
chloeilabs merged 1 commit into
mainfrom
claude/consolidate-ui-base-ui
Jun 15, 2026
Merged

Consolidate UI primitives onto base-ui (drop radix-ui)#179
chloeilabs merged 1 commit into
mainfrom
claude/consolidate-ui-base-ui

Conversation

@chloeilabs

Copy link
Copy Markdown
Owner

What & why

Consolidates the app onto a single UI primitive library. The 5 remaining radix-ui components (button, dropdown-menu, popover, tooltip, hover-card) are migrated to their @base-ui/react equivalents — matching the configured base-lyra shadcn style the other 7 UI components already use. Removes the radix-ui dependency (and its ~30 @radix-ui/* transitive packages — the lockfile shrinks ~2,400 lines).

Component mapping

radix base-ui
Slot/asChild button plain <button> (the one asChild consumer, not-found, applies buttonVariants to its <Link>)
DropdownMenu Menu — item highlight via data-highlighted; Label/Separator are styled <div>s (base-ui Menu has no such parts)
Popover Popover
Tooltip Tooltip
HoverCard PreviewCard

Overlays use base-ui's Root → Trigger → Portal → Positioner → Popup structure.

Behavioral translations (consumer API preserved)

  • asChild is shimmed to base-ui's render prop inside each Trigger wrapper, so the existing <XTrigger asChild> call sites are unchanged.
  • onCloseAutoFocus(preventDefault) → base-ui finalFocus callback (returns false to hold focus, or the textarea element to redirect it — preserving the model-selector / tools-popover focus behavior).
  • Animations: radix data-[state=open/closed] → base-ui data-starting-style/data-ending-style; --radix-* CSS vars → --transform-origin / --available-height / --anchor-width.
  • HoverCard delays moved from Root to Trigger (base-ui's API).

Verification

pnpm typecheck ✓ · pnpm lint (zero warnings) ✓ · pnpm format:check ✓ · pnpm test234 passing ✓ · pnpm build ✓ · mock smoke — 8/8 ✓ (exercises the model-selector popover, tooltips, sidebar).

⚠️ Please review interactively before merging

Automated tests can't verify the visual/interaction correctness of overlays. Worth a manual pass on a preview deploy:

  • Dropdown (account menu / thread "⋯" menu): open/close, hover highlight, keyboard nav, the account menu width matching its trigger (--anchor-width), destructive item styling.
  • Popover (model selector, tools popover): positioning, open/close animation, and that focus returns to the textarea after selecting (not the trigger).
  • Tooltips (sidebar, prompt-form buttons): appear above triggers, ⌘.-style shortcut chips, mobile hidden (md:flex).
  • Hover card (inline source citations): open/close delay feel.

This is the last item from the post-#177/#178 cleanup audit; opening for review rather than auto-merging given the above.

https://claude.ai/code/session_01SoqKN492M4vHKaZE1vD7oq


Generated by Claude Code

Migrates the 5 remaining radix-ui components (button, dropdown-menu, popover,
tooltip, hover-card) to their @base-ui/react equivalents, so the app uses a
single UI primitive library (base-ui, matching the configured base-lyra shadcn
style). Removes the radix-ui dependency and its ~30 @radix-ui/* transitive
packages.

Component mapping:
- button: radix Slot/asChild -> plain <button>; the one asChild consumer
  (not-found) now applies buttonVariants to its <Link> directly.
- dropdown-menu -> base-ui Menu (item highlight via data-highlighted; Label
  and Separator rendered as styled divs, since base-ui Menu has no such parts).
- popover -> base-ui Popover; tooltip -> base-ui Tooltip; hover-card ->
  base-ui PreviewCard (Portal -> Positioner -> Popup structure).

Behavioral translations (consumer API preserved):
- asChild is shimmed to base-ui's `render` prop inside each Trigger wrapper,
  so the existing `<XTrigger asChild>` call sites are unchanged.
- onCloseAutoFocus(preventDefault) -> base-ui `finalFocus` callback (returns
  false to hold focus, or the textarea element to redirect it).
- radix data-[state=open/closed] animations -> base-ui data-starting-style /
  data-ending-style; --radix-* CSS vars -> base-ui --transform-origin /
  --available-height / --anchor-width.
- hover-card open/close delays moved from Root to Trigger (base-ui's API).

Verified: typecheck, lint, format, 234 unit tests, production build, and the
8-case mock authenticated-chat smoke all pass.

https://claude.ai/code/session_01SoqKN492M4vHKaZE1vD7oq
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@chloeilabs, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 31 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e742b71f-34b9-448a-8d1d-ee5e76a75a3a

📥 Commits

Reviewing files that changed from the base of the PR and between 77ef576 and 5447c66.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (12)
  • package.json
  • src/app/not-found.tsx
  • src/components/agent/home/scroll-to-bottom.tsx
  • src/components/agent/prompt-form/model-selector.tsx
  • src/components/agent/prompt-form/prompt-form.tsx
  • src/components/nav-user.tsx
  • src/components/ui/button.tsx
  • src/components/ui/dropdown-menu.tsx
  • src/components/ui/hover-card.tsx
  • src/components/ui/popover.tsx
  • src/components/ui/source.tsx
  • src/components/ui/tooltip.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/consolidate-ui-base-ui

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chloei Ready Ready Preview, Comment Jun 15, 2026 12:25am

@chloeilabs chloeilabs merged commit d82421b into main Jun 15, 2026
7 checks passed
@chloeilabs chloeilabs deleted the claude/consolidate-ui-base-ui branch June 15, 2026 00:31
@chloeilabs chloeilabs mentioned this pull request Jun 15, 2026
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.

2 participants