From 41faea240595e31ee9fdbc5d6821a2bbf137ee43 Mon Sep 17 00:00:00 2001 From: Ross and Zober Date: Fri, 29 May 2026 22:28:23 +0700 Subject: [PATCH] fix: portal global companion panel above modal dialogs The panel rendered in the app-tree dock at z-50; Radix modal dialogs portal to at z-50 and paint later, covering it (and the blurred overlay hid it). Portal the panel to at z-100 (below the z-9999 selection menu, above dialogs) so 'Chat with Companion' from inside a popup layers on top and stays interactive. --- frontend/src/app/App.tsx | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/App.tsx b/frontend/src/app/App.tsx index d11ca42..20929a1 100644 --- a/frontend/src/app/App.tsx +++ b/frontend/src/app/App.tsx @@ -1,6 +1,7 @@ import { Loader2 } from 'lucide-react' import { AnimatePresence, motion } from 'motion/react' import { lazy, Suspense, useEffect, useRef, useState } from 'react' +import { createPortal } from 'react-dom' import { createBrowserRouter, Outlet, RouterProvider, useLocation, useRouteError } from 'react-router-dom' import { ErrorBoundary } from '@/app/ErrorBoundary' import { ErrorScreen } from '@/app/ErrorScreen' @@ -134,12 +135,21 @@ function FloatingDock() { return (
- {/* Companion */} + {/* Companion — the panel is portaled to at a high z-index so it + layers ABOVE modal dialogs (Radix dialogs portal to body at z-50 and, + being modal, would otherwise cover/inert an in-tree panel). The + floating button stays in the dock. */}
+ {/* Hidden while the queue popup is open — its translucent glass would otherwise reveal this glowing button behind it */} +
+ +
+
+ {createPortal( {isGlobalPanelOpen && ( )} - - {/* Hidden while the queue popup is open — its translucent glass would otherwise reveal this glowing button behind it */} -
- -
-
+ , + document.body, + )} {/* Daily Review */}