From 0b34994ae4916b5ccd85adfecfc897fec8fcf14b Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Mon, 22 Jun 2026 09:14:51 -0700 Subject: [PATCH] fix(dashboard): put floating-modal z-index on the overlay, not the panel (fixes overlap + tap-to-front) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Verified against the live DOM: a panel z-index is trapped inside the position:fixed overlay's stacking context, so page elements that are themselves stacking contexts in body (the right dock at position:absolute z-index:20, card badge contexts) painted OVER the modal, and tap-to-front (which raised the panel z) had no effect at the body level. Move the dynamic shared-stack z onto each modal's fixed overlay (FloatingWindow, RightDockExpandModal, TerminalModal floating, NewTaskModal floating) so the whole window sits at the shared band in body's stacking context — modals now paint above all page content and tapping reliably brings a window to the front across types. Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/dashboard/app/components/FloatingWindow.tsx | 2 ++ packages/dashboard/app/components/NewTaskModal.tsx | 2 ++ .../app/components/RightDockExpandModal.tsx | 2 +- packages/dashboard/app/components/TerminalModal.tsx | 12 +++++------- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/dashboard/app/components/FloatingWindow.tsx b/packages/dashboard/app/components/FloatingWindow.tsx index 57dff2a1d8..9941767ed6 100644 --- a/packages/dashboard/app/components/FloatingWindow.tsx +++ b/packages/dashboard/app/components/FloatingWindow.tsx @@ -276,6 +276,8 @@ export function FloatingWindow({ role="dialog" aria-modal="false" data-testid={`floating-window-overlay-${windowKey}`} + // FNXC:FloatingWindow 2026-06-22-23:00: The z-index MUST live on the position:fixed overlay (which creates a stacking context), not the panel. A panel z-index is trapped inside the overlay's context and loses to page elements that are stacking contexts in body's context (e.g. the right dock at position:absolute z-index:20). With z on the overlay, the whole window sits at the shared floating band in body's stacking context and reliably paints above page content + tap-to-front reorders correctly. + style={{ zIndex }} >
+
0 - ? { - "--overlay-padding-top": "0px", - } as CSSProperties - : undefined - } + style={{ + // FNXC:FloatingWindow 2026-06-22-23:00: In floating mode the z-index lives on the fixed overlay (it owns the stacking context); a panel z is trapped inside it and loses to page stacking contexts like the right dock (position:absolute z-index:20). Docked/mobile keep their CSS z. + ...(isFloatingMode ? { zIndex: floatingZ } : {}), + ...(keyboardOverlap > 0 ? { "--overlay-padding-top": "0px" } : {}), + } as CSSProperties} >