Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

fix(cmd-k): put the palette's Content on the same Radix copy as its Dialog

merged#2658CedarCopilot

CedarCopilot wants to merge 1 commit into staging from fix/cmdk-dialog-context-split

Live on prod, no production signal yetTimeline and evidence
  1. Opened
    Sep 2, 2026, 8:05 AM
  2. Merged
    Sep 2, 2026, 8:12 AM
  3. Live on prod
    Sep 2, 2026, 8:12 AM
  4. Observed 0 hours
    Sep 2, 2026, 8:12 AM
  5. Unobserved

    Live on prod, no production signal yet

    Sep 2, 2026, 8:12 AM
  6. Pipelines steady after this deploy
    Sep 2, 2026, 8:12 AM
  7. Sep 2, 2026, 8:12 AM

Behaviors Libra is checking

Opening the cmd-k conversation search palette renders its Dialog Content successfully without the Radix error caused by mixing separate Dialog React contexts.Not checked
prod

Libra has verdicts on 0 of 1 tracked behaviors on prod; 1 is still being checked. Libra checks hourly for 3 days after each deploy.

Cmd+K crashed the app with \DialogContent` must be used within `Dialog``.

Cause

The command bar assembled its dialog tree out of two different copies of Radix's dialog module:

  • Dialog, DialogPortal, DialogOverlay from @/components/ui/dialog, which sits on the radix-ui package
  • DialogPrimitive.Content imported straight from @radix-ui/react-dialog

Two copies means two React contexts. Content looked for a provider that its own copy had never rendered, so it threw as soon as the palette opened. The reported stack shows it: DialogContent from chunk-KGNVOM74 reading useContext2 out of chunk-TI3ZTVJK, two separate Vite dep chunks.

This is the failure mode CLAUDE.md already warns about ("import every floating primitive from radix-ui"), and the header of components/ui/dialog.tsx documents the Escape-key half of the same split.

Change

  • ConversationSearchCommandBar.tsx imports { Dialog as DialogPrimitive } from 'radix-ui', with a comment saying why.
  • conversationSearchFilterRow.test.tsx builds its stand-in dialog from the same copy, so the test exercises the tree the app actually renders.

Verification

  • pnpm --filter @zero/mail run types clean
  • pnpm --filter @zero/mail exec jest tests/modules/conversations/conversationSearchFilterRow.test.tsx , 7/7 passing

Not yet clicked through in a browser; worth opening Cmd+K on the deploy preview.

🤖 Generated with Claude Code

Greptile Summary

This PR fixes the Cmd+K crash by ensuring the command palette’s dialog content and root use the same Radix module instance.

  • Replaces the direct @radix-ui/react-dialog import with the Dialog namespace exported by radix-ui.
  • Updates the conversation search filter-row test fixture to construct its dialog from the same package copy.

Confidence Score: 5/5

The PR appears safe to merge, with the changed imports consistently using the same Radix dialog module copy.

The application and test now use the established radix-ui Dialog namespace, whose exported members match all changed call sites and the existing shared dialog implementation.

Important Files Changed

FilenameOverview
apps/mail/modules/conversations/components/ConversationSearchCommandBar.tsxAligns DialogPrimitive.Content with the radix-ui copy used by the surrounding dialog root, preventing the cross-context runtime exception.
apps/mail/tests/modules/conversations/conversationSearchFilterRow.test.tsxUpdates the test dialog wrapper to use the same Radix export shape and module copy as production.

Reviews (1): Last reviewed commit: "fix(cmd-k): put the palette's Content on..." | Re-trigger Greptile

Show production surfaces and changed-file mapping

Production surfaces

Libra has not measured any production surfaces for this change yet.

Changed files → surfaces

  • apps/mail/modules/conversations/components/ConversationSearchCommandBar.tsxno production surface mapped
  • apps/mail/tests/modules/conversations/conversationSearchFilterRow.test.tsxno production surface mapped