chore(foundry): workbench action responsiveness (#254)

* wip

* wip
This commit is contained in:
Nathan Flurry 2026-03-14 20:42:18 -07:00 committed by GitHub
parent 400f9a214e
commit 99abb9d42e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
171 changed files with 7260 additions and 7342 deletions

View file

@ -37,7 +37,7 @@ function healthyMetadataResponse(): { ok: boolean; json: () => Promise<unknown>
json: async () => ({
runtime: "rivetkit",
actorNames: {
workspace: {},
organization: {},
},
}),
};
@ -58,7 +58,7 @@ describe("backend manager", () => {
const config: AppConfig = ConfigSchema.parse({
auto_submit: true,
notify: ["terminal"],
workspace: { default: "default" },
organization: { default: "default" },
backend: {
host: "127.0.0.1",
port: 7741,
@ -68,7 +68,7 @@ describe("backend manager", () => {
backup_interval_secs: 3600,
backup_retention_days: 7,
},
providers: {
sandboxProviders: {
local: {},
e2b: {},
},

View file

@ -1,13 +1,13 @@
import { describe, expect, it } from "vitest";
import { ConfigSchema } from "@sandbox-agent/foundry-shared";
import { resolveWorkspace } from "../src/workspace/config.js";
import { resolveOrganization } from "../src/organization/config.js";
describe("cli workspace resolution", () => {
it("uses default workspace when no flag", () => {
describe("cli organization resolution", () => {
it("uses default organization when no flag", () => {
const config = ConfigSchema.parse({
auto_submit: true as const,
notify: ["terminal" as const],
workspace: { default: "team" },
organization: { default: "team" },
backend: {
host: "127.0.0.1",
port: 7741,
@ -17,13 +17,13 @@ describe("cli workspace resolution", () => {
backup_interval_secs: 3600,
backup_retention_days: 7,
},
providers: {
sandboxProviders: {
local: {},
e2b: {},
},
});
expect(resolveWorkspace(undefined, config)).toBe("team");
expect(resolveWorkspace("alpha", config)).toBe("alpha");
expect(resolveOrganization(undefined, config)).toBe("team");
expect(resolveOrganization("alpha", config)).toBe("alpha");
});
});

View file

@ -21,7 +21,7 @@ describe("resolveTuiTheme", () => {
const baseConfig: AppConfig = ConfigSchema.parse({
auto_submit: true,
notify: ["terminal"],
workspace: { default: "default" },
organization: { default: "default" },
backend: {
host: "127.0.0.1",
port: 7741,
@ -31,7 +31,7 @@ describe("resolveTuiTheme", () => {
backup_interval_secs: 3600,
backup_retention_days: 7,
},
providers: {
sandboxProviders: {
local: {},
e2b: {},
},

View file

@ -4,14 +4,14 @@ import { filterTasks, fuzzyMatch } from "@sandbox-agent/foundry-client";
import { formatRows } from "../src/tui.js";
const sample: TaskRecord = {
workspaceId: "default",
organizationId: "default",
repoId: "repo-a",
repoRemote: "https://example.com/repo-a.git",
taskId: "task-1",
branchName: "feature/test",
title: "Test Title",
task: "Do test",
providerId: "local",
sandboxProviderId: "local",
status: "running",
statusMessage: null,
activeSandboxId: "sandbox-1",
@ -19,7 +19,7 @@ const sample: TaskRecord = {
sandboxes: [
{
sandboxId: "sandbox-1",
providerId: "local",
sandboxProviderId: "local",
switchTarget: "sandbox://local/sandbox-1",
cwd: null,
createdAt: 1,