The best way to control Claude Code, Codex and more from any computer or phone
feat(web): show recording status on floating previews (#11312)
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
maria committed
Sep 11, 2026 at 19:34 UTC
0eaa18c12936dffde078b277be91cbafa5758cb9
1 file changed
+28
-3
apps/web/src/components/preview/ThreadPreviewMiniPlayer.tsx
+28
-3
@@ -12,6 +12,10 @@ import {
12
} from "react";
13
14
import { BrowserSurfaceSlot } from "~/browser/BrowserSurfaceSlot";
15
+import {
16
+ findActiveBrowserRecordingRuntimeTabId,
17
+ useActiveBrowserRecordingTabIds,
18
+} from "~/browser/browserRecording";
19
import { useBrowserSurfaceStore } from "~/browser/browserSurfaceStore";
20
import type { BrowserViewportResizeDirection } from "~/browser/browserViewportLayout";
21
import { previewRuntimeTabId } from "~/browser/previewRuntimeTabId";
@@ -151,6 +155,10 @@ function BrowserMiniPlayer({
155
const previewState = useThreadPreviewState(threadRef);
156
const snapshot = previewState.sessions[tabId] ?? null;
157
const runtimeTabId = previewRuntimeTabId(threadRef, previewState.serverEpoch, tabId);
158
+ const recordingTabIds = useActiveBrowserRecordingTabIds();
159
+ const recording =
160
+ recordingTabIds.has(runtimeTabId) ||
161
+ findActiveBrowserRecordingRuntimeTabId(threadRef, tabId) !== null;
162
const desktopOverlay = previewState.desktopByTabId[tabId] ?? null;
163
const fittedSourceContent = useBrowserSurfaceStore(
164
(state) => state.byTabId[runtimeTabId]?.fittedSourceContent ?? null,
@@ -189,6 +197,7 @@ function BrowserMiniPlayer({
197
sourceSize={sourceSize}
198
composerOverlayElement={composerOverlayElement}
199
label="Floating browser preview"
200
+ recording={recording}
201
onOpenInPanel={openInPanel}
202
pillActions={
203
<Tooltip>
@@ -314,6 +323,7 @@ function MiniPlayerShell({
323
label,
324
onOpenInPanel,
325
pillActions,
326
+ recording = false,
327
cornerRadius = frameCornerRadius,
328
children,
329
}: {
@@ -324,6 +334,7 @@ function MiniPlayerShell({
334
readonly label: string;
335
readonly onOpenInPanel: () => void;
336
readonly pillActions?: ReactNode;
337
+ readonly recording?: boolean;
338
/** The clip radius for a given frame; the pill stays inside the curve. */
339
readonly cornerRadius?: (frame: PreviewMiniPlayerSize) => number;
340
readonly children: (frame: PreviewMiniPlayerFrame) => ReactNode;
@@ -443,9 +454,18 @@ function MiniPlayerShell({
454
style={{ right: pillInset, top: pillInset }}
455
>
456
<div
446
- aria-hidden="true"
447
- className="absolute right-0 top-0 size-2 rounded-full bg-foreground/25 shadow-sm ring-1 ring-background/70 transition-opacity group-hover:opacity-0 group-focus-within:opacity-0"
448
- />
457
+ role={recording ? "status" : undefined}
458
+ aria-label={recording ? "Recording preview" : undefined}
459
+ aria-hidden={!recording}
460
+ className="absolute right-0 top-0 size-2 transition-opacity group-hover:opacity-0 group-focus-within:opacity-0"
461
+ >
462
+ <span
463
+ className={cn(
464
+ "block size-2 rounded-full shadow-sm ring-1 ring-background/70",
465
+ recording ? "bg-red-500 motion-safe:animate-status-pulse" : "bg-foreground/25",
466
+ )}
467
+ />
468
+ </div>
469
<div
470
className="pointer-events-none absolute right-0 top-0 flex h-8 cursor-grab items-center gap-0.5 rounded-lg border border-border/80 bg-popover/92 p-0.5 opacity-0 shadow-lg/20 backdrop-blur-xl transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 group-focus-within:pointer-events-auto group-focus-within:opacity-100 active:cursor-grabbing"
471
onPointerDown={(event) => beginGesture(event, null)}
@@ -453,6 +473,11 @@ function MiniPlayerShell({
473
onPointerUp={endGesture}
474
onPointerCancel={endGesture}
475
>
476
+ {recording ? (
477
+ <span aria-hidden className="flex size-6 shrink-0 items-center justify-center">
478
+ <span className="size-2 rounded-full bg-red-500 motion-safe:animate-status-pulse" />
479
+ </span>
480
+ ) : null}
481
<Tooltip>
482
<TooltipTrigger
483
render={