Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
feat(spaces): guided first run from first Space to a suggested task (CUA-2062) (#5727)
Francesco Bonacciba604b17faf5
diff --git a/apps/cua-spaces-web/e2e/first-space.spec.ts b/apps/cua-spaces-web/e2e/first-space.spec.tsindex 77fdee8b63..126b4f8b24 100644--- a/apps/cua-spaces-web/e2e/first-space.spec.ts+++ b/apps/cua-spaces-web/e2e/first-space.spec.ts@@ -25,7 +25,7 @@ test("empty home and New Space on the macOS host's answer, loaded before the hosawait expect(page.getByRole("heading", { level: 1 })).toHaveText("Spaces");await expect(page.getByText("0 Spaces on")).toBeVisible();await expect(page.getByLabel("Filter by state").getByRole("button", { name: "Running" })).toBeVisible();- await expect(home.getByRole("heading")).toHaveText("No Spaces yet");+ await expect(home.getByRole("heading")).toHaveText("Create your first Space");await expect(home).toContainText("Choose a system for your first Space.");const linux = home.getByRole("button", { name: "Linux, About 1 minute · 3.2–7.1 GB of disk" });const macos = home.getByRole("button", { name: "macOS, About 23 GB download" });diff --git a/apps/cua-spaces-web/src/components/__tests__/empty-home.test.tsx b/apps/cua-spaces-web/src/components/__tests__/empty-home.test.tsxindex 3d79935a9c..592b15a020 100644--- a/apps/cua-spaces-web/src/components/__tests__/empty-home.test.tsx+++ b/apps/cua-spaces-web/src/components/__tests__/empty-home.test.tsx@@ -74,8 +74,9 @@ describe("the empty home's words", () => {it("draws each tile as a button named by its system and figures, and no New Space of its own", () => {mount(stubCore(), emptyHome(stubCore(), "arm64", "macos")!);- expect(screen.getByRole("heading", { name: "No Spaces yet" })).toBeTruthy();- expect(screen.getByText("Choose a system for your first Space.")).toBeTruthy();+ expect(screen.getByRole("heading", { name: "Create your first Space" })).toBeTruthy();+ expect(screen.getByText(/A Space is a fresh computer for you and your agents\. Choose a system for your first Space\./)).toBeTruthy();+ expect(screen.getByText("3. Try a task with an agent")).toBeTruthy();const linux = screen.getByRole("button", { name: "Linux, About 4 minutes · 1.0–2.0 GB of disk" });const macos = screen.getByRole("button", { name: "macOS, About 19 GB download" });// Focusable buttons with visible hover and focus states.@@ -98,7 +99,7 @@ describe("a Spaces list that could not be read", () => {</BridgeProvider>,);expect(screen.getByRole("heading", { name: "Spaces could not be loaded" })).toBeTruthy();- expect(screen.queryByText("Choose a system for your first Space.")).toBeNull();+ expect(screen.queryByText(/Choose a system for your first Space/)).toBeNull();expect(screen.queryAllByRole("button")).toHaveLength(0);});});diff --git a/apps/cua-spaces-web/src/components/__tests__/first-space-ready.test.tsx b/apps/cua-spaces-web/src/components/__tests__/first-space-ready.test.tsxindex 06d6c203a4..ee60c9476e 100644--- a/apps/cua-spaces-web/src/components/__tests__/first-space-ready.test.tsx+++ b/apps/cua-spaces-web/src/components/__tests__/first-space-ready.test.tsx@@ -9,6 +9,7 @@ import type { ReactNode } from "react";import type { AgentSetupRow, Space } from "@/bridge";import { BridgeContext, type BridgeContextValue } from "@/bridge/BridgeProvider";import { RunAgentDialog, runAgentPrompt } from "@/components/agents/run-agent-dialog";+import { suggestedTask, useFirstRunStep, useFirstSpaceMilestones } from "@/components/first-run-guide";import { SpaceReadyCard, useAgentOffer } from "@/components/space-ready-card";import { EXPLAINED_KEY, needsExplainer, TeleportExplainer } from "@/components/teleport/explainer";@@ -33,32 +34,77 @@ beforeEach(() => {afterEach(cleanup);describe("SpaceReadyCard", () => {- it("lists the agents it found and has one action", async () => {+ it("says the first Space is ready, names the agents found, and offers one real task", async () => {rows = [row({}), row({ agent: "codex", name: "Codex", configured: true }), row({ agent: "hermes", name: "Hermes", installed: false })];const onRun = vi.fn();render(<SpaceReadyCard space={space} onRun={onRun} />);+ expect(screen.getByRole("heading", { name: "Your first Space is ready" })).toBeTruthy();expect(await screen.findByText(/We found Claude Code and Codex on this computer/)).toBeTruthy();- fireEvent.click(screen.getByRole("button", { name: "Start with Codex" }));+ expect(screen.getByText("Run a project's tests on a clean Linux computer")).toBeTruthy();+ fireEvent.click(screen.getByRole("button", { name: "Try this task" }));expect(onRun).toHaveBeenCalledOnce();- expect(document.body.textContent).not.toMatch(/relay|MCP|\bhost\b/i);+ expect(onRun.mock.calls[0]![0].prompt).toMatch(/run its tests/);+ expect(document.body.textContent).not.toMatch(/relay|MCP|\bhost\b|weather|flight|pizza/i);});- it("offers to connect an agent that is installed but not connected", async () => {- rows = [row({})];+ it("opens the Space", async () => {+ rows = [];render(<SpaceReadyCard space={space} onRun={() => {}} />);- expect(await screen.findByRole("button", { name: "Connect Claude Code" })).toBeTruthy();+ fireEvent.click(await screen.findByRole("button", { name: "Open Research" }));+ expect(nav).toHaveBeenCalledWith({ to: "/spaces/$spaceId", params: { spaceId: "s1" } });});- it("says how when no agent is found, and can be closed", async () => {+ it("says how to connect when no agent is found, and can be closed", async () => {rows = [];const onDismiss = vi.fn();render(<SpaceReadyCard space={space} onRun={() => {}} onDismiss={onDismiss} />);- expect(await screen.findByRole("button", { name: "Show me how" })).toBeTruthy();+ expect(await screen.findByText(/Connect an agent such as Claude Code or Codex/)).toBeTruthy();fireEvent.click(screen.getByRole("button", { name: "Not now" }));expect(onDismiss).toHaveBeenCalledOnce();});});+describe("the guided first run's events", () => {+ const track = vi.fn();+ const wrapper = ({ children }: { children?: ReactNode }) => {+ const store = { telemetry: { track } };+ const value = { mode: "electron", core: {}, adapter: null, store, ready: Promise.resolve(store) } as unknown as BridgeContextValue;+ return <BridgeContext.Provider value={value}>{children}</BridgeContext.Provider>;+ };+ const events = () => track.mock.calls.map((c) => (c[0] as { feature: string }[])[0]!.feature);+ const s = (status: string) => ({ id: "s1", name: "Research", os: "linux", status }) as unknown as Space;+ beforeEach(() => track.mockClear());++ it("counts shown, created, ready and task started once each", async () => {+ const step = renderHook(() => useFirstRunStep(), { wrapper }).result.current;+ act(() => step("guide_shown"));+ const m = renderHook(({ list }) => useFirstSpaceMilestones(list), { wrapper, initialProps: { list: [s("provisioning")] } });+ m.rerender({ list: [s("running")] });+ m.rerender({ list: [s("running")] });+ act(() => step("task_started"));+ act(() => step("task_started"));+ await waitFor(() => expect(events()).toEqual(["first_run_guide_shown", "first_space_created", "first_space_ready", "suggested_task_started"]));+ });++ it("does not count created or ready on an install that never showed the guide", async () => {+ renderHook(() => useFirstSpaceMilestones([s("running")]), { wrapper });+ await Promise.resolve();+ expect(track).not.toHaveBeenCalled();+ });++ it("suggests real work on a clean computer, for the Space's system", () => {+ expect(suggestedTask({ ...s("running"), os: "macos" } as Space).title).toBe("Run a project's tests on a clean Mac");+ expect(suggestedTask(s("running")).prompt).toContain('"Research"');+ });++ it("the run dialog shows the suggested request", async () => {+ rows = [row({ configured: true })];+ const { prompt } = suggestedTask(s("running"));+ render(<RunAgentDialog open space={space} onOpenChange={() => {}} prompt={prompt} />);+ expect(await screen.findByText(prompt)).toBeTruthy();+ });+});+describe("useAgentOffer", () => {const track = vi.fn();const wrapper = ({ children }: { children?: ReactNode }) => {diff --git a/apps/cua-spaces-web/src/components/agents/run-agent-dialog.tsx b/apps/cua-spaces-web/src/components/agents/run-agent-dialog.tsxindex 5a94eb1c8c..35753b3014 100644--- a/apps/cua-spaces-web/src/components/agents/run-agent-dialog.tsx+++ b/apps/cua-spaces-web/src/components/agents/run-agent-dialog.tsx@@ -20,7 +20,7 @@ export const runAgentPrompt = (spaceName: string) => `Open the Cua Space "${spac* first (one button) and then shows the request. The agent's work shows up* on the Agents page.*/-export function RunAgentDialog({ open, space, onOpenChange, onManual, onConnected }: { open: boolean; space: Space; onOpenChange: (open: boolean) => void; onManual?: () => void; onConnected?: () => void }) {+export function RunAgentDialog({ open, space, onOpenChange, onManual, onConnected, prompt: asked }: { open: boolean; space: Space; onOpenChange: (open: boolean) => void; onManual?: () => void; onConnected?: () => void; /** The request to show; the default only looks at the screen. */ prompt?: string }) {const { agentSetup, configureAgents } = useAgents();const navigate = useNavigate();const [rows, setRows] = useState<AgentSetupRow[] | null>(null);@@ -43,7 +43,7 @@ export function RunAgentDialog({ open, space, onOpenChange, onManual, onConnecteconst ready = (rows ?? []).filter((r) => r.installed && r.configured);const pending = (rows ?? []).filter((r) => r.installed && !r.configured);- const prompt = runAgentPrompt(space.name);+ const prompt = asked ?? runAgentPrompt(space.name);const first = ready[0];const toSet = pending[0];diff --git a/apps/cua-spaces-web/src/components/empty-home.tsx b/apps/cua-spaces-web/src/components/empty-home.tsxindex 33b4221ae4..b0a4395c50 100644--- a/apps/cua-spaces-web/src/components/empty-home.tsx+++ b/apps/cua-spaces-web/src/components/empty-home.tsx@@ -3,7 +3,8 @@/*** The main window with no Spaces yet, as the SwiftUI app draws it: a- * monitor, "No Spaces yet", one tile per system this machine runs (Linux,+ * monitor, "Create your first Space" with the three steps ahead (the guided+ * first run, CUA-2062; counted once as `first_run_guide_shown`), one tile per system this machine runs (Linux,* and macOS on Apple silicon Macs) with its time and size from the core,* under the Spaces header (its New Space opens the wizard with nothing* chosen). A tile opens New Space with that system chosen, on this machine@@ -11,6 +12,9 @@*/import { useNewSpaceWizard, type EmptyHome as EmptyHomeView, type EmptyTile } from "@/bridge";+import { useEffect } from "react";++import { useFirstRunStep } from "@/components/first-run-guide";import { OsIcon } from "@/components/os-icon";/** `unread`: the host could not read the Spaces list (`listNotice`): the@@ -18,15 +22,27 @@ import { OsIcon } from "@/components/os-icon";export function EmptyHome({ home, unread = false }: { home: EmptyHomeView; unread?: boolean }) {const wizard = useNewSpaceWizard();const start = (tile: EmptyTile) => wizard.show(null, tile.os);+ const step = useFirstRunStep();+ useEffect(() => {+ if (!unread) step("guide_shown");+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [unread]);return (<section data-empty-home="" aria-labelledby="empty-home-title" className="flex flex-col items-center px-8 pt-8 pb-10 text-center"><MonitorGlyph />- <h2 id="empty-home-title" className="mt-4 text-[22px] font-bold tracking-[-0.01em] text-muted-foreground">- {unread ? "Spaces could not be loaded" : home.title}+ <h2 id="empty-home-title" className="mt-4 text-[22px] font-bold tracking-[-0.01em] text-foreground">+ {unread ? "Spaces could not be loaded" : "Create your first Space"}</h2>{unread ? null : (<>- <p className="mt-2.5 text-[13px] text-muted-foreground">{home.detail}</p>+ <p className="mt-2.5 max-w-md text-[13px] text-muted-foreground">+ A Space is a fresh computer for you and your agents. {home.detail}+ </p>+ <ol data-first-run-steps="" className="mt-3 flex flex-wrap justify-center gap-x-4 gap-y-1 text-xs text-muted-foreground">+ <li>1. Pick a system</li>+ <li>2. Wait while it sets up</li>+ <li>3. Try a task with an agent</li>+ </ol><div className="mt-5 flex flex-wrap justify-center gap-3">{home.tiles.map((tile) => (<Tile key={tile.os} tile={tile} onStart={start} />diff --git a/apps/cua-spaces-web/src/components/first-run-guide.ts b/apps/cua-spaces-web/src/components/first-run-guide.tsnew file mode 100644index 0000000000..20d534e780--- /dev/null+++ b/apps/cua-spaces-web/src/components/first-run-guide.ts@@ -0,0 +1,83 @@+// SPDX-License-Identifier: FSL-1.1-MIT+// Copyright (c) 2026 Cua AI, Inc.++/**+ * The guided first run on the Spaces page (CUA-2062): "Create your first+ * Space" on the empty home, then "Your first Space is ready" with one task to+ * try. Each step is counted once per install, as a feature event:+ * `first_run_guide_shown`, `first_space_created`, `first_space_ready`,+ * `suggested_task_started`. Created and ready only count on an install that+ * showed the guide, so people who already had Spaces are not counted again.+ */++import { useEffect } from "react";++import { useFeatureRecorder, type Space } from "@/bridge";+import { spaceState } from "@/lib/spaces";++const KEY = "cua.firstRun";++export type FirstRunStep = "guide_shown" | "space_created" | "space_ready" | "task_started";++const EVENT: Record<FirstRunStep, string> = {+ guide_shown: "first_run_guide_shown",+ space_created: "first_space_created",+ space_ready: "first_space_ready",+ task_started: "suggested_task_started",+};++function seen(step: FirstRunStep): boolean {+ try {+ return globalThis.localStorage?.getItem(`${KEY}.${step}`) === "1";+ } catch {+ return false;+ }+}++/** Marks a step done; true the first time only. */+function mark(step: FirstRunStep): boolean {+ if (seen(step)) return false;+ try {+ globalThis.localStorage?.setItem(`${KEY}.${step}`, "1");+ } catch {+ // Not kept: it may count again on the next launch.+ }+ return true;+}++/** Records a first-run step once per install. */+export function useFirstRunStep(): (step: FirstRunStep) => void {+ const record = useFeatureRecorder();+ return (step) => {+ if (mark(step)) record(EVENT[step]);+ };+}++/** Counts the first Space's create and its ready, after the guide was shown. */+export function useFirstSpaceMilestones(spaces: Space[]): void {+ const step = useFirstRunStep();+ const creating = spaces.some((s) => spaceState(s) === "creating");+ const running = spaces.some((s) => spaceState(s) === "running");+ useEffect(() => {+ if (!seen("guide_shown")) return;+ if (creating || running) step("space_created");+ if (running) step("space_ready");+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [creating, running]);+}++/** The one task offered once the first Space is ready: real work where a clean computer matters. */+export interface SuggestedTask {+ title: string;+ why: string;+ prompt: string;+}++export function suggestedTask(space: Space): SuggestedTask {+ const system = space.os === "macos" ? "Mac" : "Linux computer";+ return {+ title: `Run a project's tests on a clean ${system}`,+ why: `See if your code works on a computer that has never seen it, without touching your own setup.`,+ prompt: `In the Cua Space "${space.name}", clone <link to your GitHub repo>, install what it needs from its README, and run its tests. Tell me which tests fail on this clean computer and why.`,+ };+}diff --git a/apps/cua-spaces-web/src/components/space-ready-card.tsx b/apps/cua-spaces-web/src/components/space-ready-card.tsxindex a871242353..390d6ebfc3 100644--- a/apps/cua-spaces-web/src/components/space-ready-card.tsx+++ b/apps/cua-spaces-web/src/components/space-ready-card.tsx@@ -1,10 +1,13 @@// SPDX-License-Identifier: FSL-1.1-MIT// Copyright (c) 2026 Cua AI, Inc.-import { BotIcon, XIcon } from "lucide-react";+import { useNavigate } from "@tanstack/react-router";+import { XIcon } from "lucide-react";import { useCallback, useEffect, useState } from "react";import { useAgents, useFeatureRecorder, type AgentSetupRow, type Space } from "@/bridge";+import { CuaKey } from "@/components/cua-key";+import { suggestedTask, type SuggestedTask } from "@/components/first-run-guide";import { Button } from "@/components/ui/button";const KEY = "cua.agentOffer";@@ -66,12 +69,16 @@ export function listNames(names: string[]): string {}/**- * The moment a user's first Space is ready: let an agent use it. Shows the- * agents found on this computer and one action. Add computer and Share stay- * in the checklist below it.+ * The moment a user's first Space is ready (the guided first run's success+ * state, CUA-2062): it says so, names the agents found on this computer, and+ * offers one real task to try (`suggestedTask`). "Try this task" opens the+ * run dialog with that request (which connects an agent first if needed);+ * "Open" goes to the Space. Add computer and Share stay in the checklist+ * below it, and a sign-in prompt may sit under it.*/-export function SpaceReadyCard({ space, onRun, onDismiss }: { space: Space; onRun: () => void; onDismiss?: () => void }) {+export function SpaceReadyCard({ space, onRun, onDismiss }: { space: Space; onRun: (task: SuggestedTask) => void; onDismiss?: () => void }) {const { agentSetup } = useAgents();+ const navigate = useNavigate();const [rows, setRows] = useState<AgentSetupRow[] | null>(null);useEffect(() => {let live = true;@@ -85,32 +92,43 @@ export function SpaceReadyCard({ space, onRun, onDismiss }: { space: Space; onRu// eslint-disable-next-line react-hooks/exhaustive-deps}, []);+ const task = suggestedTask(space);const found = (rows ?? []).filter((r) => r.installed);- const first = found.find((r) => r.configured) ?? found[0];- const action = !first ? "Show me how" : first.configured ? `Start with ${first.name}` : `Connect ${first.name}`;const line = found.length- ? `We found ${listNames(found.map((r) => r.name))} on this computer. Let one work in ${space.name} while you watch.`- : "Connect an agent such as Claude Code or Codex, give it a task, and watch it work on this computer.";+ ? `We found ${listNames(found.map((r) => r.name))} on this computer. Give one a task and watch it work in ${space.name}.`+ : "Connect an agent such as Claude Code or Codex, give it a task, and watch it work in this Space.";return (- <section data-space-ready="" aria-labelledby="space-ready-title" className="mb-6 flex items-center gap-4 rounded-xl border bg-card px-5 py-4 shadow-xs">- <span aria-hidden className="flex size-10 shrink-0 items-center justify-center rounded-[10px] bg-brand/10 text-brand">- <BotIcon className="size-5" />- </span>- <div className="min-w-0 flex-1">- <h2 id="space-ready-title" className="text-[14px] font-semibold">- Let an agent use this Space- </h2>- <p className="mt-0.5 text-xs text-muted-foreground">{rows === null ? "Looking for your agents…" : line}</p>+ <section data-space-ready="" aria-labelledby="space-ready-title" className="mb-6 rounded-xl border bg-card px-5 py-4 shadow-xs">+ <div className="flex items-start gap-4">+ <CuaKey size={40} className="size-10" />+ <div className="min-w-0 flex-1">+ <h2 id="space-ready-title" className="text-[14px] font-semibold">+ Your first Space is ready+ </h2>+ <p className="mt-0.5 text-xs text-muted-foreground">+ {space.name} is a fresh computer, set up and running. {rows === null ? "Looking for your agents…" : line}+ </p>+ </div>+ {onDismiss ? (+ <Button data-space-ready-dismiss="" size="icon-sm" variant="ghost" aria-label="Not now" onClick={onDismiss}>+ <XIcon className="size-3.5" />+ </Button>+ ) : null}</div>- <Button data-space-ready-run="" disabled={rows === null} onClick={onRun}>- {action}- </Button>- {onDismiss ? (- <Button data-space-ready-dismiss="" size="icon-sm" variant="ghost" aria-label="Not now" onClick={onDismiss}>- <XIcon className="size-3.5" />+ <div data-suggested-task="" className="mt-4 flex items-center gap-4 rounded-lg border bg-muted/40 px-4 py-3">+ <div className="min-w-0 flex-1">+ <p className="text-2xs font-medium text-muted-foreground">Try this first</p>+ <p className="mt-0.5 text-[13px] font-medium">{task.title}</p>+ <p className="mt-0.5 text-xs text-muted-foreground">{task.why}</p>+ </div>+ <Button variant="outline" data-space-ready-open="" onClick={() => void navigate({ to: "/spaces/$spaceId", params: { spaceId: space.id } })}>+ Open {space.name}</Button>- ) : null}+ <Button data-space-ready-run="" disabled={rows === null} onClick={() => onRun(task)}>+ Try this task+ </Button>+ </div></section>);}diff --git a/apps/cua-spaces-web/src/routes/spaces/index.tsx b/apps/cua-spaces-web/src/routes/spaces/index.tsxindex b0c01e90bc..f9b180d86a 100644--- a/apps/cua-spaces-web/src/routes/spaces/index.tsx+++ b/apps/cua-spaces-web/src/routes/spaces/index.tsx@@ -11,6 +11,7 @@ import { ConnectAgentDialog } from "@/components/agents/connect-dialog";import { RunAgentDialog } from "@/components/agents/run-agent-dialog";import { GettingStarted } from "@/components/getting-started";import { SpaceReadyCard, useAgentOffer } from "@/components/space-ready-card";+import { useFirstRunStep, useFirstSpaceMilestones } from "@/components/first-run-guide";import { FirstRunTodosCard, useFirstRunTodosShown } from "@/components/first-run-todos";import { OsIcon } from "@/components/os-icon";import { EmptyState, Page, PageHeader } from "@/components/page";@@ -77,6 +78,12 @@ function SpacesPage() {const offer = useAgentOffer(Boolean(readySpace) && !agentsLoading && !agentRan);const runHere = readySpace && !agentRan && offer.visible ? readySpace : undefined;const [runOpen, setRunOpen] = useState(false);+ // No Spaces yet (or the list could not be read): the SwiftUI app's empty home, as the first-run guide.+ const guide = !error && !isLoading && spaces.length === 0 && home && home.tiles.length > 0 ? home : null;+ // The suggested task's request, while the run dialog was opened from it.+ const [runPrompt, setRunPrompt] = useState<string | undefined>();+ const firstRunStep = useFirstRunStep();+ useFirstSpaceMilestones(spaces);const [connectOpen, setConnectOpen] = useState(false);// The cards above the list (ready, checklist, computers) and the list come from separate host reads. Draw them// together once those have answered, not one by one with the page jumping at each (CUA-1951).@@ -97,12 +104,23 @@ function SpacesPage() {/>{settled ? (<>+ {/* No Spaces yet: the guided first run comes first, above the checklist and computers (CUA-2062). */}+ {guide ? <EmptyHome home={guide} unread={Boolean(listNotice)} /> : null}<FirstRunTodosCard />- {runHere ? <SpaceReadyCard space={runHere} onRun={() => { offer.clicked(); setRunOpen(true); }} onDismiss={offer.dismiss} /> : null}- {firstRunTodos ? null : <GettingStarted onRunAgent={runHere ? () => setRunOpen(true) : undefined} />}+ {runHere ? <SpaceReadyCard+ space={runHere}+ onRun={(task) => {+ offer.clicked();+ firstRunStep("task_started");+ setRunPrompt(task.prompt);+ setRunOpen(true);+ }}+ onDismiss={offer.dismiss}+ /> : null}+ {firstRunTodos ? null : <GettingStarted onRunAgent={runHere ? () => { setRunPrompt(undefined); setRunOpen(true); } : undefined} />}{readySpace ? (<>- <RunAgentDialog open={runOpen} space={readySpace} onOpenChange={setRunOpen} onManual={() => setConnectOpen(true)} onConnected={offer.completed} />+ <RunAgentDialog open={runOpen} space={readySpace} prompt={runPrompt} onOpenChange={setRunOpen} onManual={() => setConnectOpen(true)} onConnected={offer.completed} /><ConnectAgentDialog open={connectOpen} onOpenChange={setConnectOpen} /></>) : null}@@ -141,11 +159,7 @@ function SpacesPage() {<EmptyState icon={<MonitorIcon />} title="Couldn't load Spaces">{error.message}</EmptyState>- ) : isLoading ? null : spaces.length === 0 && home && home.tiles.length > 0 ? (- // No Spaces yet (or the list could not be read): the SwiftUI app's- // empty home, under the header.- <EmptyHome home={home} unread={Boolean(listNotice)} />- ) : spaces.length === 0 ? (+ ) : isLoading || guide ? null : spaces.length === 0 ? (<EmptyStateicon={<MonitorIcon />}title="No Spaces yet"