Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions frontend/src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -134,12 +135,21 @@ function FloatingDock() {

return (
<div ref={containerRef} className="fixed bottom-6 right-6 z-50 flex flex-col items-center gap-4">
{/* Companion */}
{/* Companion — the panel is portaled to <body> 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. */}
<div className="relative">
{/* Hidden while the queue popup is open — its translucent glass would otherwise reveal this glowing button behind it */}
<div className={open ? 'opacity-0 pointer-events-none transition-opacity' : 'transition-opacity'}>
<CompanionFloatingButton open={isGlobalPanelOpen} onClick={toggleCompanion} />
</div>
</div>
{createPortal(
<AnimatePresence>
{isGlobalPanelOpen && (
<motion.div
className="absolute bottom-full right-0 mb-3"
className="fixed bottom-24 right-6 z-100"
style={{ transformOrigin: 'bottom right' }}
initial={{ opacity: 0, scale: 0.88, y: 10 }}
animate={{ opacity: 1, scale: 1, y: 0 }}
Expand All @@ -149,12 +159,9 @@ function FloatingDock() {
<GlobalCompanionPanel />
</motion.div>
)}
</AnimatePresence>
{/* Hidden while the queue popup is open — its translucent glass would otherwise reveal this glowing button behind it */}
<div className={open ? 'opacity-0 pointer-events-none transition-opacity' : 'transition-opacity'}>
<CompanionFloatingButton open={isGlobalPanelOpen} onClick={toggleCompanion} />
</div>
</div>
</AnimatePresence>,
document.body,
)}

{/* Daily Review */}
<div className="relative">
Expand Down
Loading