CedarCopilot wants to merge 1 commit into staging from fix/cmdk-dialog-context-split
Live on prod, no production signal yet
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``.
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 packageDialogPrimitive.Content imported straight from @radix-ui/react-dialogTwo 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.
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.pnpm --filter @zero/mail run types cleanpnpm --filter @zero/mail exec jest tests/modules/conversations/conversationSearchFilterRow.test.tsx , 7/7 passingNot yet clicked through in a browser; worth opening Cmd+K on the deploy preview.
🤖 Generated with Claude Code
This PR fixes the Cmd+K crash by ensuring the command palette’s dialog content and root use the same Radix module instance.
@radix-ui/react-dialog import with the Dialog namespace exported by radix-ui.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.
| Filename | Overview |
|---|---|
| apps/mail/modules/conversations/components/ConversationSearchCommandBar.tsx | Aligns 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.tsx | Updates 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
Libra has not measured any production surfaces for this change yet.