From 820025bbee787c4626b0fdb81d4637fa24a12e0c Mon Sep 17 00:00:00 2001 From: brennanb2025 Date: Mon, 1 Jun 2026 04:27:24 -0700 Subject: [PATCH] Polish computer use setup animation Co-authored-by: Orca --- .../ComputerUseAnimatedVisual.tsx | 145 ++++++++++-------- 1 file changed, 79 insertions(+), 66 deletions(-) diff --git a/src/renderer/src/components/feature-wall/ComputerUseAnimatedVisual.tsx b/src/renderer/src/components/feature-wall/ComputerUseAnimatedVisual.tsx index 52fd7109e8e..33bf2553bfb 100644 --- a/src/renderer/src/components/feature-wall/ComputerUseAnimatedVisual.tsx +++ b/src/renderer/src/components/feature-wall/ComputerUseAnimatedVisual.tsx @@ -1,4 +1,4 @@ -import { useEffect, useLayoutEffect, useRef, useState, type JSX } from 'react' +import { useEffect, useLayoutEffect, useRef, useState, type JSX, type ReactNode } from 'react' import { GitBranch } from 'lucide-react' import { cn } from '@/lib/utils' import { ClaudeIcon } from '../status-bar/icons' @@ -8,7 +8,7 @@ import { CursorIcon } from './feature-tour-preview-glyphs' type ComputerUsePhase = 'inspect' | 'target' | 'click' | 'verified' const PHASES: readonly ComputerUsePhase[] = ['inspect', 'target', 'click', 'verified', 'verified'] -const PHASE_MS = 1100 +const PHASE_MS = 1350 // Why: the visual must read as "an agent in an Orca worktree drives the // local app via the `orca computer` CLI" — each command on the left causes @@ -47,13 +47,13 @@ export function ComputerUseAnimatedVisual(props: { const containerRect = container.getBoundingClientRect() const buttonRect = button.getBoundingClientRect() - const buttonX = buttonRect.left - containerRect.left + buttonRect.width / 2 + const buttonX = buttonRect.left - containerRect.left + buttonRect.width * 0.78 const buttonY = buttonRect.top - containerRect.top + buttonRect.height / 2 const startX = containerRect.width * 0.35 const startY = containerRect.height * 0.35 - if (phase === 'inspect') { + if (phase === 'inspect' || phase === 'verified') { setCursorCoords({ x: startX, y: startY, visible: false }) } else { setCursorCoords({ x: buttonX, y: buttonY, visible: true }) @@ -88,13 +88,13 @@ export function ComputerUseAnimatedVisual(props: {
-
-
-
+
+
+
-
-
-
-
+
+
+
{WORKTREE_LABEL}
-
- - + + ● + Claude Code session started + + + > + approve the note in my app + + - found “Approve” [#7] - - ) : null - } /> - + found “Approve” [#7] + + click sent : null} /> - + click sent + + - → computer - - ) : null - } /> + + status: approved +
) } -function TerminalRequest(props: { text: string }): JSX.Element { - return ( -
- {props.text} -
- ) -} - -function CliCommandBlock(props: { - commandLines: readonly string[] +function ComputerActionLine(props: { + action: string + target: string active: boolean done: boolean - output: JSX.Element | null }): JSX.Element { - const commandTone = props.active || props.done ? 'text-foreground' : 'text-muted-foreground/65' return ( -
-
$
-
- {props.commandLines.map((line) => ( -
- {line} -
- ))} -
-
- {props.output ?? ' '} -
+ + {props.done ? ✓ : } + {props.action} + {props.target} + + ) +} + +function TerminalLine(props: { + children: ReactNode + muted?: boolean + wrap?: boolean + indent?: boolean + visible?: boolean +}): JSX.Element { + const visible = props.visible ?? true + return ( +
+ {props.children}
) } +function RunSpinner(): JSX.Element { + return ( + + ) +} + function useComputerUsePhase( reducedMotion: boolean, onCycleComplete?: () => void