From e49779681d97e0591198094fe84c40bd08d40b9c Mon Sep 17 00:00:00 2001 From: ciregenz Date: Tue, 18 Aug 2026 13:17:27 -0700 Subject: [PATCH] [eric] canvas: a collapsed chat's browser is parked or a 320px miniature at EVERY stage (drag/resize/capture included), and the attachment never casts a shadow --- .../src/app/pages/Dashboard/cards/BrowserCard.tsx | 11 +++++++---- .../app/pages/Dashboard/desktop/AgentNarratorPill.tsx | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/pages/Dashboard/cards/BrowserCard.tsx b/frontend/src/app/pages/Dashboard/cards/BrowserCard.tsx index e899093c..f7fc5480 100644 --- a/frontend/src/app/pages/Dashboard/cards/BrowserCard.tsx +++ b/frontend/src/app/pages/Dashboard/cards/BrowserCard.tsx @@ -1175,8 +1175,11 @@ const BrowserCard: React.FC = ({ // leaves it behind. An agent-driven browser skips the park (above), so it painted itself over // wherever the chat USED to be, sometimes exactly on the chat's own header, where a press grabs the // browser and drags that instead of the chat. Follow the parent's live rect while it is collapsed. + // NO exclusions for dragging/resize/capture-wait: any gap here rendered the FULL-SIZE card + // halfway up the pill during transient states (thinking, mid-capture, mid-drag; Eric's shots x3). + // Collapsed parent = parked or 320px miniature, at every stage, no third state. const followsParent = !!dockedTo && !!dockParentCard && !dockParentExpanded && !dockParked - && !dragging && !localResize && !isTiled && !isMinimized && !keepAliveHidden; + && !isTiled && !isMinimized && !keepAliveHidden; // Tell the pill a live miniature is underneath it, so it suppresses its own artifacts instead of // stacking a widget/frozen shot on top of the browser (Eric's overlap screenshots). useEffect(() => { @@ -1269,12 +1272,12 @@ const BrowserCard: React.FC = ({ // Docked = a TRUE miniature: the card keeps its full-size layout and shrinks by uniform // transform (centered in the slot), so the page never reflows and agent clicks stay valid. // Resizing the webview to the slot re-rendered the page as a narrow window, which is wrong. - left: keepAliveHidden || isMinimized || dockParked ? -100000 : (dockActive ? dockRect!.x + (dockRect!.w - displayW * Math.min(dockRect!.w / displayW, dockRect!.h / displayH)) / 2 : (dragging ? cardX : (followX ?? displayX))), - top: dockActive ? dockRect!.y + (dockRect!.h - displayH * Math.min(dockRect!.w / displayW, dockRect!.h / displayH)) / 2 : (dragging ? cardY : (followY ?? displayY)), + left: keepAliveHidden || isMinimized || dockParked ? -100000 : (dockActive ? dockRect!.x + (dockRect!.w - displayW * Math.min(dockRect!.w / displayW, dockRect!.h / displayH)) / 2 : (followX ?? (dragging ? cardX : displayX))), + top: dockActive ? dockRect!.y + (dockRect!.h - displayH * Math.min(dockRect!.w / displayW, dockRect!.h / displayH)) / 2 : (followY ?? (dragging ? cardY : displayY)), // Following a collapsed pill = a TRUE 320px miniature (uniform scale, no reflow, agent // coordinates stay valid), the same contract as the in-chat dock; full-size beside a pill // read as a detached window and buried the pill (Eric's 1.7.7 comparison). - transform: tiledSize ? undefined : (dragging ? `translate3d(${dragTx}px, ${dragTy}px, 0)` : dockActive ? `scale(${Math.min(dockRect!.w / displayW, dockRect!.h / displayH)})` : followsParent ? `scale(${Math.min(1, 320 / displayW)})` : undefined), + transform: tiledSize ? undefined : (dragging ? `translate3d(${dragTx}px, ${dragTy}px, 0)${followsParent ? ` scale(${Math.min(1, 320 / displayW)})` : ''}` : dockActive ? `scale(${Math.min(dockRect!.w / displayW, dockRect!.h / displayH)})` : followsParent ? `scale(${Math.min(1, 320 / displayW)})` : undefined), transformOrigin: tiledSize || dockActive || followsParent ? '0 0' : undefined, width: tiledSize ? tiledSize.width : displayW, height: tiledSize ? tiledSize.height : displayH, diff --git a/frontend/src/app/pages/Dashboard/desktop/AgentNarratorPill.tsx b/frontend/src/app/pages/Dashboard/desktop/AgentNarratorPill.tsx index 9a999340..645dfd07 100644 --- a/frontend/src/app/pages/Dashboard/desktop/AgentNarratorPill.tsx +++ b/frontend/src/app/pages/Dashboard/desktop/AgentNarratorPill.tsx @@ -171,7 +171,7 @@ function AgentNarratorPill({ label, running, todos, liveSteps, artifact, askPair component="img" src={browserShot} alt="" - sx={{ width: 320, display: 'block', borderRadius: '12px', boxShadow: '0 10px 30px rgba(0,0,0,0.35)' }} + sx={{ width: 320, display: 'block', borderRadius: '12px' }} /> ) : visibleTodos.length > 0 ? (