fix: dismiss branch hover card when mouse leaves to scrim

The fixed scrim was catching the mouse, keeping the hover alive
indefinitely. Now the scrim has onMouseEnter={() => setIsHovered(false)}
so moving the mouse anywhere off the expanded card dismisses it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-24 23:30:32 +00:00
parent 5eb99e35c1
commit b96f4a42bb

View File

@@ -97,8 +97,11 @@ export function BranchNode({ branch, depth, isActive, onClick }: BranchNodeProps
{/* Expanded card — floats directly on top of the base card */}
{showExpanded && (
<>
{/* Scrim behind to dim everything */}
<div className="fixed inset-0 z-40 bg-black/30" />
{/* Scrim behind to dim everything — dismisses on mouse enter */}
<div
className="fixed inset-0 z-40 bg-black/30"
onMouseEnter={() => setIsHovered(false)}
/>
{/* Expanded card positioned over the original */}
<div