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

@ -1,3 +1,5 @@
import type { WorkbenchModelId } from "./workbench.js";
export type FoundryBillingPlanId = "free" | "team";
export type FoundryBillingStatus = "active" | "trialing" | "past_due" | "scheduled_cancel";
export type FoundryGithubInstallationStatus = "connected" | "install_required" | "reconnect_required";
@ -55,7 +57,7 @@ export interface FoundryOrganizationSettings {
slug: string;
primaryDomain: string;
seatAccrualMode: "first_prompt";
defaultModel: "claude-sonnet-4" | "claude-opus-4" | "gpt-4o" | "o3";
defaultModel: WorkbenchModelId;
autoImportRepos: boolean;
}

View file

@ -43,19 +43,17 @@ export const ConfigSchema = z.object({
.object({
local: z
.object({
rootDir: z.string().optional(),
sandboxAgentPort: z.number().int().min(1).max(65535).optional(),
image: z.string().optional(),
})
.default({}),
daytona: z
e2b: z
.object({
endpoint: z.string().optional(),
apiKey: z.string().optional(),
image: z.string().default("ubuntu:24.04"),
template: z.string().optional(),
})
.default({ image: "ubuntu:24.04" }),
.default({}),
})
.default({ local: {}, daytona: { image: "ubuntu:24.04" } }),
.default({ local: {}, e2b: {} }),
});
export type AppConfig = z.infer<typeof ConfigSchema>;

View file

@ -7,7 +7,7 @@ export const WorkspaceIdSchema = z
.regex(/^[a-zA-Z0-9._-]+$/);
export type WorkspaceId = z.infer<typeof WorkspaceIdSchema>;
export const ProviderIdSchema = z.enum(["daytona", "local"]);
export const ProviderIdSchema = z.enum(["e2b", "local"]);
export type ProviderId = z.infer<typeof ProviderIdSchema>;
export const AgentTypeSchema = z.enum(["claude", "codex"]);
@ -24,12 +24,6 @@ export const TaskStatusSchema = z.enum([
"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",
"running",
"idle",

View file

@ -1,8 +1,17 @@
import type { AgentType, ProviderId, TaskStatus } from "./contracts.js";
export type WorkbenchTaskStatus = "running" | "idle" | "new" | "archived";
export type WorkbenchTaskStatus = TaskStatus | "new";
export type WorkbenchAgentKind = "Claude" | "Codex" | "Cursor";
export type WorkbenchModelId = "claude-sonnet-4" | "claude-opus-4" | "gpt-4o" | "o3";
export type WorkbenchModelId =
| "claude-sonnet-4"
| "claude-opus-4"
| "gpt-5.3-codex"
| "gpt-5.4"
| "gpt-5.2-codex"
| "gpt-5.1-codex-max"
| "gpt-5.2"
| "gpt-5.1-codex-mini";
export type WorkbenchSessionStatus = "pending_provision" | "pending_session_create" | "ready" | "running" | "idle" | "error";
export interface WorkbenchTranscriptEvent {
id: string;
@ -27,10 +36,11 @@ export interface WorkbenchSessionSummary {
sessionName: string;
agent: WorkbenchAgentKind;
model: WorkbenchModelId;
status: "running" | "idle" | "error";
status: WorkbenchSessionStatus;
thinkingSinceMs: number | null;
unread: boolean;
created: boolean;
errorMessage?: string | null;
}
/** Full session content — only fetched when viewing a specific session tab. */
@ -42,10 +52,11 @@ export interface WorkbenchSessionDetail {
sessionName: string;
agent: WorkbenchAgentKind;
model: WorkbenchModelId;
status: "running" | "idle" | "error";
status: WorkbenchSessionStatus;
thinkingSinceMs: number | null;
unread: boolean;
created: boolean;
errorMessage?: string | null;
draft: WorkbenchComposerDraft;
transcript: WorkbenchTranscriptEvent[];
}
@ -166,6 +177,8 @@ export interface WorkbenchTask {
repoId: string;
title: string;
status: WorkbenchTaskStatus;
runtimeStatus?: TaskStatus;
statusMessage?: string | null;
repoName: string;
updatedAtMs: number;
branch: string | null;
@ -175,6 +188,7 @@ export interface WorkbenchTask {
diffs: Record<string, string>;
fileTree: WorkbenchFileTreeNode[];
minutesUsed: number;
activeSandboxId?: string | null;
}
export interface WorkbenchRepo {