refactor(overlay): single overlay-root convention via Overlay helper

Add components/Overlay.tsx (portals to <body>) and route the in-tree full-screen/
floating holdouts through it — ChatDock, OnboardingWizard, GlassTuner — so they
escape any ancestor stacking context (mask/transform/backdrop-filter) instead of
relying on a bare high z-index. Toaster stays in-tree (it's content-column-scoped
by design, outside the masked scroller); Welcome is a page, not an overlay.
This commit is contained in:
2026-07-18 19:11:38 +02:00
parent c91caffa5e
commit 6075e96bd0
4 changed files with 31 additions and 8 deletions
+4 -1
View File
@@ -1,4 +1,5 @@
import { useEffect, useMemo, useState } from "react";
import Overlay from "./Overlay";
/**
* A floating live appearance tuner. Mounted at the app root so it's reachable on every page; it
@@ -216,7 +217,8 @@ export default function GlassTuner({ enabled }: { enabled: boolean }) {
if (!enabled) return null;
return (
<div className="fixed right-0 top-24 z-[9999] flex items-start" style={{ pointerEvents: "none" }}>
<Overlay>
<div className="fixed right-0 top-24 z-tuner flex items-start" style={{ pointerEvents: "none" }}>
{!open && (
<button
onClick={() => persistOpen(true)}
@@ -335,6 +337,7 @@ export default function GlassTuner({ enabled }: { enabled: boolean }) {
</div>
)}
</div>
</Overlay>
);
}