mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 09:01:17 +00:00
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>
This commit is contained in:
parent
098b8113f3
commit
5bd85e4a28
77 changed files with 2329 additions and 4134 deletions
|
|
@ -10,7 +10,7 @@ const sample: TaskRecord = {
|
|||
branchName: "feature/test",
|
||||
title: "Test Title",
|
||||
task: "Do test",
|
||||
providerId: "daytona",
|
||||
providerId: "local",
|
||||
status: "running",
|
||||
statusMessage: null,
|
||||
activeSandboxId: "sandbox-1",
|
||||
|
|
@ -18,9 +18,9 @@ const sample: TaskRecord = {
|
|||
sandboxes: [
|
||||
{
|
||||
sandboxId: "sandbox-1",
|
||||
providerId: "daytona",
|
||||
providerId: "local",
|
||||
sandboxActorId: null,
|
||||
switchTarget: "daytona://sandbox-1",
|
||||
switchTarget: "sandbox://local/sandbox-1",
|
||||
cwd: null,
|
||||
createdAt: 1,
|
||||
updatedAt: 1,
|
||||
|
|
@ -73,8 +73,8 @@ describe("summary helpers", () => {
|
|||
it("summarizes by status and provider", () => {
|
||||
const rows: TaskRecord[] = [
|
||||
sample,
|
||||
{ ...sample, taskId: "task-2", status: "idle", providerId: "daytona" },
|
||||
{ ...sample, taskId: "task-3", status: "error", providerId: "daytona" },
|
||||
{ ...sample, taskId: "task-2", status: "idle", providerId: "local" },
|
||||
{ ...sample, taskId: "task-3", status: "error", providerId: "local" },
|
||||
];
|
||||
|
||||
const summary = summarizeTasks(rows);
|
||||
|
|
@ -82,6 +82,6 @@ describe("summary helpers", () => {
|
|||
expect(summary.byStatus.running).toBe(1);
|
||||
expect(summary.byStatus.idle).toBe(1);
|
||||
expect(summary.byStatus.error).toBe(1);
|
||||
expect(summary.byProvider.daytona).toBe(3);
|
||||
expect(summary.byProvider.local).toBe(3);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue