Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(cua-spaces): onboarding This machine Continue button, launch at login default, static prompts (#5317)

Francesco Bonacci861c4b0f9e74
diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/OnboardingView.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/OnboardingView.swift
index a2f0536387..07638990bf 100644
--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/OnboardingView.swift
+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/OnboardingView.swift
@@ -26,6 +26,9 @@ public struct OnboardingView: View {
var onCancelSignIn: (() -> Void)?
/// The page a waiting sign-in finishes on, to open it again.
var signInURL: URL?
+ /// The This machine page's selection (nil: the core's preselected one).
+ /// Choosing only selects; Continue moves on.
+ @State private var selectedMode: AppOnboardingMode?
public init(onboarding: OnboardingModel, onSignIn: (() async -> String?)? = nil,
signInPhase: AppSignInPhase = .idle, onCancelSignIn: (() -> Void)? = nil, signInURL: URL? = nil) {
@@ -257,7 +260,7 @@ public struct OnboardingView: View {
VStack(alignment: .leading, spacing: 10) {
ForEach(v.choices, id: \.label) { choice in
Button {
- if choice.mode == .host { onboarding.host.openForm() } else { onboarding.send(.modeChosen(mode: .client)) }
+ selectedMode = choice.mode
} label: {
Text(choice.label)
.fontWeight(.semibold)
@@ -269,11 +272,10 @@ public struct OnboardingView: View {
.buttonStyle(.plain)
.background(Color(nsColor: .windowBackgroundColor), in: .rect(cornerRadius: 10))
.overlay(RoundedRectangle(cornerRadius: 10)
- .strokeBorder(choice.preselected ? Color.primary : Color(nsColor: .separatorColor),
- lineWidth: choice.preselected ? 2 : 1))
+ .strokeBorder(choice.mode == currentMode(v) ? Color.primary : Color(nsColor: .separatorColor),
+ lineWidth: choice.mode == currentMode(v) ? 2 : 1))
+ .accessibilityAddTraits(choice.mode == currentMode(v) ? .isSelected : [])
.accessibilityIdentifier(choice.mode == .host ? "onboarding-host" : "onboarding-client")
- // Return picks the preselected choice (the page has no other primary).
- .keyboardShortcut(choice.preselected ? .defaultAction : nil)
}
}
}
@@ -505,7 +507,11 @@ public struct OnboardingView: View {
.accessibilityIdentifier("agents-setup")
}
case .mode:
- EmptyView()
+ Button(v.primaryLabel) { continueMode(v) }
+ .buttonStyle(.borderedProminent)
+ .controlSize(.large)
+ .keyboardShortcut(.defaultAction)
+ .accessibilityIdentifier("onboarding-continue")
case .drive:
Button(v.primaryLabel) { Task { await onboarding.continueDrive() } }
.buttonStyle(.borderedProminent)
@@ -522,6 +528,15 @@ public struct OnboardingView: View {
}
}
+ private func currentMode(_ v: AppOnboardingView) -> AppOnboardingMode {
+ selectedMode ?? v.preselectedMode
+ }
+
+ /// Continue on This machine: the selected mode (host opens its form).
+ private func continueMode(_ v: AppOnboardingView) {
+ if currentMode(v) == .host { onboarding.host.openForm() } else { onboarding.send(.modeChosen(mode: .client)) }
+ }
+
private func skipShows(_ v: AppOnboardingView) -> Bool {
switch v.step {
case .agents: return onboarding.agentOutcomes == nil
@@ -546,7 +561,7 @@ public struct OnboardingView: View {
case .agents: onboarding.finishAgents(skipped: true)
case .presentation: onboarding.send(.presentationDone)
case .drive: Task { await onboarding.continueDrive() }
- case .mode: onboarding.send(.modeChosen(mode: .client))
+ case .mode: continueMode(onboarding.view)
case .done: onboarding.finish()
}
}
@@ -598,67 +613,40 @@ struct PresentationCardView: View {
}
}
-/// Done's example prompts (the core's), one quoted line each, scrolling
-/// up slowly and continuously to suggest what to ask a coding agent. Not
-/// interactive: it pauses under the pointer, and with Reduce Motion it is a
-/// static list of the first rows.
+/// Done's example prompts (the core's): "Try asking your agent:" and a few
+/// static lines. Each copies to the clipboard on click and says "Copied".
struct PromptTicker: View {
let prompts: [String]
- @Environment(\.accessibilityReduceMotion) private var reduceMotion
- @Environment(\.onboardingMotionStill) private var motionStill
- @State private var origin = Date()
- @State private var pausedAt: Date?
-
- static let rowHeight: CGFloat = 22
- static let visibleRows = 3
- /// Points per second: a row every 4 seconds (the Tauri app's too).
- static let speed: CGFloat = rowHeight / 4
+ @State private var copied: String?
var body: some View {
- let height = Self.rowHeight * CGFloat(Self.visibleRows + 1)
- Group {
- if reduceMotion || motionStill {
- rows(Array(prompts.prefix(Self.visibleRows)))
- } else {
- TimelineView(.animation(minimumInterval: 1.0 / 30, paused: pausedAt != nil)) { context in
- let cycle = Self.rowHeight * CGFloat(prompts.count)
- let elapsed = (pausedAt ?? context.date).timeIntervalSince(origin)
- let offset = (CGFloat(elapsed) * Self.speed).truncatingRemainder(dividingBy: max(cycle, 1))
- rows(prompts + prompts)
- .offset(y: -offset)
- .frame(height: height, alignment: .top)
- .clipped()
- .mask(LinearGradient(stops: [
- .init(color: .clear, location: 0), .init(color: .black, location: 0.125),
- .init(color: .black, location: 0.875), .init(color: .clear, location: 1),
- ], startPoint: .top, endPoint: .bottom))
- }
- .onHover { inside in
- if inside {
- pausedAt = Date()
- } else if let at = pausedAt {
- origin += Date().timeIntervalSince(at)
- pausedAt = nil
+ VStack(alignment: .leading, spacing: 4) {
+ Text("Try asking your agent:")
+ .foregroundStyle(.secondary)
+ .padding(.bottom, 2)
+ ForEach(prompts, id: \.self) { text in
+ Button {
+ NSPasteboard.general.clearContents()
+ NSPasteboard.general.setString(text, forType: .string)
+ copied = text
+ Task {
+ try? await Task.sleep(for: .seconds(1.5))
+ if copied == text { copied = nil }
+ }
+ } label: {
+ HStack(spacing: 10) {
+ Text("\u{201C}\(text)\u{201D}")
+ .foregroundStyle(.secondary)
+ .lineLimit(1)
+ if copied == text { Text("Copied") }
}
+ .frame(maxWidth: .infinity, alignment: .leading)
+ .contentShape(.rect)
}
- .accessibilityElement(children: .ignore)
- .accessibilityLabel("Example prompts")
- .accessibilityValue(prompts.joined(separator: ", "))
- }
- }
- .frame(height: height, alignment: .top)
- }
-
- private func rows(_ items: [String]) -> some View {
- VStack(alignment: .leading, spacing: 0) {
- ForEach(Array(items.enumerated()), id: \.offset) { _, text in
- Text("\u{201C}\(text)\u{201D}")
- .foregroundStyle(.secondary)
- .lineLimit(1)
- .frame(height: Self.rowHeight, alignment: .leading)
+ .buttonStyle(.plain)
+ .accessibilityHint("Copies this prompt")
}
}
- .frame(maxWidth: .infinity, alignment: .leading)
}
}
diff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/LoginItemTests.swift b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/LoginItemTests.swift
index 9b12c8b70b..b88471d25b 100644
--- a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/LoginItemTests.swift
+++ b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/LoginItemTests.swift
@@ -108,6 +108,8 @@ struct LoginItemTests {
.driveContinue, .modeChosen(mode: .client)] {
b.onboarding.send(a)
}
+ #expect(b.onboarding.view.launchAtLogin?.checked == true)
+ b.onboarding.send(.launchAtLoginToggled(on: false))
#expect(b.onboarding.view.launchAtLogin?.checked == false)
b.onboarding.finish()
#expect(unticked.calls == ["unregister"])
diff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ViewModelTests.swift b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ViewModelTests.swift
index 71b26fd6de..e5f45fd822 100644
--- a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ViewModelTests.swift
+++ b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ViewModelTests.swift
@@ -1280,8 +1280,8 @@ struct ViewModelTests {
o.send(.driveContinue)
o.send(.modeChosen(mode: .client))
#expect(o.view.step == .done)
- #expect(o.view.prompts.count == 7, "Done suggests what to ask a coding agent")
- #expect(o.view.prompts.first == "qa my app on windows, macos and linux")
+ #expect(o.view.prompts.count == 3, "Done suggests what to ask a coding agent")
+ #expect(o.view.prompts.first == "Open a Linux Space and run my test suite in it")
o.finish()
#expect(OnboardingModel(statePath: path).completed)
try? FileManager.default.removeItem(atPath: path)
diff --git a/apps/cua-spaces-web/src/bridge/__tests__/onboarding.test.tsx b/apps/cua-spaces-web/src/bridge/__tests__/onboarding.test.tsx
index 930b822df3..7636026285 100644
--- a/apps/cua-spaces-web/src/bridge/__tests__/onboarding.test.tsx
+++ b/apps/cua-spaces-web/src/bridge/__tests__/onboarding.test.tsx
@@ -303,16 +303,27 @@ describe.skipIf(!wasmBuilt)("Done's Launch at login", () => {
it('shows where the host applies it (Electron), and finishes with the choice', async () => {
const { probe, calls } = mount(await testCore(), 'electron');
await toDone(probe);
- expect(probe.flow.launchAtLogin).toMatchObject({ checked: false });
+ expect(probe.flow.launchAtLogin).toMatchObject({ checked: true });
expect(probe.flow.launchAtLogin?.label).toBeTruthy();
await act(async () => {
await probe.flow.finish();
});
expect(calls.filter(([op]) => op === 'session.completeOnboarding')).toEqual([
- ['session.completeOnboarding', { mode: 'client', launchAtLogin: false }],
+ ['session.completeOnboarding', { mode: 'client', launchAtLogin: true }],
]);
});
+ it('registers the login item only on Start, not while the box is merely ticked', async () => {
+ const { probe, calls } = mount(await testCore(), 'electron');
+ await toDone(probe);
+ expect(probe.flow.launchAtLogin).toMatchObject({ checked: true });
+ expect(calls.filter(([op]) => op === 'session.completeOnboarding' || String(op).startsWith('loginItem.'))).toEqual([]);
+ await act(async () => {
+ await probe.flow.finish();
+ });
+ expect(calls.filter(([op]) => op === 'session.completeOnboarding')).toHaveLength(1);
+ });
+
it('is not offered where the host does not apply it', async () => {
const { probe, calls } = mount(await testCore());
await toDone(probe);
diff --git a/apps/cua-spaces/src/components/InstallerFlow.test.tsx b/apps/cua-spaces/src/components/InstallerFlow.test.tsx
index 91683c18ec..0a2804faf9 100644
--- a/apps/cua-spaces/src/components/InstallerFlow.test.tsx
+++ b/apps/cua-spaces/src/components/InstallerFlow.test.tsx
@@ -197,21 +197,24 @@ describe("InstallerFlow", () => {
// Mode choice (§8.9), then done.
expect(await screen.findByText("How will you use this machine?")).toBeInTheDocument();
- fireEvent.click(screen.getByText("Access other machines"));
+ click("Continue");
expect(await screen.findByText("You're all set")).toBeInTheDocument();
expect(screen.getByText("/Users/ada/.local/bin/cua")).toBeInTheDocument();
expect(screen.getByText("[email protected]")).toBeInTheDocument();
expect(screen.getByText("Claude Code")).toBeInTheDocument();
expect(screen.getByText("Menu bar only")).toBeInTheDocument();
expect(drive.tools()).toEqual(["volume_mount_status", "volume_storage"]);
- // The example prompts scroll under both columns: the core's list, once
- // for assistive technology (the loop's second copy is hidden).
- const ticker = screen.getByRole("list", { name: "Example prompts" });
- const rows = within(ticker).getAllByRole("listitem");
- expect(rows).toHaveLength(7);
- expect(rows[0]).toHaveTextContent("\u201Cqa my app on windows, macos and linux\u201D");
- expect(ticker.querySelectorAll(".ob-ticker-again[aria-hidden='true']")).toHaveLength(7);
- expect(within(ticker).queryByRole("button")).toBeNull();
+ // Three static example prompts under a label; each copies on click.
+ expect(screen.getByText("Try asking your agent:")).toBeInTheDocument();
+ const prompts = within(screen.getByRole("list", { name: "Try asking your agent:" })).getAllByRole("button");
+ expect(prompts).toHaveLength(3);
+ expect(prompts[0]).toHaveTextContent("\u201COpen a Linux Space and run my test suite in it\u201D");
+ const writeText = vi.fn().mockResolvedValue(undefined);
+ Object.assign(navigator, { clipboard: { writeText } });
+ fireEvent.click(prompts[0]!);
+ await waitFor(() => expect(writeText).toHaveBeenCalledWith("Open a Linux Space and run my test suite in it"));
+ expect(await screen.findByText("Copied")).toBeInTheDocument();
+ expect(document.querySelector(".ob-ticker")).toBeNull();
click("Start using Cua Spaces");
expect(onDone).toHaveBeenCalledWith("client");
expect(host.calls).toEqual(["onboarding:client"]);
@@ -267,7 +270,8 @@ describe("InstallerFlow", () => {
click("Continue");
await screen.findByRole("heading", { name: "Cua Volume" });
click("Continue");
- fireEvent.click(await screen.findByText("Access other machines"));
+ await screen.findByText("How will you use this machine?");
+ click("Continue");
click(await screen.findByRole("button", { name: "Start using Cua Spaces" }).then((b) => b.textContent!));
expect(telemetry.signals).toEqual([]);
expect(telemetry.log).not.toContain("signals");
@@ -500,11 +504,11 @@ describe("InstallerFlow Cua Volume page", () => {
expect(await screen.findByText("Not available on this Mac yet")).toBeInTheDocument();
expect(box()).toBeDisabled();
expect(box()).not.toBeChecked();
+ // No storage answer: no choice to make.
+ expect(screen.queryByRole("radiogroup")).toBeNull();
click("Continue");
expect(await screen.findByText("How will you use this machine?")).toBeInTheDocument();
expect(drive.tools()).toEqual(["volume_mount_status", "volume_storage"]);
- // No storage answer: no choice to make.
- expect(screen.queryByRole("radiogroup")).toBeNull();
});
it("shows why mounting failed and stays; unticking an earlier mount unmounts", async () => {
@@ -883,6 +887,24 @@ describe("InstallerFlow launch at login", () => {
expect(readLaunchChoice()).toBe(true);
});
+ it("is ticked after choosing 'Access other machines' and registers nothing until Start", async () => {
+ const { fakeLoginItemBridge } = await import("../native/loginItem");
+ window.localStorage.clear();
+ const loginItem = fakeLoginItemBridge("notRegistered");
+ render(
+ <InstallerFlow
+ installer={createFakeInstallerBridge()}
+ host={createFakeHostBridge()}
+ initialStep="mode"
+ loginItem={loginItem}
+ onDone={vi.fn()}
+ />,
+ );
+ click("Continue");
+ expect(await screen.findByRole("checkbox", { name: "Launch at login" })).toBeChecked();
+ expect(loginItem.calls).toEqual([]);
+ });
+
it("respects an unticked box", async () => {
const { fakeLoginItemBridge } = await import("../native/loginItem");
const { readLaunchChoice } = await import("../model/loginItem");
diff --git a/apps/cua-spaces/src/components/InstallerFlow.tsx b/apps/cua-spaces/src/components/InstallerFlow.tsx
index 56bba1fa84..2e54f48a64 100644
--- a/apps/cua-spaces/src/components/InstallerFlow.tsx
+++ b/apps/cua-spaces/src/components/InstallerFlow.tsx
@@ -435,7 +435,7 @@ export function InstallerFlow({
<Page
title={view.title}
lede={view.lede}
- below={view.prompts.length > 0 ? <PromptTicker prompts={view.prompts} /> : undefined}
+ below={view.prompts.length > 0 ? <PromptList prompts={view.prompts} /> : undefined}
primary={
<button
type="button"
@@ -503,28 +503,41 @@ export function InstallerFlow({
}
/**
- * Done's example prompts (the core's), one quoted line each, scrolling up
- * slowly and continuously to suggest what to ask a coding agent. Not
- * interactive: CSS pauses it under the pointer, and with reduced motion it
- * is a static list of the first rows (the duplicate that makes the loop
- * seamless is hidden).
+ * Done's example prompts (the core's): a few static lines to ask a coding
+ * agent now that it has the cua skills and MCP server. Each copies to the
+ * clipboard on click and says "Copied".
*/
-function PromptTicker({ prompts }: { prompts: string[] }) {
- const row = (text: string) => `\u201C${text}\u201D`;
+function PromptList({ prompts }: { prompts: string[] }) {
+ const [copied, setCopied] = useState<string | null>(null);
+ const timer = useRef<number | undefined>(undefined);
+ useEffect(() => () => window.clearTimeout(timer.current), []);
+ const copy = (text: string) => {
+ void navigator.clipboard.writeText(text).then(
+ () => {
+ setCopied(text);
+ window.clearTimeout(timer.current);
+ timer.current = window.setTimeout(() => setCopied(null), 1500);
+ },
+ (error: unknown) => console.warn("[Cua Spaces] copy failed", error),
+ );
+ };
return (
- <div className="ob-ticker" role="list" aria-label="Example prompts">
- <div className="ob-ticker-track" style={{ animationDuration: `${prompts.length * 4}s` }}>
- {prompts.map((p) => (
- <div key={p} className="ob-ticker-row" role="listitem">
- {row(p)}
- </div>
- ))}
+ <div className="ob-prompts">
+ <p className="ob-prompts-label" id="ob-prompts-label">
+ Try asking your agent:
+ </p>
+ <ul className="ob-prompts-list" aria-labelledby="ob-prompts-label">
{prompts.map((p) => (
- <div key={`again-${p}`} className="ob-ticker-row ob-ticker-again" aria-hidden="true">
- {row(p)}
- </div>
+ <li key={p}>
+ <button type="button" className="ob-prompt" data-owns-enter onClick={() => copy(p)}>
+ <span>{`\u201C${p}\u201D`}</span>
+ <span className="ob-prompt-copied" aria-live="polite">
+ {copied === p ? "Copied" : ""}
+ </span>
+ </button>
+ </li>
))}
- </div>
+ </ul>
</div>
);
}
diff --git a/apps/cua-spaces/src/components/Onboarding.test.tsx b/apps/cua-spaces/src/components/Onboarding.test.tsx
index ef260d0152..805e960084 100644
--- a/apps/cua-spaces/src/components/Onboarding.test.tsx
+++ b/apps/cua-spaces/src/components/Onboarding.test.tsx
@@ -13,16 +13,32 @@ describe("Onboarding", () => {
const onDone = vi.fn();
render(<Onboarding host={host} onDone={onDone} />);
expect(screen.getByText("Set up this machine for unattended access")).toBeInTheDocument();
- fireEvent.click(screen.getByText("Access other machines"));
+ fireEvent.click(screen.getByRole("button", { name: "Continue" }));
await waitFor(() => expect(onDone).toHaveBeenCalledWith("client", undefined));
expect(host.calls).toEqual(["onboarding:client"]);
});
+ it("always shows an enabled Continue with 'Access other machines' selected, and Enter continues", async () => {
+ const host = createFakeHostBridge();
+ const onDone = vi.fn();
+ render(<Onboarding host={host} onDone={onDone} />);
+ expect(screen.getByRole("button", { name: "Continue" })).toBeEnabled();
+ expect(screen.getByRole("radio", { name: "Access other machines" })).toHaveAttribute("aria-checked", "true");
+ expect(screen.getByTestId("mode-later")).toHaveTextContent("This machine");
+ // Choosing a card only selects it.
+ fireEvent.click(screen.getByRole("radio", { name: "Set up this machine for unattended access" }));
+ expect(onDone).not.toHaveBeenCalled();
+ fireEvent.click(screen.getByRole("radio", { name: "Access other machines" }));
+ fireEvent.keyDown(document.body, { key: "Enter" });
+ await waitFor(() => expect(onDone).toHaveBeenCalledWith("client", undefined));
+ });
+
it("host path joins the relay by default and completes as host", async () => {
const host = createFakeHostBridge({ platform: "linux" });
const onDone = vi.fn();
render(<Onboarding host={host} onDone={onDone} identity="[email protected]" />);
fireEvent.click(screen.getByText("Set up this machine for unattended access"));
+ fireEvent.click(screen.getByRole("button", { name: "Continue" }));
expect(screen.getByText("Joins the Cua relay as [email protected]. No port forwarding.")).toBeInTheDocument();
// Direct ip:port is hidden until Advanced is opened.
expect(screen.queryByText(/Direct connection/)).toBeNull();
@@ -36,6 +52,7 @@ describe("Onboarding", () => {
const onDone = vi.fn();
render(<Onboarding host={host} onDone={onDone} />);
fireEvent.click(screen.getByText("Set up this machine for unattended access"));
+ fireEvent.click(screen.getByRole("button", { name: "Continue" }));
fireEvent.click(screen.getByRole("button", { name: "Advanced" }));
fireEvent.click(screen.getByLabelText(/Direct connection/));
const listen = screen.getByDisplayValue("0.0.0.0:3211");
diff --git a/apps/cua-spaces/src/components/Onboarding.tsx b/apps/cua-spaces/src/components/Onboarding.tsx
index 82275bb26a..a422802cbb 100644
--- a/apps/cua-spaces/src/components/Onboarding.tsx
+++ b/apps/cua-spaces/src/components/Onboarding.tsx
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: FSL-1.1-MIT
// Copyright (c) 2026 Cua AI, Inc.
-import { type ReactNode, useState } from "react";
+import { type ReactNode, useEffect, useState } from "react";
import { hostFormInitial, hostFormView } from "../model/host";
import { initialOnboarding, onboardingView, type OnboardingView } from "../model/onboarding";
@@ -41,6 +41,9 @@ export function Onboarding({
}) {
const view = viewProp ?? onboardingView({ ...initialOnboarding(installerMode ?? null, identity ?? null), step: "mode" });
const [form, setForm] = useState(view.preselectedMode === "host");
+ // Choosing only selects; Continue (or Enter) moves on. "Access other
+ // machines" is the default so the page always has an enabled way forward.
+ const [selected, setSelected] = useState<OnboardingMode>(view.preselectedMode ?? "client");
// The first run's telemetry (its notice on the Welcome page, the pages
// and Done) is the installer flow's, from the app core.
@@ -51,6 +54,22 @@ export function Onboarding({
.finally(() => onDone(mode, status));
};
+ const advance = () => (selected === "host" ? setForm(true) : finish("client"));
+
+ // Enter continues unless a button or field has focus and handles it itself.
+ useEffect(() => {
+ if (form) return;
+ const onKey = (e: KeyboardEvent) => {
+ if (e.key !== "Enter" || e.defaultPrevented) return;
+ const t = e.target as HTMLElement | null;
+ if (t && t.closest("button, a, input, textarea, select")) return;
+ e.preventDefault();
+ advance();
+ };
+ window.addEventListener("keydown", onKey);
+ return () => window.removeEventListener("keydown", onKey);
+ });
+
if (form) {
const formTitle = hostFormView(hostFormInitial(), identity).title;
return (
@@ -66,20 +85,34 @@ export function Onboarding({
}
return (
- <Page title={view.title} lede={view.lede} back={back ?? undefined}>
- <div className="new-space-cards" role="group" aria-label={view.title}>
+ <Page
+ title={view.title}
+ lede={view.lede}
+ back={back ?? undefined}
+ primary={
+ <button type="button" className="primary-button" data-owns-enter autoFocus onClick={advance}>
+ {view.primaryLabel}
+ </button>
+ }
+ >
+ <div className="new-space-cards" role="radiogroup" aria-label={view.title}>
{view.choices.map((c) => (
<button
key={c.mode}
type="button"
- className={`new-space-card${c.preselected ? " new-space-card-primary" : ""}`}
+ role="radio"
+ aria-checked={c.mode === selected}
+ className={`new-space-card${c.mode === selected ? " new-space-card-primary" : ""}`}
data-owns-enter
- onClick={() => (c.mode === "host" ? setForm(true) : finish("client"))}
+ onClick={() => setSelected(c.mode)}
>
<span className="new-space-card-title">{c.label}</span>
</button>
))}
</div>
+ <p className="host-setup-lede" data-testid="mode-later">
+ Change it later from This machine in your Spaces list.
+ </p>
{view.notice && (
<p className="onboarding-telemetry-notice" data-testid="telemetry-notice">
{view.notice}{" "}
diff --git a/apps/cua-spaces/src/components/desktop/MainWindow.test.tsx b/apps/cua-spaces/src/components/desktop/MainWindow.test.tsx
index 55d5bd566a..695a87b9c5 100644
--- a/apps/cua-spaces/src/components/desktop/MainWindow.test.tsx
+++ b/apps/cua-spaces/src/components/desktop/MainWindow.test.tsx
@@ -62,7 +62,8 @@ describe("MainWindow", () => {
fireEvent.click(await screen.findByRole("button", { name: "Continue" }));
// No Cua Volume page without its experiment (Settings, Experiments).
expect(screen.queryByRole("heading", { name: "Cua Volume" })).toBeNull();
- fireEvent.click(await screen.findByText("Access other machines"));
+ await screen.findByText("Access other machines");
+ fireEvent.click(screen.getByRole("button", { name: "Continue" }));
fireEvent.click(await screen.findByRole("button", { name: "Start using Cua Spaces" }));
expect(await screen.findByRole("listbox", { name: "Cua Cloud" })).toBeInTheDocument();
expect(host.state.onboarding).toMatchObject({ completed: true, mode: "client" });
diff --git a/apps/cua-spaces/src/styles/desktop.css b/apps/cua-spaces/src/styles/desktop.css
index 028e783b27..f85ae204a0 100644
--- a/apps/cua-spaces/src/styles/desktop.css
+++ b/apps/cua-spaces/src/styles/desktop.css
@@ -2858,49 +2858,44 @@ html.is-teleport-picker .hp-panel {
white-space: nowrap;
}
-/* Done: the example prompts under both columns, scrolling up slowly (the
- list twice, so the loop is seamless), paused under the pointer, static
- with reduced motion. Three rows show, fading at the edges. */
+/* Done: a label and three static example prompts under both columns; each
+ copies on click. */
.dw .ob-page-below {
grid-column: 1 / -1;
min-width: 0;
}
-.dw .ob-ticker {
- height: 66px;
- overflow: hidden;
+.dw .ob-prompts-label {
+ margin: 0 0 6px;
color: var(--dw-text-2);
- -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent);
- mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent);
-}
-.dw .ob-ticker-track {
- animation: ob-ticker 28s linear infinite;
+ font-size: 13px;
}
-.dw .ob-ticker:hover .ob-ticker-track {
- animation-play-state: paused;
+.dw .ob-prompts-list {
+ display: grid;
+ gap: 2px;
+ margin: 0;
+ padding: 0;
+ list-style: none;
}
-.dw .ob-ticker-row {
- height: 22px;
- overflow: hidden;
+.dw .ob-prompt {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ min-width: 0;
+ padding: 3px 0;
+ border: 0;
+ background: none;
+ color: var(--dw-text-2);
+ font: inherit;
line-height: 22px;
- text-overflow: ellipsis;
- white-space: nowrap;
+ text-align: left;
+ cursor: pointer;
}
-@keyframes ob-ticker {
- to {
- transform: translateY(-50%);
- }
+.dw .ob-prompt:hover {
+ color: var(--dw-text);
}
-@media (prefers-reduced-motion: reduce) {
- .dw .ob-ticker {
- -webkit-mask-image: none;
- mask-image: none;
- }
- .dw .ob-ticker-track {
- animation: none;
- }
- .dw .ob-ticker-again {
- display: none;
- }
+.dw .ob-prompt-copied {
+ color: var(--dw-text);
+ font-size: 12px;
}
/* The Stream section (the core's `spaces::stream` rows): one line each, an
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/onboarding-settings.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/onboarding-settings.mdx
index 454d35a0e4..d520ef820b 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/onboarding-settings.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/onboarding-settings.mdx
@@ -246,7 +246,7 @@ Returned by [`app_onboarding_view`](#app_onboarding_view).
| `summary` | [`Vec<AppFact>`](/cua-sdk/reference/spaces/app-core/window#appfact-record) | | Done's facts. |
| `choices` | [`Vec<AppModeChoice>`](#appmodechoice-record) | | This machine's two answers (the installer's preselection first highlighted), on its page. |
| `presentations` | [`Vec<AppPresentationCard>`](#apppresentationcard-record) | | The presentation page's two cards, side by side. |
-| `prompts` | `Vec<String>` | | Done's example prompts (`PROMPTS`), one line each: shown under both columns, scrolling slowly, to suggest what to ask a coding agent. Not interactive. |
+| `prompts` | `Vec<String>` | | Done's example prompts (`PROMPTS`), one line each: shown under both columns under "Try asking your agent:", to suggest what to ask a coding agent. Each copies to the clipboard on click. |
| `notice` | `Option<String>` | | The first-run telemetry notice (the Welcome page, so the first run itself can be measured): nothing is sent before it has been shown once. |
| `notice_link_label` / `noticeLinkLabel` | `Option<String>` | | Its link: label. |
| `notice_link_url` / `noticeLinkUrl` | `Option<String>` | | Its link: URL. |
diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/drive-onboarding.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/drive-onboarding.json
index 410f7982f0..dbae8dfcfb 100644
--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/drive-onboarding.json
+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/drive-onboarding.json
@@ -197,20 +197,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,Cua Volume,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -341,20 +337,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,Cua Volume,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -544,20 +536,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/experiments.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/experiments.json
index 90caafead8..f8a3ee0d2e 100644
--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/experiments.json
+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/experiments.json
@@ -26,20 +26,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces and agents available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces and agents available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -137,20 +133,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,Cua Volume,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -268,20 +260,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,Cua Volume,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -403,20 +391,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,Cua Volume,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -524,20 +508,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,Cua Volume,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -645,20 +625,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,Cua Volume,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces, agents and Cua Volume available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -765,20 +741,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces and agents available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces and agents available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -891,20 +863,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces and agents available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces and agents available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -1012,20 +980,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces and agents available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces and agents available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -1131,20 +1095,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces and agents available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces and agents available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -1252,20 +1212,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces and agents available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces and agents available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/launch-at-login.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/launch-at-login.json
index b5ba7f76d4..07490bfc50 100644
--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/launch-at-login.json
+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/launch-at-login.json
@@ -9,20 +9,16 @@
"dots": "Welcome,Sign in,AI agents,Menu bar,This machine,*Done",
"drive": null,
"driveStorage": null,
- "launchAtLogin": "[ ] Launch at login ~Keeps your Spaces and agents available after a restart.",
+ "launchAtLogin": "[x] Launch at login ~Keeps your Spaces and agents available after a restart.",
"lede": "Cua Spaces is in your menu bar.",
"notice": null,
"noticeLink": null,
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -36,7 +32,7 @@
"title": "You're all set",
"usage": null
},
- "launchAtLogin": false,
+ "launchAtLogin": true,
"onboarding": "mode-chosen"
},
{
@@ -54,13 +50,9 @@
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -92,13 +84,9 @@
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -130,13 +118,9 @@
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
@@ -168,13 +152,9 @@
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/main-window.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/main-window.json
index 5ee27278b9..1c637ebef1 100644
--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/main-window.json
+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/main-window.json
@@ -1119,13 +1119,9 @@
"presentations": [],
"primary": "Start using Cua Spaces",
"prompts": [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there"
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer"
],
"showMark": false,
"step": "done",
diff --git a/libs/cua/crates/cua-spaces-app-core/src/onboarding.rs b/libs/cua/crates/cua-spaces-app-core/src/onboarding.rs
index ef66fa9afc..b78eb5e491 100644
--- a/libs/cua/crates/cua-spaces-app-core/src/onboarding.rs
+++ b/libs/cua/crates/cua-spaces-app-core/src/onboarding.rs
@@ -504,7 +504,6 @@ pub fn reduce(s: &OnboardingState, a: &OnboardingAction) -> OnboardingState {
}
(Mode, OnboardingAction::ModeChosen { mode }) => {
n.mode = Some(*mode);
- n.launch_at_login = *mode == OnboardingMode::Host;
n.step = Done;
}
(_, OnboardingAction::DriveChecked { os, status }) => {
@@ -688,8 +687,8 @@ pub struct OnboardingView {
/// The presentation page's two cards, side by side.
pub presentations: Vec<PresentationCard>,
/// Done's example prompts ([`PROMPTS`]), one line each: shown under
- /// both columns, scrolling slowly, to suggest what to ask a coding
- /// agent. Not interactive.
+ /// both columns under "Try asking your agent:", to suggest what to ask a
+ /// coding agent. Each copies to the clipboard on click.
pub prompts: Vec<String>,
/// The first-run telemetry notice (the Welcome page, so the first run
/// itself can be measured): nothing is sent before it has been shown
@@ -953,30 +952,16 @@ pub struct PresentationCard {
pub selected: bool,
}
-/// Done's example prompts, in order. Each is something a coding agent
-/// with the cua MCP server and skills (set up on the AI agents page), the
-/// cua SDK and the Cua docs does today:
-///
-/// - QA on three OSes: `create_space` (the `windows`, `macos` and `linux`
-/// images), `upload`, `space_bash`, `open_space_viewer`;
-/// - an agent app on the SDK: `Space.agent_start` / `sandbox.agents()`
-/// (docs: Run a coding agent in a sandbox);
-/// - open an app and PiP it: `create_space`, `send_file`, `space_bash`,
-/// `show_space_pip`;
-/// - stream a window into an app: the SDK's `stream_space_window` and
-/// `stream_endpoint` (docs: Stream a desktop);
-/// - teleport a browser: `teleport_manifest`, `teleport_app`, then
+/// Done's example prompts: what to ask a coding agent once it has the cua
+/// skills and MCP server. Each works with the shipped tools:
+/// - a Linux test run: `create_space`, `upload`, `space_bash`;
+/// - finish a web task in a Space's browser: `teleport_browser_session`, then
/// `call_tool` on the Space's cua-driver;
-/// - a Cua Bench taskset: the Cua Bench quickstart and Write a task docs;
-/// - a Linux test run: `create_space`, `upload`, `space_bash`.
-pub const PROMPTS: [&str; 7] = [
- "qa my app on windows, macos and linux",
- "use the cua sdk to build an agent app that runs codex in a space",
- "open my app in a space and pip it",
- "use the cua sdk to stream a space's window into my app",
- "teleport my browser into a space and finish the checkout test",
- "use the cua docs to set up a cua bench taskset",
- "spin up a linux space and run the test suite there",
+/// - sharing: `share_space` (role viewer).
+pub const PROMPTS: [&str; 3] = [
+ "Open a Linux Space and run my test suite in it",
+ "Use my Space's browser to finish the checkout test and show me",
+ "Share this Space with a teammate as a viewer",
];
/// The presentation cards for a choice (notch first, the default).
@@ -1743,10 +1728,12 @@ mod tests {
let done = view(&s);
assert_eq!(done.prompts, PROMPTS, "Done shows the example prompts");
assert!(
- done.prompts
- .iter()
- .all(|p| !p.contains('\n') && p.chars().count() <= 72 && p.to_lowercase() == *p),
- "short lowercase lines"
+ done.prompts.len() == 3
+ && done
+ .prompts
+ .iter()
+ .all(|p| !p.contains('\n') && p.chars().count() <= 72),
+ "short single lines"
);
s.step = OnboardingStep::Mode;
assert!(view(&s).prompts.is_empty(), "only on Done");
@@ -1780,7 +1767,7 @@ mod tests {
}
#[test]
- fn launch_at_login_defaults_to_the_chosen_mode() {
+ fn launch_at_login_is_ticked_whatever_mode_is_chosen() {
for installer_mode in [
None,
Some(OnboardingMode::Client),
@@ -1798,7 +1785,9 @@ mod tests {
s = reduce(&s, &action);
}
assert_eq!(s.step, OnboardingStep::Done);
- let expected = mode == OnboardingMode::Host;
+ // Ticked for both modes: an unattended host needs it, and a
+ // client keeps its Spaces and agents after a restart.
+ let expected = true;
assert_eq!(s.launch_at_login, expected);
let checkbox = view(&s).launch_at_login.unwrap();
assert_eq!(checkbox.checked, expected);
@@ -1810,7 +1799,8 @@ mod tests {
assert_eq!(view(&s).launch_at_login.unwrap().checked, !expected);
s = reduce(&s, &OnboardingAction::Back);
s = reduce(&s, &OnboardingAction::ModeChosen { mode });
- assert_eq!(s.launch_at_login, expected);
+ // Choosing the mode again keeps the user's untick.
+ assert_eq!(s.launch_at_login, !expected);
}
}
}
diff --git a/libs/cua/crates/cua-spaces-ffi/src/app_core_types.rs b/libs/cua/crates/cua-spaces-ffi/src/app_core_types.rs
index a6b6ad6cf3..5563db6c68 100644
--- a/libs/cua/crates/cua-spaces-ffi/src/app_core_types.rs
+++ b/libs/cua/crates/cua-spaces-ffi/src/app_core_types.rs
@@ -5799,8 +5799,8 @@ pub struct AppOnboardingView {
/// The presentation page's two cards, side by side.
pub presentations: Vec<AppPresentationCard>,
/// Done's example prompts ([`PROMPTS`]), one line each: shown under
- /// both columns, scrolling slowly, to suggest what to ask a coding
- /// agent. Not interactive.
+ /// both columns under "Try asking your agent:", to suggest what to ask a
+ /// coding agent. Each copies to the clipboard on click.
pub prompts: Vec<String>,
/// The first-run telemetry notice (the Welcome page, so the first run
/// itself can be measured): nothing is sent before it has been shown
diff --git a/libs/spaces-app-swift/Sources/CuaSpacesFFI/CuaSpacesFFI.swift b/libs/spaces-app-swift/Sources/CuaSpacesFFI/CuaSpacesFFI.swift
index f57cc36b02..65cd0d5b1c 100644
--- a/libs/spaces-app-swift/Sources/CuaSpacesFFI/CuaSpacesFFI.swift
+++ b/libs/spaces-app-swift/Sources/CuaSpacesFFI/CuaSpacesFFI.swift
@@ -22624,8 +22624,8 @@ public struct AppOnboardingView: Equatable, Hashable {
public var presentations: [AppPresentationCard]
/**
* Done's example prompts ([`PROMPTS`]), one line each: shown under
- * both columns, scrolling slowly, to suggest what to ask a coding
- * agent. Not interactive.
+ * both columns under "Try asking your agent:", to suggest what to ask a
+ * coding agent. Each copies to the clipboard on click.
*/
public var prompts: [String]
/**
@@ -22698,8 +22698,8 @@ public struct AppOnboardingView: Equatable, Hashable {
*/presentations: [AppPresentationCard],
/**
* Done's example prompts ([`PROMPTS`]), one line each: shown under
- * both columns, scrolling slowly, to suggest what to ask a coding
- * agent. Not interactive.
+ * both columns under "Try asking your agent:", to suggest what to ask a
+ * coding agent. Each copies to the clipboard on click.
*/prompts: [String],
/**
* The first-run telemetry notice (the Welcome page, so the first run