Skip to content

An open-source, faster Devin alternative

TypeScript

web: the Computer page sells the computer instead of listing its specs

Slack U06GFN8DJ7P7ebc3ea1a539
diff --git a/web/src/managed-agents/Computer.test.tsx b/web/src/managed-agents/Computer.test.tsx
index 4ac2632c..1d6e5440 100644
--- a/web/src/managed-agents/Computer.test.tsx
+++ b/web/src/managed-agents/Computer.test.tsx
@@ -126,13 +126,14 @@ describe('Computer page', () => {
render('/computer')
await settle(
- () => container.textContent?.includes('8 GiB') === true,
+ () => container.textContent?.includes('coming to life') === true,
'provisioning computer',
)
expect(computerApi.createComputer).toHaveBeenCalledTimes(1)
expect(container.textContent).toContain('Setting up')
expect(container.textContent).toContain('Install Slack app')
+ expect(container.textContent).not.toMatch(/vCPU|GiB/)
expect(container.textContent).toContain('Connect GitHub')
expect(container.textContent).toContain(
'Mention @OpenComputer in any channel, or DM it.',
diff --git a/web/src/managed-agents/Computer.tsx b/web/src/managed-agents/Computer.tsx
index 97c4ac60..33c6c6e0 100644
--- a/web/src/managed-agents/Computer.tsx
+++ b/web/src/managed-agents/Computer.tsx
@@ -2,12 +2,13 @@ import { useEffect, useRef, useState, type ReactNode } from 'react'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import { Link, useSearchParams } from 'react-router-dom'
import {
- AtSign,
Check,
Computer as ComputerIcon,
ExternalLink,
+ GitPullRequest,
Loader2,
MessagesSquare,
+ Moon,
RotateCcw,
Send,
Terminal,
@@ -16,7 +17,7 @@ import {
import { ConfirmDialog } from '@/components/confirm-dialog'
import { EmptyState } from '@/components/empty-state'
import { GithubMark } from '@/components/github-mark'
-import { PageHeader } from '@/components/page-header'
+import { CopyRow } from '@/components/copy-row'
import {
Panel,
PanelContent,
@@ -43,12 +44,13 @@ import {
type ComputerStatus,
} from './computer-api'
import {
+ EXAMPLE_ASKS,
SESSION_STATUS,
START_SESSION_COPY,
computerChecklist,
computerPollInterval,
computerPresentation,
- formatCapacity,
+ heroCopy,
slackReturnFromSearch,
type ChecklistStep,
} from './computer-state'
@@ -133,17 +135,15 @@ export default function ComputerPage() {
return (
<div className="mx-auto max-w-5xl space-y-6">
- <PageHeader
- title="Computer"
- description="Your organization's computer holds your repositories and works on them with you from Slack."
- />
- <StatusCard
+ <Hero
status={status.data}
createError={create.isError ? create.error : null}
creating={create.isPending}
onRetry={() => create.mutate()}
/>
+ <Reasons />
<Checklist status={status.data} sessions={sessions.data} />
+ <TryAsking />
<SessionsPanel
hasComputer={hasComputer}
sessions={newestFirst(sessions.data ?? [])}
@@ -167,7 +167,7 @@ export default function ComputerPage() {
)
}
-function StatusCard({
+function Hero({
status,
createError,
creating,
@@ -180,48 +180,57 @@ function StatusCard({
}) {
const { computer } = status
const presentation = computerPresentation(computer, status.plan)
- const canRetry =
- (!computer && createError !== null) || computer?.state === 'failed'
+ const failedToCreate = !computer && createError !== null
+ const copy = failedToCreate
+ ? { headline: 'Something went wrong.', subline: createError.message }
+ : heroCopy(computer, status.plan)
+ const alive = computer?.state === 'ready' && computer.connected
+ const busy =
+ !computer ||
+ computer.state === 'provisioning' ||
+ computer.state === 'waking' ||
+ (computer.state === 'ready' && !computer.connected)
+ const canRetry = failedToCreate || computer?.state === 'failed'
return (
- <Panel>
- <PanelHeader>
- <div className="flex min-w-0 items-center gap-3">
- <div className="bg-primary/10 text-primary flex size-10 shrink-0 items-center justify-center rounded-lg">
- <ComputerIcon className="size-4" aria-hidden />
- </div>
- <div className="min-w-0">
- <PanelTitle>Your computer</PanelTitle>
- <PanelDescription className="mt-1 max-w-2xl">
- {!computer && createError
- ? createError.message
- : presentation.description}
- </PanelDescription>
- </div>
+ <section className="from-primary/10 via-panel to-panel relative overflow-hidden rounded-2xl border bg-linear-to-br px-8 py-12 sm:px-12 sm:py-16">
+ <div
+ className="bg-primary/15 pointer-events-none absolute -top-24 -right-24 size-72 rounded-full blur-3xl"
+ aria-hidden
+ />
+ <div className="relative max-w-3xl">
+ <div className="bg-background/70 inline-flex items-center gap-2 rounded-full border px-3 py-1 text-xs font-medium backdrop-blur">
+ <span className="relative flex size-2" aria-hidden>
+ {alive || busy ? (
+ <span
+ className={cn(
+ 'absolute inline-flex size-full animate-ping rounded-full opacity-75',
+ alive ? 'bg-emerald-500' : 'bg-amber-500',
+ )}
+ />
+ ) : null}
+ <span
+ className={cn(
+ 'relative inline-flex size-2 rounded-full',
+ alive
+ ? 'bg-emerald-500'
+ : busy
+ ? 'bg-amber-500'
+ : failedToCreate || computer?.state === 'failed'
+ ? 'bg-red-500'
+ : 'bg-muted-foreground',
+ )}
+ />
+ </span>
+ {failedToCreate ? 'Failed' : presentation.label}
</div>
- <StatusBadge
- status={!computer && createError ? 'failed' : presentation.badge}
- label={!computer && createError ? 'Failed' : presentation.label}
- />
- </PanelHeader>
- <PanelContent className="flex flex-wrap items-end justify-between gap-4">
- {computer ? (
- <dl className="grid grid-cols-3 gap-6">
- {formatCapacity(computer).map((item) => (
- <div key={item.label}>
- <dt className="text-muted-foreground text-xs">{item.label}</dt>
- <dd className="mt-1 font-mono text-lg font-semibold tabular-nums">
- {item.value}
- </dd>
- </div>
- ))}
- </dl>
- ) : (
- <p className="text-muted-foreground text-sm">
- Capacity appears once your computer is set up.
- </p>
- )}
+ <h1 className="mt-6 text-4xl font-semibold tracking-tight text-balance sm:text-5xl">
+ {copy.headline}
+ </h1>
+ <p className="text-muted-foreground mt-4 max-w-2xl text-lg text-balance">
+ {copy.subline}
+ </p>
{canRetry ? (
- <Button variant="outline" disabled={creating} onClick={onRetry}>
+ <Button className="mt-8" disabled={creating} onClick={onRetry}>
{creating ? (
<Loader2 className="size-4 animate-spin" aria-hidden />
) : (
@@ -230,6 +239,59 @@ function StatusCard({
Try again
</Button>
) : null}
+ </div>
+ </section>
+ )
+}
+
+const REASONS = [
+ {
+ icon: MessagesSquare,
+ title: 'Lives in Slack',
+ body: 'Mention it in any thread. It picks up the context, does the work and reports back, right there.',
+ },
+ {
+ icon: GitPullRequest,
+ title: 'Works in your real code',
+ body: 'Your repositories, your stack. It reads, runs and fixes, then hands you a pull request to review.',
+ },
+ {
+ icon: Moon,
+ title: 'Never logs off',
+ body: 'Hand it the slow stuff at 6pm. It is still on it at 3am, and it remembers where everything is.',
+ },
+] as const
+
+function Reasons() {
+ return (
+ <div className="grid gap-4 sm:grid-cols-3">
+ {REASONS.map(({ icon: Icon, title, body }) => (
+ <div key={title} className="bg-panel rounded-xl border p-5">
+ <Icon className="text-primary size-5" aria-hidden />
+ <p className="mt-3 font-medium">{title}</p>
+ <p className="text-muted-foreground mt-1 text-sm">{body}</p>
+ </div>
+ ))}
+ </div>
+ )
+}
+
+function TryAsking() {
+ return (
+ <Panel>
+ <PanelHeader>
+ <div>
+ <PanelTitle>Not sure where to start?</PanelTitle>
+ <PanelDescription className="mt-1">
+ Paste one of these into Slack. Then give it the thing you have been
+ putting off.
+ </PanelDescription>
+ </div>
+ </PanelHeader>
+ <PanelContent className="grid gap-2">
+ {EXAMPLE_ASKS.map((ask) => (
+ <CopyRow key={ask} value={`@OpenComputer ${ask}`} />
+ ))}
</PanelContent>
</Panel>
)
@@ -242,46 +304,49 @@ function Checklist({
status: ComputerStatus
sessions: ComputerSession[] | undefined
}) {
- const steps = computerChecklist(status, sessions)
- const [computerStep, slackStep, githubStep, sessionStep] = steps
+ // The computer itself is the hero; these are the three things a person does.
+ const [, slackStep, githubStep, sessionStep] = computerChecklist(
+ status,
+ sessions,
+ )
+ const steps = [slackStep, githubStep, sessionStep]
+ const done = steps.filter((step) => step.done).length
return (
<Panel>
<PanelHeader>
<div>
- <PanelTitle>Get started</PanelTitle>
+ <PanelTitle>
+ {done === steps.length
+ ? 'You are all set.'
+ : 'Three steps to your first hand-off'}
+ </PanelTitle>
<PanelDescription className="mt-1">
- {steps.filter((step) => step.done).length} of {steps.length} done
+ {done === steps.length
+ ? 'It is part of the team now. Keep it busy.'
+ : `${done} of ${steps.length} done. Takes about two minutes.`}
</PanelDescription>
</div>
</PanelHeader>
<PanelContent className="p-0">
<ol className="divide-y">
- <Step number={1} step={computerStep}>
- {computerStep.done
- ? 'Your computer is set up.'
- : 'Your computer is being set up. You can install the Slack app and connect GitHub in the meantime.'}
- </Step>
<Step
- number={2}
- step={slackStep}
+ number={1}
+ step={{ ...slackStep, title: 'Invite it to Slack' }}
action={<SlackAction status={status} />}
>
{status.slack.installed
- ? `Linked to the ${status.slack.teamName ?? 'Slack'} workspace.`
- : 'Add OpenComputer to your Slack workspace so your team can work with the computer.'}
+ ? `It is in ${status.slack.teamName ?? 'your Slack workspace'}.`
+ : 'Where your team already talks. One click, no setup.'}
</Step>
<Step
- number={3}
- step={githubStep}
+ number={2}
+ step={{ ...githubStep, title: 'Give it your code' }}
action={<GitHubAction connected={status.github.connected} />}
>
{githubSummary(status.github)}
</Step>
- <Step number={4} step={sessionStep}>
- <span className="inline-flex items-center gap-1.5">
- <AtSign className="size-3.5 shrink-0" aria-hidden />
- {START_SESSION_COPY}
- </span>
+ <Step number={3} step={{ ...sessionStep, title: 'Say hello' }}>
+ {START_SESSION_COPY}
</Step>
</ol>
</PanelContent>
@@ -291,13 +356,13 @@ function Checklist({
function githubSummary(github: ComputerStatus['github']) {
if (!github.connected) {
- return 'Install the OpenComputer GitHub App on the repositories your computer should work in.'
+ return 'Pick the repositories it should know. It never pushes to main unless you ask.'
}
const accounts = github.installations.map(
(installation) => installation.accountLogin,
)
return accounts.length
- ? `Repositories from ${accounts.join(', ')} are available to your computer.`
+ ? `It knows the code in ${accounts.join(', ')}.`
: 'GitHub is connected.'
}
diff --git a/web/src/managed-agents/computer-state.test.ts b/web/src/managed-agents/computer-state.test.ts
index 0b95d260..ef277fff 100644
--- a/web/src/managed-agents/computer-state.test.ts
+++ b/web/src/managed-agents/computer-state.test.ts
@@ -12,7 +12,7 @@ import {
computerChecklist,
computerPollInterval,
computerPresentation,
- formatCapacity,
+ heroCopy,
slackReturnFromSearch,
} from './computer-state'
@@ -132,12 +132,33 @@ describe('computer state copy', () => {
).toBe('Setup timed out.')
})
- it('formats capacity as vCPUs, memory and disk', () => {
- expect(formatCapacity(computer)).toEqual([
- { label: 'vCPUs', value: '2' },
- { label: 'Memory', value: '8 GiB' },
- { label: 'Disk', value: '128 GiB' },
- ])
+ it('writes a headline for every state without naming hardware or vendors', () => {
+ const states = [
+ 'provisioning',
+ 'ready',
+ 'parked',
+ 'waking',
+ 'failed',
+ 'deleting',
+ ] as const
+ for (const state of states) {
+ for (const plan of ['free', 'paid'] as const) {
+ const copy = heroCopy({ ...computer, state }, plan)
+ expect(copy.headline.length).toBeGreaterThan(0)
+ expect(`${copy.headline} ${copy.subline}`).not.toMatch(
+ /vCPU|GiB|azure|region|instance/i,
+ )
+ }
+ }
+ expect(heroCopy(null, 'free').headline).toBe(
+ heroCopy({ ...computer, state: 'provisioning' }, 'free').headline,
+ )
+ })
+
+ it('offers the upgrade only to a sleeping free computer', () => {
+ const parked = { ...computer, state: 'parked' as const }
+ expect(heroCopy(parked, 'free').subline).toContain('Upgrade')
+ expect(heroCopy(parked, 'paid').subline).not.toContain('Upgrade')
})
})
diff --git a/web/src/managed-agents/computer-state.ts b/web/src/managed-agents/computer-state.ts
index 1c8c8312..65cda583 100644
--- a/web/src/managed-agents/computer-state.ts
+++ b/web/src/managed-agents/computer-state.ts
@@ -195,10 +195,68 @@ export function slackReturnFromSearch(search: URLSearchParams): SlackReturn {
}
}
-export function formatCapacity(computer: Computer) {
- return [
- { label: 'vCPUs', value: String(computer.vcpus) },
- { label: 'Memory', value: `${computer.memoryGiB} GiB` },
- { label: 'Disk', value: `${computer.diskGiB} GiB` },
- ]
+export type HeroCopy = { headline: string; subline: string }
+
+/**
+ * The page's headline for each state: what the computer means to the team,
+ * never what it is made of (Mohamed, 2026-10-11: no specs, make people want it).
+ */
+export function heroCopy(
+ computer: Computer | null,
+ plan: ComputerStatus['plan'],
+): HeroCopy {
+ switch (computer?.state ?? 'provisioning') {
+ case 'provisioning':
+ return {
+ headline: 'Your computer is coming to life.',
+ subline:
+ 'A minute or two, and your team has a colleague that never logs off. Invite it into Slack while you wait.',
+ }
+ case 'ready':
+ return computer?.connected
+ ? {
+ headline: 'Your team just got a colleague that never logs off.',
+ subline:
+ 'It knows your code, lives in your Slack, and keeps going while you sleep. Ask it anything. Hand it anything.',
+ }
+ : {
+ headline: 'Reconnecting.',
+ subline:
+ 'Your computer is on and finding its way back. Usually within a minute.',
+ }
+ case 'parked':
+ return {
+ headline: 'Resting, not gone.',
+ subline:
+ plan === 'paid'
+ ? 'Everything it knows is right where it left it. Mention it and it is back in a minute.'
+ : 'Everything it knows is right where it left it. Mention it and it is back in a minute. Upgrade and it never sleeps.',
+ }
+ case 'waking':
+ return {
+ headline: 'Waking up.',
+ subline:
+ 'Picking up exactly where it left off. Your message is already waiting for it.',
+ }
+ case 'failed':
+ return {
+ headline: 'Something went wrong.',
+ subline:
+ computer?.lastError ??
+ 'Your computer could not start. Try again, or tell us if it keeps happening.',
+ }
+ case 'deleting':
+ return {
+ headline: 'Saying goodbye.',
+ subline: 'Your computer is being removed.',
+ }
+ }
}
+
+/** Things to ask first: concrete, so the first message is easy to write. */
+export const EXAMPLE_ASKS = [
+ 'why is the checkout test flaky? Fix it and open a PR.',
+ 'walk me through how billing works in our codebase.',
+ 'upgrade us to the latest React and tell me what broke.',
+ 'every morning, summarize what changed in main yesterday.',
+] as const