chore(foundry): improve sandbox impl + status pill (#252)

* Improve Daytona sandbox provisioning and frontend UI

Refactor git clone script in Daytona provider to use cleaner shell logic for GitHub token authentication and branch checkout. Add support for private repository clones with token-based auth. Improve Daytona provider error handling and git configuration setup.

Frontend improvements include enhanced dev panel, workspace dashboard, sidebar navigation, and UI components for better task/session management. Update interest manager and backend client to support improved session state handling.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* Add header status pill showing task/session/sandbox state

Surface aggregate status (error, provisioning, running, ready, no sandbox)
as a colored pill in the transcript panel header. Integrates task runtime
status, session status, and sandbox availability via the sandboxProcesses
interest topic so the pill accurately reflects unreachable sandboxes.

Includes mock tasks demonstrating error, provisioning, and running states,
unit tests for deriveHeaderStatus, and workspace-dashboard integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Nathan Flurry 2026-03-14 12:14:06 -07:00 committed by GitHub
parent 5a1b32a271
commit 70d31f819c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
82 changed files with 2625 additions and 4166 deletions

View file

@ -43,7 +43,7 @@ import type {
} from "@sandbox-agent/foundry-shared";
import type { ProcessCreateRequest, ProcessInfo, ProcessLogFollowQuery, ProcessLogsResponse, ProcessSignalQuery } from "sandbox-agent";
import { createMockBackendClient } from "./mock/backend-client.js";
import { sandboxInstanceKey, taskKey, workspaceKey } from "./keys.js";
import { taskKey, taskSandboxKey, workspaceKey } from "./keys.js";
export type TaskAction = "push" | "sync" | "merge" | "archive" | "kill";
@ -54,7 +54,7 @@ export interface SandboxSessionRecord {
lastConnectionId: string;
createdAt: number;
destroyedAt?: number;
status?: "running" | "idle" | "error";
status?: "pending_provision" | "pending_session_create" | "ready" | "running" | "idle" | "error";
}
export interface SandboxSessionEventRecord {
@ -137,23 +137,26 @@ interface TaskHandle {
connect(): ActorConn;
}
interface SandboxInstanceHandle {
interface TaskSandboxHandle {
connect(): ActorConn;
createSession(input: {
prompt: string;
cwd?: string;
agent?: AgentType | "opencode";
}): Promise<{ id: string | null; status: "running" | "idle" | "error"; error?: string }>;
id?: string;
agent: string;
model?: string;
sessionInit?: {
cwd?: string;
};
}): Promise<{ id: string }>;
listSessions(input?: { cursor?: string; limit?: number }): Promise<{ items: SandboxSessionRecord[]; nextCursor?: string }>;
listSessionEvents(input: { sessionId: string; cursor?: string; limit?: number }): Promise<{ items: SandboxSessionEventRecord[]; nextCursor?: string }>;
getEvents(input: { sessionId: string; cursor?: string; limit?: number }): Promise<{ items: SandboxSessionEventRecord[]; nextCursor?: string }>;
createProcess(input: ProcessCreateRequest): Promise<SandboxProcessRecord>;
listProcesses(): Promise<{ processes: SandboxProcessRecord[] }>;
getProcessLogs(input: { processId: string; query?: ProcessLogFollowQuery }): Promise<ProcessLogsResponse>;
stopProcess(input: { processId: string; query?: ProcessSignalQuery }): Promise<SandboxProcessRecord>;
killProcess(input: { processId: string; query?: ProcessSignalQuery }): Promise<SandboxProcessRecord>;
deleteProcess(input: { processId: string }): Promise<void>;
sendPrompt(input: { sessionId: string; prompt: string; notification?: boolean }): Promise<void>;
sessionStatus(input: { sessionId: string }): Promise<{ id: string; status: "running" | "idle" | "error" }>;
getProcessLogs(processId: string, query?: ProcessLogFollowQuery): Promise<ProcessLogsResponse>;
stopProcess(processId: string, query?: ProcessSignalQuery): Promise<SandboxProcessRecord>;
killProcess(processId: string, query?: ProcessSignalQuery): Promise<SandboxProcessRecord>;
deleteProcess(processId: string): Promise<void>;
rawSendSessionMethod(sessionId: string, method: string, params: Record<string, unknown>): Promise<unknown>;
destroySession(sessionId: string): Promise<void>;
sandboxAgentConnection(): Promise<{ endpoint: string; token?: string }>;
providerState(): Promise<{ providerId: ProviderId; sandboxId: string; state: string; at: number }>;
}
@ -166,8 +169,10 @@ interface RivetClient {
get(key?: string | string[]): TaskHandle;
getOrCreate(key?: string | string[], opts?: { createWithInput?: unknown }): TaskHandle;
};
sandboxInstance: {
getOrCreate(key?: string | string[], opts?: { createWithInput?: unknown }): SandboxInstanceHandle;
taskSandbox: {
get(key?: string | string[]): TaskSandboxHandle;
getOrCreate(key?: string | string[], opts?: { createWithInput?: unknown }): TaskSandboxHandle;
getForId(actorId: string): TaskSandboxHandle;
};
}
@ -423,8 +428,8 @@ export function createBackendClient(options: BackendClientOptions): BackendClien
const task = async (workspaceId: string, repoId: string, taskId: string): Promise<TaskHandle> => client.task.get(taskKey(workspaceId, repoId, taskId));
const sandboxByKey = async (workspaceId: string, providerId: ProviderId, sandboxId: string): Promise<SandboxInstanceHandle> => {
return (client as any).sandboxInstance.get(sandboxInstanceKey(workspaceId, providerId, sandboxId));
const sandboxByKey = async (workspaceId: string, _providerId: ProviderId, sandboxId: string): Promise<TaskSandboxHandle> => {
return (client as any).taskSandbox.get(taskSandboxKey(workspaceId, sandboxId));
};
function isActorNotFoundError(error: unknown): boolean {
@ -432,7 +437,7 @@ export function createBackendClient(options: BackendClientOptions): BackendClien
return message.includes("Actor not found");
}
const sandboxByActorIdFromTask = async (workspaceId: string, providerId: ProviderId, sandboxId: string): Promise<SandboxInstanceHandle | null> => {
const sandboxByActorIdFromTask = async (workspaceId: string, providerId: ProviderId, sandboxId: string): Promise<TaskSandboxHandle | null> => {
const ws = await workspace(workspaceId);
const rows = await ws.listTasks({ workspaceId });
const candidates = [...rows].sort((a, b) => b.updatedAt - a.updatedAt);
@ -451,7 +456,7 @@ export function createBackendClient(options: BackendClientOptions): BackendClien
(sb as any).sandboxActorId.length > 0,
) as { sandboxActorId?: string } | undefined;
if (sandbox?.sandboxActorId) {
return (client as any).sandboxInstance.getForId(sandbox.sandboxActorId);
return (client as any).taskSandbox.getForId(sandbox.sandboxActorId);
}
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
@ -469,7 +474,7 @@ export function createBackendClient(options: BackendClientOptions): BackendClien
workspaceId: string,
providerId: ProviderId,
sandboxId: string,
run: (handle: SandboxInstanceHandle) => Promise<T>,
run: (handle: TaskSandboxHandle) => Promise<T>,
): Promise<T> => {
const handle = await sandboxByKey(workspaceId, providerId, sandboxId);
try {
@ -511,48 +516,65 @@ export function createBackendClient(options: BackendClientOptions): BackendClien
const getWorkbenchCompat = async (workspaceId: string): Promise<TaskWorkbenchSnapshot> => {
const summary = await (await workspace(workspaceId)).getWorkspaceSummary({ workspaceId });
const tasks = await Promise.all(
summary.taskSummaries.map(async (taskSummary) => {
const detail = await (await task(workspaceId, taskSummary.repoId, taskSummary.id)).getTaskDetail();
const sessionDetails = await Promise.all(
detail.sessionsSummary.map(async (session) => {
const full = await (await task(workspaceId, detail.repoId, detail.id)).getSessionDetail({ sessionId: session.id });
return [session.id, full] as const;
}),
);
const sessionDetailsById = new Map(sessionDetails);
return {
id: detail.id,
repoId: detail.repoId,
title: detail.title,
status: detail.status,
repoName: detail.repoName,
updatedAtMs: detail.updatedAtMs,
branch: detail.branch,
pullRequest: detail.pullRequest,
tabs: detail.sessionsSummary.map((session) => {
const full = sessionDetailsById.get(session.id);
return {
id: session.id,
sessionId: session.sessionId,
sessionName: session.sessionName,
agent: session.agent,
model: session.model,
status: session.status,
thinkingSinceMs: session.thinkingSinceMs,
unread: session.unread,
created: session.created,
draft: full?.draft ?? { text: "", attachments: [], updatedAtMs: null },
transcript: full?.transcript ?? [],
};
}),
fileChanges: detail.fileChanges,
diffs: detail.diffs,
fileTree: detail.fileTree,
minutesUsed: detail.minutesUsed,
};
}),
);
const tasks = (
await Promise.all(
summary.taskSummaries.map(async (taskSummary) => {
let detail;
try {
detail = await (await task(workspaceId, taskSummary.repoId, taskSummary.id)).getTaskDetail();
} catch (error) {
if (isActorNotFoundError(error)) {
return null;
}
throw error;
}
const sessionDetails = await Promise.all(
detail.sessionsSummary.map(async (session) => {
try {
const full = await (await task(workspaceId, detail.repoId, detail.id)).getSessionDetail({ sessionId: session.id });
return [session.id, full] as const;
} catch (error) {
if (isActorNotFoundError(error)) {
return null;
}
throw error;
}
}),
);
const sessionDetailsById = new Map(sessionDetails.filter((entry): entry is readonly [string, WorkbenchSessionDetail] => entry !== null));
return {
id: detail.id,
repoId: detail.repoId,
title: detail.title,
status: detail.status,
repoName: detail.repoName,
updatedAtMs: detail.updatedAtMs,
branch: detail.branch,
pullRequest: detail.pullRequest,
tabs: detail.sessionsSummary.map((session) => {
const full = sessionDetailsById.get(session.id);
return {
id: session.id,
sessionId: session.sessionId,
sessionName: session.sessionName,
agent: session.agent,
model: session.model,
status: session.status,
thinkingSinceMs: session.thinkingSinceMs,
unread: session.unread,
created: session.created,
draft: full?.draft ?? { text: "", attachments: [], updatedAtMs: null },
transcript: full?.transcript ?? [],
};
}),
fileChanges: detail.fileChanges,
diffs: detail.diffs,
fileTree: detail.fileTree,
minutesUsed: detail.minutesUsed,
};
}),
)
).filter((task): task is TaskWorkbenchSnapshot["tasks"][number] => task !== null);
const projects = summary.repos
.map((repo) => ({
@ -639,8 +661,7 @@ export function createBackendClient(options: BackendClientOptions): BackendClien
if (!entry.disposeConnPromise) {
entry.disposeConnPromise = (async () => {
const handle = await sandboxByKey(workspaceId, providerId, sandboxId);
const conn = (handle as any).connect();
const conn = await connectSandbox(workspaceId, providerId, sandboxId);
const unsubscribeEvent = conn.on("processesUpdated", () => {
const current = sandboxProcessSubscriptions.get(key);
if (!current) {
@ -958,17 +979,22 @@ export function createBackendClient(options: BackendClientOptions): BackendClien
}): Promise<{ id: string; status: "running" | "idle" | "error" }> {
const created = await withSandboxHandle(input.workspaceId, input.providerId, input.sandboxId, async (handle) =>
handle.createSession({
prompt: input.prompt,
cwd: input.cwd,
agent: input.agent,
agent: input.agent ?? "claude",
sessionInit: {
cwd: input.cwd,
},
}),
);
if (!created.id) {
throw new Error(created.error ?? "sandbox session creation failed");
if (input.prompt.trim().length > 0) {
await withSandboxHandle(input.workspaceId, input.providerId, input.sandboxId, async (handle) =>
handle.rawSendSessionMethod(created.id, "session/prompt", {
prompt: [{ type: "text", text: input.prompt }],
}),
);
}
return {
id: created.id,
status: created.status,
status: "idle",
};
},
@ -987,7 +1013,7 @@ export function createBackendClient(options: BackendClientOptions): BackendClien
sandboxId: string,
input: { sessionId: string; cursor?: string; limit?: number },
): Promise<{ items: SandboxSessionEventRecord[]; nextCursor?: string }> {
return await withSandboxHandle(workspaceId, providerId, sandboxId, async (handle) => handle.listSessionEvents(input));
return await withSandboxHandle(workspaceId, providerId, sandboxId, async (handle) => handle.getEvents(input));
},
async createSandboxProcess(input: {
@ -1010,7 +1036,7 @@ export function createBackendClient(options: BackendClientOptions): BackendClien
processId: string,
query?: ProcessLogFollowQuery,
): Promise<ProcessLogsResponse> {
return await withSandboxHandle(workspaceId, providerId, sandboxId, async (handle) => handle.getProcessLogs({ processId, query }));
return await withSandboxHandle(workspaceId, providerId, sandboxId, async (handle) => handle.getProcessLogs(processId, query));
},
async stopSandboxProcess(
@ -1020,7 +1046,7 @@ export function createBackendClient(options: BackendClientOptions): BackendClien
processId: string,
query?: ProcessSignalQuery,
): Promise<SandboxProcessRecord> {
return await withSandboxHandle(workspaceId, providerId, sandboxId, async (handle) => handle.stopProcess({ processId, query }));
return await withSandboxHandle(workspaceId, providerId, sandboxId, async (handle) => handle.stopProcess(processId, query));
},
async killSandboxProcess(
@ -1030,11 +1056,11 @@ export function createBackendClient(options: BackendClientOptions): BackendClien
processId: string,
query?: ProcessSignalQuery,
): Promise<SandboxProcessRecord> {
return await withSandboxHandle(workspaceId, providerId, sandboxId, async (handle) => handle.killProcess({ processId, query }));
return await withSandboxHandle(workspaceId, providerId, sandboxId, async (handle) => handle.killProcess(processId, query));
},
async deleteSandboxProcess(workspaceId: string, providerId: ProviderId, sandboxId: string, processId: string): Promise<void> {
await withSandboxHandle(workspaceId, providerId, sandboxId, async (handle) => handle.deleteProcess({ processId }));
await withSandboxHandle(workspaceId, providerId, sandboxId, async (handle) => handle.deleteProcess(processId));
},
subscribeSandboxProcesses(workspaceId: string, providerId: ProviderId, sandboxId: string, listener: () => void): () => void {
@ -1050,10 +1076,8 @@ export function createBackendClient(options: BackendClientOptions): BackendClien
notification?: boolean;
}): Promise<void> {
await withSandboxHandle(input.workspaceId, input.providerId, input.sandboxId, async (handle) =>
handle.sendPrompt({
sessionId: input.sessionId,
prompt: input.prompt,
notification: input.notification,
handle.rawSendSessionMethod(input.sessionId, "session/prompt", {
prompt: [{ type: "text", text: input.prompt }],
}),
);
},
@ -1064,7 +1088,10 @@ export function createBackendClient(options: BackendClientOptions): BackendClien
sandboxId: string,
sessionId: string,
): Promise<{ id: string; status: "running" | "idle" | "error" }> {
return await withSandboxHandle(workspaceId, providerId, sandboxId, async (handle) => handle.sessionStatus({ sessionId }));
return {
id: sessionId,
status: "idle",
};
},
async sandboxProviderState(

View file

@ -2,6 +2,14 @@ import type { TopicData, TopicKey, TopicParams } from "./topics.js";
export type TopicStatus = "loading" | "connected" | "error";
export interface DebugInterestTopic {
topicKey: TopicKey;
cacheKey: string;
listenerCount: number;
status: TopicStatus;
lastRefreshAt: number | null;
}
export interface TopicState<K extends TopicKey> {
data: TopicData<K> | undefined;
status: TopicStatus;
@ -20,5 +28,6 @@ export interface InterestManager {
getSnapshot<K extends TopicKey>(topicKey: K, params: TopicParams<K>): TopicData<K> | undefined;
getStatus<K extends TopicKey>(topicKey: K, params: TopicParams<K>): TopicStatus;
getError<K extends TopicKey>(topicKey: K, params: TopicParams<K>): Error | null;
listDebugTopics(): DebugInterestTopic[];
dispose(): void;
}

View file

@ -1,5 +1,5 @@
import type { BackendClient } from "../backend-client.js";
import type { InterestManager, TopicStatus } from "./manager.js";
import type { DebugInterestTopic, InterestManager, TopicStatus } from "./manager.js";
import { topicDefinitions, type TopicData, type TopicDefinition, type TopicKey, type TopicParams } from "./topics.js";
const GRACE_PERIOD_MS = 30_000;
@ -19,7 +19,7 @@ export class RemoteInterestManager implements InterestManager {
let entry = this.entries.get(cacheKey);
if (!entry) {
entry = new TopicEntry(definition, this.backend, params as any);
entry = new TopicEntry(topicKey, cacheKey, definition, this.backend, params as any);
this.entries.set(cacheKey, entry);
}
@ -53,6 +53,13 @@ export class RemoteInterestManager implements InterestManager {
return this.entries.get((topicDefinitions[topicKey] as any).key(params))?.error ?? null;
}
listDebugTopics(): DebugInterestTopic[] {
return [...this.entries.values()]
.filter((entry) => entry.listenerCount > 0)
.map((entry) => entry.getDebugTopic())
.sort((left, right) => left.cacheKey.localeCompare(right.cacheKey));
}
dispose(): void {
for (const entry of this.entries.values()) {
entry.dispose();
@ -66,6 +73,7 @@ class TopicEntry<TData, TParams, TEvent> {
status: TopicStatus = "loading";
error: Error | null = null;
listenerCount = 0;
lastRefreshAt: number | null = null;
private readonly listeners = new Set<() => void>();
private conn: Awaited<ReturnType<TopicDefinition<TData, TParams, TEvent>["connect"]>> | null = null;
@ -76,11 +84,23 @@ class TopicEntry<TData, TParams, TEvent> {
private started = false;
constructor(
private readonly topicKey: TopicKey,
private readonly cacheKey: string,
private readonly definition: TopicDefinition<TData, TParams, TEvent>,
private readonly backend: BackendClient,
private readonly params: TParams,
) {}
getDebugTopic(): DebugInterestTopic {
return {
topicKey: this.topicKey,
cacheKey: this.cacheKey,
listenerCount: this.listenerCount,
status: this.status,
lastRefreshAt: this.lastRefreshAt,
};
}
addListener(listener: () => void): void {
this.listeners.add(listener);
this.listenerCount = this.listeners.size;
@ -125,6 +145,7 @@ class TopicEntry<TData, TParams, TEvent> {
this.data = undefined;
this.status = "loading";
this.error = null;
this.lastRefreshAt = null;
this.started = false;
}
@ -140,6 +161,7 @@ class TopicEntry<TData, TParams, TEvent> {
return;
}
this.data = this.definition.applyEvent(this.data, event);
this.lastRefreshAt = Date.now();
this.notify();
});
this.unsubscribeError = this.conn.onError((error: unknown) => {
@ -149,6 +171,7 @@ class TopicEntry<TData, TParams, TEvent> {
});
this.data = await this.definition.fetchInitial(this.backend, this.params);
this.status = "connected";
this.lastRefreshAt = Date.now();
this.started = true;
this.notify();
} catch (error) {

View file

@ -12,8 +12,8 @@ export function taskKey(workspaceId: string, repoId: string, taskId: string): Ac
return ["ws", workspaceId, "project", repoId, "task", taskId];
}
export function sandboxInstanceKey(workspaceId: string, providerId: string, sandboxId: string): ActorKey {
return ["ws", workspaceId, "provider", providerId, "sandbox", sandboxId];
export function taskSandboxKey(workspaceId: string, sandboxId: string): ActorKey {
return ["ws", workspaceId, "sandbox", sandboxId];
}
export function historyKey(workspaceId: string, repoId: string): ActorKey {
@ -27,8 +27,3 @@ export function projectPrSyncKey(workspaceId: string, repoId: string): ActorKey
export function projectBranchSyncKey(workspaceId: string, repoId: string): ActorKey {
return ["ws", workspaceId, "project", repoId, "branch-sync"];
}
export function taskStatusSyncKey(workspaceId: string, repoId: string, taskId: string, sandboxId: string, sessionId: string): ActorKey {
// Include sandbox + session so multiple sandboxes/sessions can be tracked per task.
return ["ws", workspaceId, "project", repoId, "task", taskId, "status-sync", sandboxId, sessionId];
}

View file

@ -1,3 +1,4 @@
import type { WorkbenchModelId } from "@sandbox-agent/foundry-shared";
import { injectMockLatency } from "./mock/latency.js";
import rivetDevFixture from "../../../scripts/data/rivet-dev.json" with { type: "json" };
@ -58,7 +59,7 @@ export interface MockFoundryOrganizationSettings {
slug: string;
primaryDomain: string;
seatAccrualMode: "first_prompt";
defaultModel: "claude-sonnet-4" | "claude-opus-4" | "gpt-4o" | "o3";
defaultModel: WorkbenchModelId;
autoImportRepos: boolean;
}
@ -177,7 +178,7 @@ function buildRivetOrganization(): MockFoundryOrganization {
slug: "rivet",
primaryDomain: "rivet.dev",
seatAccrualMode: "first_prompt",
defaultModel: "o3",
defaultModel: "gpt-5.3-codex",
autoImportRepos: true,
},
github: {

View file

@ -9,12 +9,6 @@ const QUEUED_STATUSES = new Set<TaskStatus>([
"init_enqueue_provision",
"init_ensure_name",
"init_assert_name",
"init_create_sandbox",
"init_ensure_agent",
"init_start_sandbox_instance",
"init_create_session",
"init_write_db",
"init_start_status_sync",
"init_complete",
"archive_stop_status_sync",
"archive_release_sandbox",

View file

@ -26,8 +26,12 @@ export const MODEL_GROUPS: ModelGroup[] = [
{
provider: "OpenAI",
models: [
{ id: "gpt-4o", label: "GPT-4o" },
{ id: "o3", label: "o3" },
{ id: "gpt-5.3-codex", label: "GPT-5.3 Codex" },
{ id: "gpt-5.4", label: "GPT-5.4" },
{ id: "gpt-5.2-codex", label: "GPT-5.2 Codex" },
{ id: "gpt-5.1-codex-max", label: "GPT-5.1 Codex Max" },
{ id: "gpt-5.2", label: "GPT-5.2" },
{ id: "gpt-5.1-codex-mini", label: "GPT-5.1 Codex Mini" },
],
},
];
@ -334,7 +338,7 @@ export function buildInitialTasks(): Task[] {
sessionId: "t2",
sessionName: "Test coverage",
agent: "Codex",
model: "gpt-4o",
model: "gpt-5.3-codex",
status: "idle",
thinkingSinceMs: null,
unread: true,
@ -1083,7 +1087,7 @@ export function buildInitialTasks(): Task[] {
sessionId: "t10",
sessionName: "Namespace fix",
agent: "Codex",
model: "gpt-4o",
model: "gpt-5.3-codex",
status: "idle",
thinkingSinceMs: null,
unread: true,
@ -1120,6 +1124,109 @@ export function buildInitialTasks(): Task[] {
fileTree: [],
minutesUsed: 3,
},
// ── Status demo tasks ──────────────────────────────────────────────
{
id: "status-error",
repoId: "sandbox-agent",
title: "Fix broken auth middleware (error demo)",
status: "error",
runtimeStatus: "error",
statusMessage: "session:error",
repoName: "rivet-dev/sandbox-agent",
updatedAtMs: minutesAgo(2),
branch: "fix/auth-middleware",
pullRequest: null,
tabs: [
{
id: "status-error-tab",
sessionId: "status-error-session",
sessionName: "Auth fix",
agent: "Claude",
model: "claude-sonnet-4",
status: "error",
thinkingSinceMs: null,
unread: false,
created: true,
errorMessage: "Sandbox process exited unexpectedly (exit code 137). The sandbox may have run out of memory.",
draft: { text: "", attachments: [], updatedAtMs: null },
transcript: [],
},
],
fileChanges: [],
diffs: {},
fileTree: [],
minutesUsed: 1,
},
{
id: "status-provisioning",
repoId: "sandbox-agent",
title: "Add rate limiting to API gateway (provisioning demo)",
status: "new",
runtimeStatus: "init_enqueue_provision",
statusMessage: "Queueing sandbox provisioning.",
repoName: "rivet-dev/sandbox-agent",
updatedAtMs: minutesAgo(0),
branch: null,
pullRequest: null,
tabs: [
{
id: "status-prov-tab",
sessionId: null,
sessionName: "Session 1",
agent: "Claude",
model: "claude-sonnet-4",
status: "pending_provision",
thinkingSinceMs: null,
unread: false,
created: false,
draft: { text: "", attachments: [], updatedAtMs: null },
transcript: [],
},
],
fileChanges: [],
diffs: {},
fileTree: [],
minutesUsed: 0,
},
{
id: "status-running",
repoId: "sandbox-agent",
title: "Refactor WebSocket handler (running demo)",
status: "running",
runtimeStatus: "running",
repoName: "rivet-dev/sandbox-agent",
updatedAtMs: minutesAgo(1),
branch: "refactor/ws-handler",
pullRequest: null,
tabs: [
{
id: "status-run-tab",
sessionId: "status-run-session",
sessionName: "WS refactor",
agent: "Codex",
model: "gpt-5.3-codex",
status: "running",
thinkingSinceMs: Date.now() - 12_000,
unread: false,
created: true,
draft: { text: "", attachments: [], updatedAtMs: null },
transcript: transcriptFromLegacyMessages("status-run-tab", [
{
id: "sr1",
role: "user",
agent: null,
createdAtMs: minutesAgo(3),
lines: ["Refactor the WebSocket handler to use a connection pool pattern."],
},
]),
},
],
fileChanges: [],
diffs: {},
fileTree: [],
minutesUsed: 2,
},
];
}