Skip to content

An open-source, faster Devin alternative

TypeScript

Computer: setup cards level by construction, and a faint pixel scene

Slack U06H7D98X40a15169d4abf8
diff --git a/web/src/managed-agents/Computer.tsx b/web/src/managed-agents/Computer.tsx
index d37e1e02..4a1341ab 100644
--- a/web/src/managed-agents/Computer.tsx
+++ b/web/src/managed-agents/Computer.tsx
@@ -47,6 +47,7 @@ import {
import { notifyError, notifySuccess } from '@/lib/errors'
import { cn } from '@/lib/utils'
import { useTransientFlag } from '@/lib/use-transient-flag'
+import { PixelScene } from './pixel-scene'
import { AuthContext } from '@/hooks/useAuth'
import { addManagedGitHubConnection } from './api'
import { launchAuthorizationWindow } from './authorization-window'
@@ -615,65 +616,65 @@ function Setup({
id === step ? 'current' : done[id] ? 'done' : 'upcoming'
return (
<WithDeveloperFooter>
- <div className="grid gap-x-12 gap-y-10 lg:grid-cols-[minmax(0,42rem)_18rem]">
- <div className="space-y-6">
- {notice}
- <header>
- <div className="flex items-center justify-between gap-4">
- <p className="text-muted-foreground text-sm font-medium">
- Step {position} of {SETUP_STEPS.length}
- </p>
- {/* Before Slack there is no computer to report on. */}
- {computer || status.slack.installed ? (
- <StatusLabel status={status} failedToCreate={failedToCreate} />
- ) : null}
- </div>
- <h1 className="mt-1 text-xl font-semibold tracking-tight">
- {step === 'hello'
- ? 'Give it a first task'
- : 'Set up your computer'}
- </h1>
- <div className="mt-4 flex gap-1.5" aria-hidden>
- {SETUP_STEPS.map((id) => (
- <span
- key={id}
- className={cn(
- 'h-1 flex-1 rounded-full transition-colors',
- done[id]
- ? 'bg-primary'
- : id === step
- ? 'bg-primary/35'
- : 'bg-muted',
- )}
- />
- ))}
- </div>
- </header>
-
- {failed ? (
- <div
- role="alert"
- className="border-destructive/40 bg-destructive/5 flex flex-wrap items-center gap-4 rounded-xl border px-5 py-4"
- >
- <TriangleAlert
- className="text-destructive size-4 shrink-0"
- aria-hidden
+ <div className="space-y-6">
+ {notice}
+ <header className="max-w-2xl">
+ <div className="flex items-center justify-between gap-4">
+ <p className="text-muted-foreground text-sm font-medium">
+ Step {position} of {SETUP_STEPS.length}
+ </p>
+ {/* Before Slack there is no computer to report on. */}
+ {computer || status.slack.installed ? (
+ <StatusLabel status={status} failedToCreate={failedToCreate} />
+ ) : null}
+ </div>
+ <h1 className="mt-1 text-xl font-semibold tracking-tight">
+ {step === 'hello' ? 'Give it a first task' : 'Set up your computer'}
+ </h1>
+ <div className="mt-4 flex gap-1.5" aria-hidden>
+ {SETUP_STEPS.map((id) => (
+ <span
+ key={id}
+ className={cn(
+ 'h-1 flex-1 rounded-full transition-colors',
+ done[id]
+ ? 'bg-primary'
+ : id === step
+ ? 'bg-primary/35'
+ : 'bg-muted',
+ )}
/>
- <div className="min-w-0 flex-1">
- <p className="text-sm font-medium">
- Your computer could not start.
- </p>
- <p className="text-muted-foreground mt-0.5 text-sm">
- {failedToCreate
- ? createError.message
- : (computer?.lastError ??
- 'Try again, or tell us if it keeps happening.')}
- </p>
- </div>
- <RetryButton creating={creating} onRetry={onRetry} />
+ ))}
+ </div>
+ </header>
+
+ {failed ? (
+ <div
+ role="alert"
+ className="border-destructive/40 bg-destructive/5 flex max-w-2xl flex-wrap items-center gap-4 rounded-xl border px-5 py-4"
+ >
+ <TriangleAlert
+ className="text-destructive size-4 shrink-0"
+ aria-hidden
+ />
+ <div className="min-w-0 flex-1">
+ <p className="text-sm font-medium">
+ Your computer could not start.
+ </p>
+ <p className="text-muted-foreground mt-0.5 text-sm">
+ {failedToCreate
+ ? createError.message
+ : (computer?.lastError ??
+ 'Try again, or tell us if it keeps happening.')}
+ </p>
</div>
- ) : null}
+ <RetryButton creating={creating} onRetry={onRetry} />
+ </div>
+ ) : null}
+ {/* The steps and their context share a row, so the two cards' top
+ edges line up by construction. */}
+ <div className="grid gap-x-12 gap-y-14 lg:grid-cols-[minmax(0,42rem)_18rem] lg:items-start">
<ol className="bg-panel divide-y overflow-hidden rounded-xl border shadow-sm">
<SetupItem
number={1}
@@ -745,8 +746,8 @@ function Setup({
</p>
</SetupItem>
</ol>
+ <SetupContext step={step} />
</div>
- <SetupContext step={step} />
</div>
</WithDeveloperFooter>
)
@@ -758,7 +759,7 @@ function Setup({
*/
function SetupContext({ step }: { step: SetupStep }) {
return (
- <aside aria-label="About your computer" className="text-sm lg:pt-[4.5rem]">
+ <aside aria-label="About your computer" className="relative text-sm">
{step === 'slack' ? (
<>
<ContextHeading>How it works</ContextHeading>
@@ -793,13 +794,16 @@ function SetupContext({ step }: { step: SetupStep }) {
</ul>
</>
)}
+ <PixelScene asleep={step === 'slack'} className="mt-12" />
</aside>
)
}
function ContextHeading({ children }: { children: ReactNode }) {
return (
- <h2 className="text-muted-foreground mb-3 text-xs font-medium tracking-wide uppercase">
+ // Above the aside on wide screens, so the card below it starts level
+ // with the steps.
+ <h2 className="text-muted-foreground mb-3 text-xs font-medium tracking-wide uppercase lg:absolute lg:bottom-full lg:left-0">
{children}
</h2>
)
diff --git a/web/src/managed-agents/pixel-scene.tsx b/web/src/managed-agents/pixel-scene.tsx
new file mode 100644
index 00000000..8a0602a9
--- /dev/null
+++ b/web/src/managed-agents/pixel-scene.tsx
@@ -0,0 +1,193 @@
+import { useSyncExternalStore } from 'react'
+import { cn } from '@/lib/utils'
+
+// A faint pixel-art scene under the setup context: the computer, a cactus
+// and a couple of clouds, in the spirit of Chrome's offline dinosaur. Pure
+// decoration (Igor, 2026-10-13: "subtle, pixelated, nerdy, not contrast"), so
+// it is hidden from assistive tech and holds still for reduced motion.
+
+/** Rows of pixels: `#` is on, anything else is off. */
+type Sprite = readonly string[]
+
+const MONITOR: Sprite = [
+ '.############.',
+ '#............#',
+ '#............#',
+ '#............#',
+ '#............#',
+ '#............#',
+ '#............#',
+ '#............#',
+ '.############.',
+ '......##......',
+ '....######....',
+]
+const EYES_OPEN: Sprite = ['...##....##...', '...##....##...']
+const EYES_SHUT: Sprite = ['..............', '..###....###..']
+const SMILE: Sprite = ['....#....#....', '.....####.....']
+const CACTUS: Sprite = [
+ '..#..',
+ '..#..',
+ '#.#..',
+ '#.#.#',
+ '###.#',
+ '..###',
+ '..#..',
+ '..#..',
+]
+const CLOUD: Sprite = ['..####..', '.######.', '########']
+const ZED: Sprite = ['###', '..#', '.#.', '###']
+
+const WIDTH = 72
+const HEIGHT = 24
+const GROUND = 21
+
+function Pixels({
+ sprite,
+ x,
+ y,
+ className,
+ children,
+}: {
+ sprite: Sprite
+ x: number
+ y: number
+ className?: string
+ children?: React.ReactNode
+}) {
+ return (
+ <g className={className}>
+ {sprite.flatMap((row, dy) =>
+ [...row].map((cell, dx) =>
+ cell === '#' ? (
+ <rect
+ key={`${dx},${dy}`}
+ x={x + dx}
+ y={y + dy}
+ width={1}
+ height={1}
+ />
+ ) : null,
+ ),
+ )}
+ {children}
+ </g>
+ )
+}
+
+function subscribeReducedMotion(onChange: () => void) {
+ const query = window.matchMedia?.('(prefers-reduced-motion: reduce)')
+ query?.addEventListener('change', onChange)
+ return () => query?.removeEventListener('change', onChange)
+}
+
+function useReducedMotion(): boolean {
+ return useSyncExternalStore(
+ subscribeReducedMotion,
+ () =>
+ window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ?? false,
+ () => true,
+ )
+}
+
+/**
+ * `asleep` before the computer is in Slack (it dozes, Zs rising); awake
+ * after, blinking now and then.
+ */
+export function PixelScene({
+ asleep,
+ className,
+}: {
+ asleep: boolean
+ className?: string
+}) {
+ const still = useReducedMotion()
+ const monitorX = 6
+ const monitorY = GROUND - MONITOR.length
+ return (
+ <svg
+ viewBox={`0 0 ${WIDTH} ${HEIGHT}`}
+ shapeRendering="crispEdges"
+ className={cn('text-foreground/15 w-full fill-current', className)}
+ aria-hidden
+ >
+ <Pixels sprite={CLOUD} x={34} y={2}>
+ {still ? null : (
+ <animateTransform
+ attributeName="transform"
+ type="translate"
+ values="0 0; -6 0; 0 0"
+ dur="40s"
+ repeatCount="indefinite"
+ />
+ )}
+ </Pixels>
+ <Pixels sprite={CLOUD} x={54} y={6}>
+ {still ? null : (
+ <animateTransform
+ attributeName="transform"
+ type="translate"
+ values="0 0; 5 0; 0 0"
+ dur="55s"
+ repeatCount="indefinite"
+ />
+ )}
+ </Pixels>
+
+ <Pixels sprite={MONITOR} x={monitorX} y={monitorY} />
+ {asleep ? (
+ <>
+ <Pixels sprite={EYES_SHUT} x={monitorX} y={monitorY + 2} />
+ <Pixels sprite={ZED} x={monitorX + 15} y={monitorY - 6}>
+ {still ? null : (
+ <>
+ <animateTransform
+ attributeName="transform"
+ type="translate"
+ values="0 3; 2 -1"
+ dur="3s"
+ repeatCount="indefinite"
+ />
+ <animate
+ attributeName="opacity"
+ values="0; 1; 0"
+ dur="3s"
+ repeatCount="indefinite"
+ />
+ </>
+ )}
+ </Pixels>
+ </>
+ ) : (
+ <>
+ <Pixels sprite={EYES_OPEN} x={monitorX} y={monitorY + 2}>
+ {still ? null : (
+ <animate
+ attributeName="opacity"
+ values="1; 1; 0; 1"
+ keyTimes="0; 0.94; 0.97; 1"
+ dur="5s"
+ repeatCount="indefinite"
+ />
+ )}
+ </Pixels>
+ <Pixels sprite={SMILE} x={monitorX} y={monitorY + 5} />
+ </>
+ )}
+
+ <Pixels sprite={CACTUS} x={50} y={GROUND - CACTUS.length} />
+
+ {/* The ground: a line with a few pebbles, Chrome-dino style. */}
+ <rect x={0} y={GROUND} width={WIDTH} height={1} />
+ {[3, 11, 19, 30, 41, 47, 58, 66].map((x, i) => (
+ <rect
+ key={x}
+ x={x}
+ y={GROUND + 2 + (i % 2)}
+ width={i % 3 ? 1 : 2}
+ height={1}
+ />
+ ))}
+ </svg>
+ )
+}