feat(factory): finish workbench milestone pass

This commit is contained in:
Nathan Flurry 2026-03-09 16:34:27 -07:00
parent bf282199b5
commit 49cba9e6c2
137 changed files with 819 additions and 338 deletions

View file

@ -20,7 +20,7 @@ vi.mock("node:child_process", async () => {
});
import { ensureBackendRunning, parseBackendPort } from "../src/backend/manager.js";
import { ConfigSchema, type AppConfig } from "@openhandoff/shared";
import { ConfigSchema, type AppConfig } from "@sandbox-agent/factory-shared";
function backendStateFile(baseDir: string, host: string, port: number, suffix: string): string {
const sanitized = host
@ -62,7 +62,7 @@ describe("backend manager", () => {
backend: {
host: "127.0.0.1",
port: 7741,
dbPath: "~/.local/share/openhandoff/handoff.db",
dbPath: "~/.local/share/sandbox-agent-factory/handoff.db",
opencode_poll_interval: 2,
github_poll_interval: 30,
backup_interval_secs: 3600,

View file

@ -2,7 +2,7 @@ import { afterEach, describe, expect, it } from "vitest";
import { mkdtempSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
import { join } from "node:path";
import { tmpdir } from "node:os";
import { ConfigSchema, type AppConfig } from "@openhandoff/shared";
import { ConfigSchema, type AppConfig } from "@sandbox-agent/factory-shared";
import { resolveTuiTheme } from "../src/theme.js";
function withEnv(key: string, value: string | undefined): void {
@ -25,7 +25,7 @@ describe("resolveTuiTheme", () => {
backend: {
host: "127.0.0.1",
port: 7741,
dbPath: "~/.local/share/openhandoff/handoff.db",
dbPath: "~/.local/share/sandbox-agent-factory/handoff.db",
opencode_poll_interval: 2,
github_poll_interval: 30,
backup_interval_secs: 3600,
@ -98,7 +98,7 @@ describe("resolveTuiTheme", () => {
expect(resolution.theme.background).toBe("#0a0a0a");
});
it("prefers explicit openhandoff theme override from config", () => {
it("prefers explicit factory theme override from config", () => {
tempDir = mkdtempSync(join(tmpdir(), "hf-theme-test-"));
withEnv("XDG_STATE_HOME", join(tempDir, "state"));
withEnv("XDG_CONFIG_HOME", join(tempDir, "config"));
@ -107,6 +107,6 @@ describe("resolveTuiTheme", () => {
const resolution = resolveTuiTheme(config, tempDir);
expect(resolution.name).toBe("opencode-default");
expect(resolution.source).toBe("openhandoff config");
expect(resolution.source).toBe("factory config");
});
});

View file

@ -1,6 +1,6 @@
import { describe, expect, it } from "vitest";
import type { HandoffRecord } from "@openhandoff/shared";
import { filterHandoffs, fuzzyMatch } from "@openhandoff/client";
import type { HandoffRecord } from "@sandbox-agent/factory-shared";
import { filterHandoffs, fuzzyMatch } from "@sandbox-agent/factory-client";
import { formatRows } from "../src/tui.js";
const sample: HandoffRecord = {

View file

@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { ConfigSchema } from "@openhandoff/shared";
import { ConfigSchema } from "@sandbox-agent/factory-shared";
import { resolveWorkspace } from "../src/workspace/config.js";
describe("cli workspace resolution", () => {
@ -11,7 +11,7 @@ describe("cli workspace resolution", () => {
backend: {
host: "127.0.0.1",
port: 7741,
dbPath: "~/.local/share/openhandoff/handoff.db",
dbPath: "~/.local/share/sandbox-agent-factory/handoff.db",
opencode_poll_interval: 2,
github_poll_interval: 30,
backup_interval_secs: 3600,