Skip to content

The platform for continuously improving AI agents.

Fix mobile sign-in and streamline agent onboarding (#282)

Tyler-Edwards3cfac9a6b505
diff --git a/frontend/src/components/coding-agent-icon.tsx b/frontend/src/components/coding-agent-icon.tsx
index a5d84f0d..af6edaea 100644
--- a/frontend/src/components/coding-agent-icon.tsx
+++ b/frontend/src/components/coding-agent-icon.tsx
@@ -2,11 +2,18 @@ import ClaudeCode from "@lobehub/icons/es/ClaudeCode/components/Mono";
import Codex from "@lobehub/icons/es/Codex/components/Mono";
import Cursor from "@lobehub/icons/es/Cursor/components/Mono";
import GeminiCLI from "@lobehub/icons/es/GeminiCLI/components/Mono";
+import OpenCode from "@lobehub/icons/es/OpenCode/components/Mono";
import { Icon } from "@/components/ui/icons";
export function CodingAgentIcon({ kind }: { kind: string }) {
- const Logo = { claude: ClaudeCode, codex: Codex, cursor: Cursor, gemini: GeminiCLI }[kind];
+ const Logo = {
+ claude: ClaudeCode,
+ codex: Codex,
+ cursor: Cursor,
+ gemini: GeminiCLI,
+ opencode: OpenCode,
+ }[kind];
if (Logo) return <Logo className="size-4 shrink-0" />;
return kind === "coding_agent" ? (
<Icon.agent className="size-4 shrink-0" />
diff --git a/frontend/src/components/quickstart/onboard-with-ai-panel.tsx b/frontend/src/components/quickstart/onboard-with-ai-panel.tsx
index 7246c87c..975f3345 100644
--- a/frontend/src/components/quickstart/onboard-with-ai-panel.tsx
+++ b/frontend/src/components/quickstart/onboard-with-ai-panel.tsx
@@ -1,11 +1,6 @@
-import { useState } from "react";
-
import { trackEvent } from "@/analytics";
-import { Alert } from "@/components/ui/alert";
-import { Button } from "@/components/ui/button";
-import { Icon } from "@/components/ui/icons";
+import { PromptAgentActions } from "@/components/quickstart/prompt-agent-actions";
import { config } from "@/config";
-import { writeClipboardText } from "@/lib/clipboard";
import { onboardingPrompt } from "@/lib/mcp-setup";
import { cn } from "@/lib/utils";
@@ -24,9 +19,6 @@ export function OnboardWithAiPanel({
projectId?: string;
waitingHint?: string;
}) {
- const [copiedPrompt, setCopiedPrompt] = useState<string>();
- const [copyError, setCopyError] = useState("");
-
const prompt = onboardingPrompt(
window.location.origin,
config.apiUrl,
@@ -34,23 +26,6 @@ export function OnboardWithAiPanel({
);
const guide = `${window.location.origin}/setup.md`;
- const promptCopied = copiedPrompt === prompt;
-
- const copyPrompt = () =>
- writeClipboardText(prompt).then(
- () => {
- setCopyError("");
- setCopiedPrompt(prompt);
- trackEvent("setup_prompt_copied", { dataset_id: datasetId, project_id: projectId });
- onPromptCopied?.();
- },
- () => {
- setCopiedPrompt(undefined);
- setCopyError("Couldn't copy — select the prompt text and copy it manually.");
- trackEvent("setup_prompt_copy_failed", { dataset_id: datasetId, project_id: projectId });
- }
- );
-
return (
<div className={cn(compact ? "space-y-2" : "space-y-3", className)}>
{!compact && (
@@ -84,16 +59,23 @@ export function OnboardWithAiPanel({
prompt
)}
</p>
- <Button className="w-full gap-2" onClick={() => void copyPrompt()} size="sm" type="button">
- {promptCopied ? <Icon.success /> : <Icon.copy />}
- <span>{promptCopied ? "Prompt copied" : "Copy onboarding prompt"}</span>
- </Button>
- {promptCopied ? (
- <p aria-live="polite" className="text-xs text-muted-foreground">
- Paste the prompt into your coding agent to start setup.
- </p>
- ) : null}
- {copyError ? <Alert variant="destructive">{copyError}</Alert> : null}
+ <PromptAgentActions
+ onCopied={() => {
+ trackEvent("setup_prompt_copied", { dataset_id: datasetId, project_id: projectId });
+ onPromptCopied?.();
+ }}
+ onCopyFailed={() =>
+ trackEvent("setup_prompt_copy_failed", { dataset_id: datasetId, project_id: projectId })
+ }
+ onOpenClicked={(agent) =>
+ trackEvent("setup_prompt_open_clicked", {
+ agent,
+ dataset_id: datasetId,
+ project_id: projectId,
+ })
+ }
+ prompt={prompt}
+ />
{waitingHint ? <p className="text-xs text-muted-foreground">{waitingHint}</p> : null}
</div>
);
diff --git a/frontend/src/components/quickstart/onboarding-milestones.tsx b/frontend/src/components/quickstart/onboarding-milestones.tsx
index d0837417..2b9c91ee 100644
--- a/frontend/src/components/quickstart/onboarding-milestones.tsx
+++ b/frontend/src/components/quickstart/onboarding-milestones.tsx
@@ -1,13 +1,28 @@
import { useEffect, useState } from "react";
import { CodingAgentIcon } from "@/components/coding-agent-icon";
+import { PromptAgentActions } from "@/components/quickstart/prompt-agent-actions";
import { Alert } from "@/components/ui/alert";
import { Card } from "@/components/ui/card";
import { LoadingState } from "@/components/ui/spinner";
+import { config } from "@/config";
import { useOnboardingMilestones } from "@/hooks/use-activity";
import { cn } from "@/lib/utils";
-function StageLabel({ text, active }: { text: string; active: boolean }) {
+const completedLabels: Record<string, string> = {
+ agent_connected: "Connected project",
+ capabilities_described: "Described capabilities",
+ capabilities_discovered: "Discovered capabilities",
+ capabilities_instrumented: "Instrumented capabilities",
+ configuration_validated: "Validated configuration",
+ overmind_installed: "Installed Overmind",
+ repository_inspected: "Inspected repository",
+ repository_synced: "Synced capabilities",
+ snapshot_written: "Wrote snapshot",
+ source_references_verified: "Verified source references",
+};
+
+function StageLabel({ text }: { text: string }) {
const [length, setLength] = useState(0);
useEffect(() => {
const preference = window.matchMedia("(prefers-reduced-motion: reduce)");
@@ -34,19 +49,13 @@ function StageLabel({ text, active }: { text: string; active: boolean }) {
};
}, [text]);
return (
- <h2
- aria-current={active ? "step" : undefined}
- className="relative shrink-0 whitespace-nowrap pr-3 text-sm font-medium"
- >
+ <h2 className="relative shrink-0 whitespace-nowrap pr-3 text-sm font-medium">
<span className="sr-only">{text}</span>
<span aria-hidden="true" className="invisible">
{text}
</span>
<span aria-hidden="true" className="absolute inset-0">
{text.slice(0, length)}
- {active && (
- <span className="ml-1 inline-block h-4 w-2 translate-y-0.5 bg-foreground motion-safe:animate-[blink_1s_step-end_infinite]" />
- )}
</span>
</h2>
);
@@ -105,7 +114,12 @@ export function OnboardingMilestones({
const completed = steps.filter((step) => step.completedAt).length;
const current = steps.find((step) => !step.completedAt);
- const stage = current?.label ?? "Your agent is set up";
+ const lastCompleted = steps.filter((step) => step.completedAt).at(-1);
+ const stage = current
+ ? lastCompleted
+ ? (completedLabels[lastCompleted.kind] ?? lastCompleted.label)
+ : "Waiting for setup"
+ : "Your agent is set up";
const reporter = current?.actorName ? current : steps.find((step) => step.actorName);
const connected = steps.some((step) => step.kind === "agent_connected" && step.completedAt);
const synced = steps.some((step) => step.kind === "repository_synced" && step.completedAt);
@@ -118,6 +132,13 @@ export function OnboardingMilestones({
.map((asset) => [asset.id, asset.label] as const)
)
);
+ const progressResource = `overmind://activity?path=agent${projectId ? `&project_id=${encodeURIComponent(projectId)}` : ""}`;
+ const prompt = [
+ `Continue setting up this Overmind project${projectId ? ` (project_id: ${projectId})` : ""} using the API at ${config.apiUrl}.`,
+ `Read the setup guide at ${window.location.origin}/setup.md. If this coding agent lacks the Overmind CLI or MCP connection, run the guide's install and init steps first. Then check live onboarding progress through MCP by reading ${progressResource} before doing any other setup work.`,
+ "Use the live milestones and saved project state to identify the current setup stage. Skip anything already completed and continue with the remaining steps in order.",
+ "Recheck live progress before each remaining step and after completing it. If setup is already complete, report that and stop. If authentication is pending, report the blocker instead of guessing the stage or restarting setup.",
+ ].join("\n\n");
const name = connected ? (projectName ?? "Connected") : "Waiting for connection";
return (
@@ -128,7 +149,12 @@ export function OnboardingMilestones({
aria-live="polite"
className="flex flex-wrap items-center justify-between gap-3"
>
- <StageLabel active={!!current} key={stage} text={stage} />
+ <StageLabel key={stage} text={stage} />
+ {current && (
+ <span aria-current="step" className="sr-only">
+ {current.label}
+ </span>
+ )}
{reporter?.actorName && reporter.actorKind && (
<span
aria-label="Onboarding agent"
@@ -191,6 +217,12 @@ export function OnboardingMilestones({
</div>
</dl>
</Card>
+ {current && (
+ <Card className="flex flex-row items-center justify-between gap-3 border-primary bg-primary px-3 py-2 text-primary-foreground">
+ <p className="text-xs">Finish setup in your coding agent.</p>
+ <PromptAgentActions defaultAgent={reporter?.actorKind} inverted prompt={prompt} />
+ </Card>
+ )}
{query.error && (
<Alert variant="destructive">
Couldn’t refresh progress. Showing the last saved update.
diff --git a/frontend/src/components/quickstart/prompt-agent-actions.test.tsx b/frontend/src/components/quickstart/prompt-agent-actions.test.tsx
new file mode 100644
index 00000000..ed3e1757
--- /dev/null
+++ b/frontend/src/components/quickstart/prompt-agent-actions.test.tsx
@@ -0,0 +1,50 @@
+// @vitest-environment jsdom
+// covers: console-logic
+
+import { cleanup, render, screen } from "@testing-library/react";
+import { afterEach, describe, expect, it, vi } from "vitest";
+
+import { PromptAgentActions } from "@/components/quickstart/prompt-agent-actions";
+
+const prompt = "Set me up on Overmind\n\nnow";
+
+afterEach(() => {
+ cleanup();
+ vi.restoreAllMocks();
+});
+
+describe("PromptAgentActions", () => {
+ it.each([
+ [undefined],
+ [null],
+ ["coding_agent"],
+ ["opencode"],
+ ])("offers a labeled copy and no app link for agent %s", (defaultAgent) => {
+ render(<PromptAgentActions defaultAgent={defaultAgent} prompt={prompt} />);
+ expect(screen.getByRole("button", { name: "Copy prompt" }).textContent).toBe("Copy prompt");
+ expect(screen.queryByRole("link")).toBeNull();
+ expect(screen.getByRole("button", { name: "Choose coding agent" })).toBeTruthy();
+ });
+
+ it.each([
+ ["claude", "Open in Claude Code", "claude://code/new?q="],
+ ["codex", "Open in Codex", "codex://new?prompt="],
+ ["cursor", "Open in Cursor", "cursor://anysphere.cursor-deeplink/prompt?text="],
+ ])("links a known %s session to its app and keeps copy", (defaultAgent, name, url) => {
+ render(<PromptAgentActions defaultAgent={defaultAgent} prompt={prompt} />);
+ expect(screen.getByRole("link", { name }).getAttribute("href")).toBe(
+ url + encodeURIComponent(prompt)
+ );
+ expect(screen.getByRole("button", { name: "Copy prompt" })).toBeTruthy();
+ });
+
+ it("offers only copy on a phone", () => {
+ vi.spyOn(window.navigator, "userAgent", "get").mockReturnValue(
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X)"
+ );
+ render(<PromptAgentActions defaultAgent="codex" prompt={prompt} />);
+ expect(screen.getByRole("button", { name: "Copy prompt" })).toBeTruthy();
+ expect(screen.queryByRole("link")).toBeNull();
+ expect(screen.queryByRole("button", { name: "Choose coding agent" })).toBeNull();
+ });
+});
diff --git a/frontend/src/components/quickstart/prompt-agent-actions.tsx b/frontend/src/components/quickstart/prompt-agent-actions.tsx
new file mode 100644
index 00000000..83bf7b5b
--- /dev/null
+++ b/frontend/src/components/quickstart/prompt-agent-actions.tsx
@@ -0,0 +1,123 @@
+import { useState } from "react";
+
+import { toast } from "sonner";
+
+import { CodingAgentIcon } from "@/components/coding-agent-icon";
+import { Button } from "@/components/ui/button";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import { Icon } from "@/components/ui/icons";
+import { writeClipboardText } from "@/lib/clipboard";
+import { isMobileBrowser } from "@/lib/platform";
+import { cn } from "@/lib/utils";
+
+// OpenCode's desktop link needs a local directory, which the Console does not know.
+const agents: { id: string; label: string; url?: string }[] = [
+ { id: "claude", label: "Claude Code", url: "claude://code/new?q=" },
+ { id: "codex", label: "Codex", url: "codex://new?prompt=" },
+ { id: "cursor", label: "Cursor", url: "cursor://anysphere.cursor-deeplink/prompt?text=" },
+ { id: "opencode", label: "OpenCode" },
+];
+
+export function PromptAgentActions({
+ prompt,
+ defaultAgent,
+ inverted = false,
+ onCopied,
+ onCopyFailed,
+ onOpenClicked,
+}: {
+ prompt: string;
+ defaultAgent?: string | null;
+ inverted?: boolean;
+ onCopied?: () => void;
+ onCopyFailed?: () => void;
+ onOpenClicked?: (agent: string) => void;
+}) {
+ const [selectedAgent, setSelectedAgent] = useState<string>();
+ const agent = agents.find((option) => option.id === (selectedAgent ?? defaultAgent));
+ // Agent links open desktop apps, so a phone can only copy.
+ const mobile = isMobileBrowser();
+ const url = !mobile && agent?.url;
+ const colors = inverted
+ ? "bg-primary-foreground text-primary hover:bg-primary-foreground/90"
+ : "";
+ const divider = inverted ? "border-l-primary/40" : "border-l-primary-foreground/40";
+
+ async function copyPrompt() {
+ try {
+ await writeClipboardText(prompt);
+ toast.success("Prompt copied");
+ onCopied?.();
+ } catch {
+ toast.error("Couldn't copy the prompt. Try again.");
+ onCopyFailed?.();
+ }
+ }
+
+ return (
+ <div aria-label="Coding agent actions" className="inline-flex shrink-0" role="group">
+ {url ? (
+ <>
+ <Button
+ aria-label="Copy prompt"
+ className={cn("rounded-r-none", colors)}
+ onClick={() => void copyPrompt()}
+ size="icon-sm"
+ >
+ <Icon.copy />
+ </Button>
+ <Button asChild className={cn("rounded-none", divider, colors)} size="sm">
+ <a
+ aria-label={`Open in ${agent.label}`}
+ href={url + encodeURIComponent(prompt)}
+ onClick={() => onOpenClicked?.(agent.id)}
+ >
+ <CodingAgentIcon kind={agent.id} />
+ Open in {agent.label}
+ </a>
+ </Button>
+ </>
+ ) : (
+ <Button
+ className={cn(!mobile && "rounded-r-none", colors)}
+ onClick={() => void copyPrompt()}
+ size="sm"
+ >
+ <Icon.copy />
+ Copy prompt
+ </Button>
+ )}
+ {!mobile && (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button
+ aria-label="Choose coding agent"
+ className={cn("rounded-l-none", divider, colors)}
+ size="icon-sm"
+ >
+ <Icon.chevronDown />
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ {agents.map((option) => (
+ <DropdownMenuItem
+ aria-label={option.label}
+ key={option.id}
+ onSelect={() => setSelectedAgent(option.id)}
+ >
+ <CodingAgentIcon kind={option.id} />
+ {option.label}
+ {agent?.id === option.id && <Icon.success className="ml-auto" />}
+ </DropdownMenuItem>
+ ))}
+ </DropdownMenuContent>
+ </DropdownMenu>
+ )}
+ </div>
+ );
+}
diff --git a/frontend/src/components/quickstart/quickstart-embed.tsx b/frontend/src/components/quickstart/quickstart-embed.tsx
index b205e55d..86b79eab 100644
--- a/frontend/src/components/quickstart/quickstart-embed.tsx
+++ b/frontend/src/components/quickstart/quickstart-embed.tsx
@@ -26,7 +26,7 @@ export function QuickstartEmbed({
if (projectId && milestones.isLoading) return <LoadingState label="Loading setup progress" />;
if (source === "agent" && connected) {
return (
- <section aria-label="Agent onboarding" className="w-full max-w-md">
+ <section aria-label="Agent onboarding" className="w-full max-w-2xl">
<OnboardingMilestones projectId={projectId} projectName={projectName} />
</section>
);
diff --git a/frontend/src/lib/job-status.tsx b/frontend/src/lib/job-status.tsx
index 31165a3a..4314aa86 100644
--- a/frontend/src/lib/job-status.tsx
+++ b/frontend/src/lib/job-status.tsx
@@ -158,7 +158,7 @@ export function ResolvedStatusBadge({
<span className="relative z-10 inline-flex items-center gap-1">
{cfg.spinning &&
actorKind &&
- ["codex", "claude", "cursor", "gemini", "coding_agent"].includes(actorKind) ? (
+ ["codex", "claude", "cursor", "gemini", "opencode", "coding_agent"].includes(actorKind) ? (
<CodingAgentIcon kind={actorKind} />
) : (
icon
diff --git a/frontend/src/lib/platform.ts b/frontend/src/lib/platform.ts
index affaba1a..548dbf44 100644
--- a/frontend/src/lib/platform.ts
+++ b/frontend/src/lib/platform.ts
@@ -1,2 +1,7 @@
// Evaluated once at module load — safe in this CSR-only Vite app.
export const isMac = typeof navigator !== "undefined" && /Mac/i.test(navigator.userAgent);
+
+// iPadOS can identify as a Mac; touch points distinguish it from desktop Safari.
+export const isMobileBrowser = () =>
+ /Android|iPhone|iPad|iPod/i.test(navigator.userAgent) ||
+ (/Macintosh/i.test(navigator.userAgent) && navigator.maxTouchPoints > 1);
diff --git a/frontend/src/mobile-login.test.tsx b/frontend/src/mobile-login.test.tsx
new file mode 100644
index 00000000..1795d4a2
--- /dev/null
+++ b/frontend/src/mobile-login.test.tsx
@@ -0,0 +1,85 @@
+// @vitest-environment jsdom
+// @vitest-environment-options {"url":"http://localhost:5173"}
+// covers: authentication
+
+import {
+ type AnyRoute,
+ createMemoryHistory,
+ createRootRoute,
+ createRouter,
+ RouterProvider,
+} from "@tanstack/react-router";
+import { cleanup, render, screen } from "@testing-library/react";
+import { afterEach, beforeAll, describe, expect, it, vi } from "vitest";
+
+vi.mock("@clerk/clerk-react", () => ({
+ SignIn: (props: Record<string, string>) => (
+ <div data-flow={props.oauthFlow} data-next={props.forceRedirectUrl} data-testid="clerk" />
+ ),
+ SignUp: (props: Record<string, string>) => (
+ <div data-flow={props.oauthFlow} data-next={props.forceRedirectUrl} data-testid="clerk" />
+ ),
+}));
+
+const root = createRootRoute();
+let routeTree: AnyRoute;
+
+beforeAll(async () => {
+ vi.stubEnv("VITE_CLERK_PUBLISHABLE_KEY", "pk_test_mobile");
+ vi.stubEnv("VITE_SELF_HOSTED", "false");
+ vi.resetModules();
+ window.matchMedia ??= ((query: string) => ({
+ addEventListener: () => {},
+ matches: false,
+ media: query,
+ removeEventListener: () => {},
+ })) as unknown as typeof window.matchMedia;
+ const { Route } = await import("@/routes/login");
+ routeTree = root.addChildren([
+ Route.update({ getParentRoute: () => root, id: "/login", path: "/login" } as never),
+ ]);
+});
+
+afterEach(() => {
+ cleanup();
+ vi.restoreAllMocks();
+ Reflect.deleteProperty(window.navigator, "maxTouchPoints");
+ window.history.replaceState(null, "", "/");
+});
+
+describe.each(["signin", "signup"])("%s OAuth handoff", (mode) => {
+ it.each([
+ ["iPhone", "Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X)", 5, "redirect"],
+ ["Android", "Mozilla/5.0 (Linux; Android 15) Chrome/130.0 Mobile", 5, "redirect"],
+ [
+ "iPad desktop mode",
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) Version/18.0 Safari/605.1.15",
+ 5,
+ "redirect",
+ ],
+ [
+ "desktop Mac",
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) Version/18.0 Safari/605.1.15",
+ 0,
+ "popup",
+ ],
+ ["touchscreen Windows", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/130.0", 10, "popup"],
+ ])("uses the intended browser flow on %s and preserves MCP consent", async (_, userAgent, maxTouchPoints, flow) => {
+ vi.spyOn(window.navigator, "userAgent", "get").mockReturnValue(userAgent as string);
+ Object.defineProperty(window.navigator, "maxTouchPoints", {
+ configurable: true,
+ value: maxTouchPoints,
+ });
+ const next = "/oauth/authorize?request=abc_123-xyz";
+ const url = `/login?next=${encodeURIComponent(next)}${mode === "signup" ? "&mode=signup" : ""}`;
+ window.history.replaceState(null, "", url);
+ const router = createRouter({
+ history: createMemoryHistory({ initialEntries: [url] }),
+ routeTree,
+ });
+ render(<RouterProvider router={router} />);
+ const clerk = await screen.findByTestId("clerk");
+ expect(clerk.getAttribute("data-flow")).toBe(flow);
+ expect(clerk.getAttribute("data-next")).toBe(next);
+ });
+});
diff --git a/frontend/src/routes/login.tsx b/frontend/src/routes/login.tsx
index 98a2d8c5..83e9d439 100644
--- a/frontend/src/routes/login.tsx
+++ b/frontend/src/routes/login.tsx
@@ -10,6 +10,7 @@ import { useAuthContext } from "@/contexts/auth-context";
import { useLoginGate } from "@/hooks/use-login-gate";
import { safeNextPath } from "@/lib/auth-redirect";
import { PUBLIC_PRICING_URL } from "@/lib/marketing";
+import { isMobileBrowser } from "@/lib/platform";
export const Route = createFileRoute("/login")({
component: RouteComponent,
@@ -38,6 +39,7 @@ function RouteComponent() {
const signInUrl = `/login${nextQuery ? `?${nextQuery}` : ""}`;
const signUpUrl = `/login?mode=signup${nextQuery ? `&${nextQuery}` : ""}`;
const forceRedirectUrl = safeNext ?? undefined;
+ const oauthFlow = isMobileBrowser() ? "redirect" : "popup";
if (gate.kind === "loading") {
return (
@@ -75,7 +77,7 @@ function RouteComponent() {
appearance={CLERK_APPEARANCE}
fallback={<AuthenticationLoadingState />}
forceRedirectUrl={forceRedirectUrl}
- oauthFlow="popup"
+ oauthFlow={oauthFlow}
routing="hash"
signInUrl={signInUrl}
/>
@@ -84,7 +86,7 @@ function RouteComponent() {
appearance={CLERK_APPEARANCE}
fallback={<AuthenticationLoadingState />}
forceRedirectUrl={forceRedirectUrl}
- oauthFlow="popup"
+ oauthFlow={oauthFlow}
routing="hash"
signUpUrl={signUpUrl}
/>
diff --git a/overbae/services/activity.py b/overbae/services/activity.py
index 95260585..f99bf56d 100644
--- a/overbae/services/activity.py
+++ b/overbae/services/activity.py
@@ -26,7 +26,7 @@ AGENTS = (
(re.compile(r"^(openai-)?codex\b"), "codex", "Codex"),
(re.compile(r"^cursor\b"), "cursor", "Cursor"),
(re.compile(r"^gemini[- ]cli\b"), "gemini", "Gemini CLI"),
- (re.compile(r"^opencode\b"), "coding_agent", "OpenCode"),
+ (re.compile(r"^opencode\b"), "opencode", "OpenCode"),
)
diff --git a/tests/journeys/test_data.py b/tests/journeys/test_data.py
index fca5623e..3d792856 100644
--- a/tests/journeys/test_data.py
+++ b/tests/journeys/test_data.py
@@ -76,7 +76,7 @@ def hand_uploaded_data_to_the_coding_agent(console, tmp_path):
navigator.clipboard.writeText = async text => { window.copiedOnboardingPrompt = text; };
}""")
)
- console.press("Copy onboarding prompt")
+ console.press("Copy prompt")
console.wait_until("() => window.copiedOnboardingPrompt.length > 0")
prompt = console._browser.call(lambda: console._page.evaluate("window.copiedOnboardingPrompt"))
assert prompt.startswith(
diff --git a/tests/journeys/test_observe.py b/tests/journeys/test_observe.py
index 75890df4..5dfd0a04 100644
--- a/tests/journeys/test_observe.py
+++ b/tests/journeys/test_observe.py
@@ -80,7 +80,7 @@ def copy_the_onboarding_prompt(console, console_url, live_api):
console._browser.call(
console._page.context.grant_permissions, ["clipboard-read", "clipboard-write"]
)
- console.press("Copy onboarding prompt")
+ console.press("Copy prompt")
console.sees("Prompt copied")
prompt = console._browser.call(console._page.evaluate, "navigator.clipboard.readText()")
assert prompt == (
@@ -105,7 +105,7 @@ def copy_the_onboarding_prompt(console, console_url, live_api):
console._browser.call(
lambda: console._page.get_by_role("tab", name="Agent", exact=True).click()
)
- console.sees("Copy onboarding prompt")
+ console.sees("Copy prompt")
def keep_new_api_keys_out_of_session_replay(console, project, replay_recorder):
diff --git a/tests/test_activity_contract.py b/tests/test_activity_contract.py
index ef40970b..d6a5a4c0 100644
--- a/tests/test_activity_contract.py
+++ b/tests/test_activity_contract.py
@@ -16,6 +16,7 @@ from overbae.models import (
FinetuningJob,
ProjectMembership,
)
+from overbae.services.activity import actor
from overbae.services.mcp.context import bind_context
from overbae.services.mcp.resources import read_resource
@@ -228,3 +229,17 @@ def test_preparation_completion_rejects_foreign_outputs_and_unfinished_jobs():
state="cancelled",
)
assert call_tool("update_dataset_preparation", args, context).isError
+
+
+ "client,kind",
+ [
+ ("claude-code", "claude"),
+ ("Codex", "codex"),
+ ("cursor-vscode", "cursor"),
+ ("opencode", "opencode"),
+ ("some-client", "coding_agent"),
+ ],
+)
+def test_every_supported_harness_keeps_its_identity(client, kind):
+ assert actor(client)[0] == kind