diff --git a/apps/web/src/components/preview/ThreadPreviewMiniPlayer.tsx b/apps/web/src/components/preview/ThreadPreviewMiniPlayer.tsx index 9e59e56a24f0..4384019abbad 100644 --- a/apps/web/src/components/preview/ThreadPreviewMiniPlayer.tsx +++ b/apps/web/src/components/preview/ThreadPreviewMiniPlayer.tsx @@ -44,6 +44,8 @@ interface Props { readonly bottomInset: number; } +const PREVIEW_MINI_PLAYER_CORNER_RADIUS = 12; + // Invisible grab zones straddling each edge; the cursor is the only affordance. const RESIZE_HANDLES: ReadonlyArray<{ readonly direction: BrowserViewportResizeDirection; @@ -59,6 +61,10 @@ const RESIZE_HANDLES: ReadonlyArray<{ { direction: "southeast", className: "-bottom-2 -right-2 size-4 cursor-nwse-resize" }, ]; +/** + * Floats the thread's browser surface over chat. Native clipping and the DOM + * frame use the same radius so their separately composited edges stay aligned. + */ export function ThreadPreviewMiniPlayer({ threadRef, tabId, bottomInset }: Props) { const containerRef = useRef(null); const gestureRef = useRef(null); @@ -193,7 +199,13 @@ export function ThreadPreviewMiniPlayer({ threadRef, tabId, bottomInset }: Props aria-label="Floating browser preview" data-preview-mini-player={tabId} className="pointer-events-none absolute select-none" - style={{ left: frame.x, top: frame.y, width: frame.width, height: frame.height }} + style={{ + left: frame.x, + top: frame.y, + width: frame.width, + height: frame.height, + borderRadius: PREVIEW_MINI_PLAYER_CORNER_RADIUS, + }} >
-
+
-
+
{!desktopOverlay?.hasWebContents ? ( -
+
Reconnecting preview…
) : null}