Portal the break-glass dialog to the body

Fixkamo-internal
Shipped
August 5, 2026 at 10:16 PM UTC
Author
kamo
Commit
385f682

Clicking break glass opened the dialog inside the nav rail instead of over the page. The overlay is a bare fixed-position motion.div, not a MUI Dialog, so it has no portal of its own and inherits whatever containing block its parent gives it. NavPri is position:fixed with overflow:hidden, so the overlay was clipped to the 80px rail. This was latent, not new: mounted from the root layout a fixed element under <body> fills the viewport, so nothing was wrong until the trigger moved. Moving it just revealed the missing portal. Fixed at the source. Loosening the rail's overflow would also have worked here and would have left the next component that mounts this dialog to rediscover the same bug — the dialog should be correct wherever it is rendered, not correct only where it happens to live today. Guarded on a mounted flag because document does not exist during SSR or on the first client render. Note for later: GodModeIndicator has the same shape — fixed positioning, no portal — and is fine only because it is still mounted at the root. If it ever moves it will break in exactly this way.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing