fix(web): dialogs and palettes no longer render under the composer slash menu - #8152
Conversation
The composer command drawer portals to document.body at z-70, while dialog, alert-dialog, command-palette, and sheet overlays sat at z-50. Opening any of them while the slash menu was up (for example New thread or Add project in the sidebar) rendered the modal underneath the menu. Raise the modal overlay layer to z-80: above the composer drawer (70), below toasts (100) and popups (130), so no other layering changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused six-line stacking-order correction across existing dialog, palette, alert-dialog, and sheet primitives. It places these overlays above the composer menu while preserving the surrounding UI layer hierarchy, with no new logic or broader runtime surface. You can add or adjust custom eligibility rules. Learn more. |
What Changed
Raised the modal overlay layer (dialog, alert dialog, command palette, sheet — backdrops and viewports) from
z-50toz-[80]. Six class strings across five files inapps/web/src/components/ui/; no logic changes.Why
The composer's
/and$menus portal todocument.bodyatz-[70](added in #4365 so they win over page content). Modal overlays sat atz-50, so opening one while a slash menu was up — for example clicking New thread or Add project in the sidebar — drew the modal underneath the menu.Moving the modal layer to 80 slots it above the composer drawer (70) and below toasts (100) and popups/menus/selects (130), so the only relationship that changes is the broken one. Lowering the drawer instead would have re-exposed the page-content stacking bug that 70 was picked to fix.
Reproduced and verified in the web app; the desktop app wraps the same UI.
UI Changes
Slash menu open, then sidebar → New project:
Checklist
Verified with
tsgo --noEmit,vp lint+vp fmt --checkon the changed files, andvp test run apps/web/src/components/ui/command.test.tsx.Implemented by Claude Fable 5 running in Claude Code.
🤖 Generated with Claude Code
Note
Low Risk
Tailwind z-index-only changes in shared UI primitives; no auth, data, or runtime logic.
Overview
Fixes modals and palettes rendering under the composer
/and$menus when both are open (e.g. slash menu up, then New thread / Add project from the sidebar).Modal overlay stacking is bumped from
z-50toz-[80]on shared dialog backdrops (dialog-styles.ts) and on viewports/backdrops for dialog, alert-dialog, command palette, and sheet — six class strings, no behavior changes. That puts overlays above the composer menu layer atz-[70]while staying below toasts (100) and popover-style UI (130).Reviewed by Cursor Bugbot for commit 0545018. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Raise z-index of dialogs, sheets, and command palettes from
z-50toz-[80]Updates the
z-indexutility class across the dialog, alert dialog, command palette, and sheet viewports and backdrops so they stack above the composer slash menu. Changes span dialog.tsx, alert-dialog.tsx, command.tsx, sheet.tsx, and dialog-styles.ts.Macroscope summarized 0545018.