mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-08 01:57:31 +01:00
fix: rename the managed environment to Paperclip Sandbox (#19296)
## Thinking Path > - Paperclip manages AI agents and their execution environments. > - Managed installations supply a default sandbox through managed configuration. > - Most selectors show the configured environment name. > - A fallback label, two errors, and examples still use Paperclip Computer. > - This pull request changes that stock copy to Paperclip Sandbox. > - Existing and custom environment names continue to come from the stored row. ## Linked Issues or Issue Description **What existing behavior does this improve?** The managed environment label in agent settings and the errors shown when the managed sandbox is unavailable. **Subsystem affected** The agent configuration UI, runner selection, and environment reconciliation tests. **Current behavior** Fallback copy and current examples call the managed sandbox Paperclip Computer. The actual environment name is already configurable. **Proposed behavior** Use Paperclip Sandbox for stock copy and current examples. Keep configured names unchanged in selectors, including legacy names and custom names. **Reason and benefit** The name identifies this environment as a managed sandbox and removes ambiguity. **Breaking changes** The displayed fallback and error text change. Error codes, execution behavior, and environment identity remain the same. No migration is needed. **Additional context** No duplicate rename issue or pull request was found. This is a copy update, with no new roadmap feature. ## What Changed - Update the managed fallback label and two unavailable-sandbox error messages. - Update current test and Storybook fixtures without changing story IDs or behavior. - Test configured names, fallback copy, and the unavailable-sandbox message. - Add a PostgreSQL regression test for a rename that retains the environment ID, instance default, agent binding, environment variables, and lease. ## Verification - `pnpm -r typecheck` passed. - `pnpm build` passed. - Focused coverage: 956 cases across nine changed suites. The new fixture initially tried to insert an existing singleton; its corrected upsert passed with all 52 environment-service cases. The updated runner suite also passed all 243 cases. - The two UI suites passed all 189 cases, including configured legacy/custom names and the missing-default fallback. - `pnpm check:token-gates` passed. - `node scripts/storybook-catalog.mjs --check` passed. The catalog is structural evidence only. - `node --test scripts/check-maps.test.mjs scripts/storybook-catalog.test.mjs scripts/storybook-feature-index.test.mjs` passed. - Full `pnpm test:run` is in progress. No live provider or browser journey is claimed by these tests. - CI passed on the current head after one server-shard rerun. The first attempt hit a 10 ms deadline assertion in the unchanged status-card timing test; its isolated local run and the complete rerun shard passed. The original failure and rerun are retained in the PR comment. - Reviewed the diff for secrets, personal data, and run artifacts. ## Risks Low risk: runtime edits change three display strings. Managed reconciliation is unchanged. The regression test exercises the existing rename against PostgreSQL. The configured name still controls normal display, so this code change alone does not rename existing database rows. A managed configuration update uses the existing reconciliation path. Roll back the copy by reverting this commit. ## Model Used OpenAI GPT-6.1 Sol (`gpt-6.1-sol`) through Codex in T3 Code, xhigh reasoning, with repository tools and code execution. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used, version, and capabilities - [x] I have checked ROADMAP.md; this copy update does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs - [x] I have described the issue in the PR with the enhancement template fields - [x] No internal or instance-local issue references - [x] The branch name describes the change and contains no internal ticket ID - [x] Focused tests pass locally - [x] Relevant tests were added or updated - [x] Relevant copy and examples were updated; no API or schema documentation changed - [x] Risks are documented - [x] All CI gates passed on the current head, including the server 11/12 rerun and aggregate verify - [ ] Full local test suite completed (still running; six chat shards passed) - [x] Greptile is 5/5 on the current head with no unresolved findings - [x] I will address all reviewer comments before requesting merge Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
7351a9d74f
commit
088f85c5fe
17 files changed
+94
-27
No files matched your search
@@ -93,7 +93,7 @@ export function createRuntimeProgressReporter(
|
||||
const now = options.now ?? Date.now;
|
||||
// "sandbox" is the transport key, not product vocabulary: progress lines are
|
||||
// user-visible run status, and the product refers to the run's machine as an
|
||||
// environment ("Paperclip Computer" on managed deployments).
|
||||
// environment ("Paperclip Sandbox" on managed deployments).
|
||||
const targetDisplay = options.target === "sandbox" ? "environment" : options.target;
|
||||
const prefix = `[paperclip] ${options.phase}${options.label ? ` ${options.label}` : ""} ${options.direction} ${targetDisplay}`;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ describe.skipIf(!support.supported)("agent-scoped runner qualification", () => {
|
||||
await db.insert(authUsers).values({ id: userId, name: "Company owner", email: `${userId}@example.test`, emailVerified: true, createdAt: new Date(), updatedAt: new Date() });
|
||||
await db.insert(companyMemberships).values({ companyId, principalType: "user", principalId: userId, membershipRole: "owner", status: "active" });
|
||||
await db.insert(principalPermissionGrants).values(grantsForHumanRole("owner").map(grant => ({ ...grant, companyId, principalType: "user" as const, principalId: userId })));
|
||||
await db.insert(environments).values({ id: environmentId, name: `Paperclip Computer ${environmentId}`, driver: "sandbox", status: "active", config: { provider: "daytona", snapshot: "managed-snapshot", reuseLease: false } });
|
||||
await db.insert(environments).values({ id: environmentId, name: `Paperclip Sandbox ${environmentId}`, driver: "sandbox", status: "active", config: { provider: "daytona", snapshot: "managed-snapshot", reuseLease: false } });
|
||||
await db.insert(agents).values({ id: agentId, companyId, name: "Amy fixture", adapterType: "claude_local", defaultEnvironmentId: environmentId,
|
||||
adapterConfig: { model: "claude-opus-5-5", effort: "high", maxTurnsPerRun: 1000, dangerouslySkipPermissions: true } });
|
||||
app = express(); app.use(express.json());
|
||||
|
||||
@@ -344,7 +344,7 @@ describeEmbeddedPostgres("environmentRuntimeService", () => {
|
||||
|
||||
it.each(["missing", "stale", "invalidated", "qualified", "provider-failure", "unowned-marker"])("uses the current managed Cloud snapshot with %s qualification", async qualification => {
|
||||
vi.stubEnv("PAPERCLIP_MANAGED_CONFIG", JSON.stringify({ ...managedCloudConfig,
|
||||
environments: qualification === "unowned-marker" ? [] : [{ name: "Paperclip Computer", provider: "daytona", config: {} }] }));
|
||||
environments: qualification === "unowned-marker" ? [] : [{ name: "Paperclip Sandbox", provider: "daytona", config: {} }] }));
|
||||
const pluginId = randomUUID();
|
||||
const { companyId, environment: baseEnvironment, runId } = await seedEnvironment();
|
||||
const config = { provider: "daytona", snapshot: "replacement-snapshot", timeoutMs: 1234 };
|
||||
|
||||
@@ -1240,6 +1240,56 @@ describeEmbeddedPostgres("environmentService leases", () => {
|
||||
expect((rows[0]?.metadata as Record<string, unknown>)?.managedKubernetesSandbox).toBe(true);
|
||||
});
|
||||
|
||||
it("renames the managed sandbox in place without changing defaults, agent bindings, or leases", async () => {
|
||||
const companyId = await seedCompany();
|
||||
const input = {
|
||||
companyId,
|
||||
name: "Paperclip Computer",
|
||||
description: "Managed execution environment.",
|
||||
provider: "daytona",
|
||||
config: { snapshot: "managed-snapshot", cpu: 4, memory: 4 },
|
||||
platformFullyManaged: true,
|
||||
};
|
||||
const created = (await svc.ensureManagedSandboxEnvironment(input)).environment;
|
||||
const envVars = { PROJECT_MODE: "retained" };
|
||||
await db.update(environments).set({ envVars }).where(eq(environments.id, created.id));
|
||||
const [agent] = await db.insert(agents).values({
|
||||
companyId,
|
||||
name: "Sandbox agent",
|
||||
role: "engineer",
|
||||
adapterType: "codex_local",
|
||||
defaultEnvironmentId: created.id,
|
||||
}).returning();
|
||||
await db.insert(instanceSettings).values({ defaultEnvironmentId: created.id }).onConflictDoUpdate({
|
||||
target: instanceSettings.singletonKey,
|
||||
set: { defaultEnvironmentId: created.id },
|
||||
});
|
||||
const [lease] = await db.insert(environmentLeases).values({
|
||||
companyId,
|
||||
environmentId: created.id,
|
||||
provider: "daytona",
|
||||
providerLeaseId: "retained-sandbox-lease",
|
||||
}).returning();
|
||||
|
||||
const renamed = await svc.ensureManagedSandboxEnvironment({ ...input, name: "Paperclip Sandbox" });
|
||||
expect(renamed.action).toBe("updated");
|
||||
expect(renamed.environment).toMatchObject({
|
||||
id: created.id,
|
||||
name: "Paperclip Sandbox",
|
||||
description: input.description,
|
||||
config: created.config,
|
||||
envVars,
|
||||
});
|
||||
const [savedAgent] = await db.select().from(agents).where(eq(agents.id, agent!.id));
|
||||
const [settings] = await db.select().from(instanceSettings);
|
||||
const [savedLease] = await db.select().from(environmentLeases).where(eq(environmentLeases.id, lease!.id));
|
||||
expect(savedAgent?.defaultEnvironmentId).toBe(created.id);
|
||||
expect(settings?.defaultEnvironmentId).toBe(created.id);
|
||||
expect(savedLease).toEqual(lease);
|
||||
expect(await db.select().from(environments)).toHaveLength(1);
|
||||
expect((await svc.ensureManagedSandboxEnvironment({ ...input, name: "Paperclip Sandbox" })).action).toBe("unchanged");
|
||||
});
|
||||
|
||||
it("ensures and refreshes a managed sandbox environment for an arbitrary provider", async () => {
|
||||
const companyId = await seedCompany();
|
||||
const createdResult = await svc.ensureManagedSandboxEnvironment({
|
||||
|
||||
@@ -18,7 +18,7 @@ function readiness(): AdapterEnvironmentTestResult {
|
||||
code: "acpx_remote_runtime_unverified", level: "warn", message: "The remote platform is supported. Runtime package integrity and readiness must still be verified by the remote runner before launch.",
|
||||
}] };
|
||||
}
|
||||
const context: AdapterEnvironmentTestContext = { companyId: "company-1", adapterType: "paperclip_runner", environmentName: "Paperclip Computer",
|
||||
const context: AdapterEnvironmentTestContext = { companyId: "company-1", adapterType: "paperclip_runner", environmentName: "Paperclip Sandbox",
|
||||
config: { provider: "acpx", acpxAgent: "claude", model: "claude-opus-5-5", env: { CLAUDE_CODE_OAUTH_TOKEN: "fixture-token" }, managedAiConnection: { method: "subscription" } },
|
||||
executionTarget: { kind: "remote" as const, transport: "sandbox" as const, providerKey: "daytona", leaseId: "lease-1", remoteCwd: "/workspace", runner: { execute: vi.fn().mockResolvedValue({ exitCode: 0, timedOut: false, stdout: "", stderr: "", signal: null }) } },
|
||||
};
|
||||
|
||||
@@ -55,7 +55,7 @@ export function agentEnvironmentTestService(db: Db, pluginWorkerManager?: Plugin
|
||||
if ((await instanceSettings.getExperimental()).enableManagedSandboxOnly === true) {
|
||||
const managed = await environmentsSvc.findManagedSandboxEnvironment(companyId);
|
||||
if (!managed) {
|
||||
throw unprocessable("The managed sandbox is unavailable. Restore Paperclip Computer and retry.", {
|
||||
throw unprocessable("The managed sandbox is unavailable. Restore Paperclip Sandbox and retry.", {
|
||||
code: "managed_sandbox_unavailable",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -118,7 +118,11 @@ describe("server-owned Codex runner selection", () => {
|
||||
state.managedEnvironment.mockResolvedValue(null);
|
||||
await expect(resolveNewAgentRunnerForCompany({} as never, "company", {
|
||||
adapterType: "cursor_cloud", runner: "auto", setupOnly, adapterConfig: {},
|
||||
})).rejects.toMatchObject({ status: 422, details: { code: "managed_sandbox_unavailable" } });
|
||||
})).rejects.toMatchObject({
|
||||
message: "The managed sandbox is unavailable. Restore Paperclip Sandbox and retry.",
|
||||
status: 422,
|
||||
details: { code: "managed_sandbox_unavailable" },
|
||||
});
|
||||
});
|
||||
it("preserves an explicit Legacy choice on a held Cursor setup draft", async () => {
|
||||
state.settings = { experimental: { enableManagedSandboxOnly: true, enableNativeRunner: true } };
|
||||
@@ -589,7 +593,7 @@ describe("server-owned Codex runner selection", () => {
|
||||
await expect(resolveNewAgentRunnerForCompany({} as never, "company", { adapterType: "codex_local", runner: "paperclip", defaultEnvironmentId: "sandbox" })).rejects.toMatchObject({ status: 422, details: { code: "agent_runner_unavailable" } });
|
||||
});
|
||||
it.each(["codex_local", "claude_local", "opencode_local"])("selects %s on a managed Cloud image without saved platform qualification", async adapterType => {
|
||||
vi.stubEnv("PAPERCLIP_MANAGED_CONFIG", JSON.stringify({ ...managedCloudConfig, environments: [{ name: "Paperclip Computer", provider: "daytona", config: {} }] }));
|
||||
vi.stubEnv("PAPERCLIP_MANAGED_CONFIG", JSON.stringify({ ...managedCloudConfig, environments: [{ name: "Paperclip Sandbox", provider: "daytona", config: {} }] }));
|
||||
state.getEnvironment.mockResolvedValue({ id: "sandbox", driver: "sandbox", status: "active",
|
||||
config: { provider: "daytona", snapshot: "replacement-snapshot" }, metadata: { managedByPaperclip: true } });
|
||||
state.resolveEnvironment.mockRejectedValue(new Error("Saved provider secret is unavailable."));
|
||||
@@ -605,7 +609,7 @@ describe("server-owned Codex runner selection", () => {
|
||||
});
|
||||
it.each(["self-hosted", "custom-environment", "captured-template", "stale-marker"])("keeps qualification for a %s sandbox", async kind => {
|
||||
vi.stubEnv("PAPERCLIP_MANAGED_CONFIG", kind === "self-hosted" ? undefined : JSON.stringify({ ...managedCloudConfig,
|
||||
environments: kind === "stale-marker" ? [] : [{ name: "Paperclip Computer", provider: "daytona", config: {} }] }));
|
||||
environments: kind === "stale-marker" ? [] : [{ name: "Paperclip Sandbox", provider: "daytona", config: {} }] }));
|
||||
vi.stubEnv("PAPERCLIP_CLOUD_TENANT_SERVER_TOKEN", undefined);
|
||||
state.getEnvironment.mockResolvedValue({ id: "sandbox", driver: "sandbox", status: "active",
|
||||
config: { provider: "daytona", snapshot: "custom-snapshot" },
|
||||
@@ -616,7 +620,7 @@ describe("server-owned Codex runner selection", () => {
|
||||
expect(state.sandboxQualification).toHaveBeenCalled();
|
||||
});
|
||||
it("ignores a stale captured image and preserves a matching custom image without resolving credentials", async () => {
|
||||
vi.stubEnv("PAPERCLIP_MANAGED_CONFIG", JSON.stringify({ ...managedCloudConfig, environments: [{ name: "Paperclip Computer", provider: "daytona", config: {} }] }));
|
||||
vi.stubEnv("PAPERCLIP_MANAGED_CONFIG", JSON.stringify({ ...managedCloudConfig, environments: [{ name: "Paperclip Sandbox", provider: "daytona", config: {} }] }));
|
||||
const config = { provider: "daytona", snapshot: "replacement-snapshot", reuseLease: false, apiKey: "a6b9e7d0-f886-471a-b461-640dd03e8d0f" };
|
||||
state.getEnvironment.mockResolvedValue({ id: "sandbox", driver: "sandbox", status: "active", config, metadata: { managedByPaperclip: true } });
|
||||
state.resolveEnvironment.mockRejectedValue(new Error("Saved provider secret is unavailable."));
|
||||
|
||||
@@ -479,7 +479,7 @@ async function resolveAgentEnvironmentForCompany(db: Db, companyId: string, defa
|
||||
let environment = environmentId ? await envs.getById(environmentId) : null;
|
||||
if (settings.experimental?.enableManagedSandboxOnly && (!environment || environment.driver === "local")) {
|
||||
environment = await envs.findManagedSandboxEnvironment(companyId);
|
||||
if (!environment) throw unprocessable("The managed sandbox is unavailable. Restore Paperclip Computer and retry.", {
|
||||
if (!environment) throw unprocessable("The managed sandbox is unavailable. Restore Paperclip Sandbox and retry.", {
|
||||
code: "managed_sandbox_unavailable", ...(executionMode ? { executionMode } : {}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -935,7 +935,7 @@ describe.skipIf(!support.supported && !process.env.PAPERCLIP_TEST_DATABASE_URL)(
|
||||
const resume = new ReusableSandboxResumeError({ provider: "daytona", providerLeaseId: "lease-1", cause: providerError });
|
||||
// The orchestrator wraps the runtime error, exactly as staging recorded it.
|
||||
const wrapped = new EnvironmentRunError("lease_acquire_failed",
|
||||
`Failed to acquire lease for environment "Paperclip Computer" (sandbox): ${resume.message}`, { cause: resume });
|
||||
`Failed to acquire lease for environment "Paperclip Sandbox" (sandbox): ${resume.message}`, { cause: resume });
|
||||
const error = scenario === "untrusted" ? new Error(wrapped.message) : wrapped;
|
||||
f.deps.scheduleBoundedRetryForRun.mockResolvedValueOnce({ outcome: "not_scheduled", reason: "Fixture scheduler boundary", issueId: null });
|
||||
await f.completion.failRunSetup(f.setup(error, scenario === "started"));
|
||||
@@ -971,7 +971,7 @@ describe.skipIf(!support.supported && !process.env.PAPERCLIP_TEST_DATABASE_URL)(
|
||||
const refusal = new PluginWorkerUnavailableError({ pluginId: "plugin-1", workerStatus: null,
|
||||
message: 'Sandbox provider "daytona" is installed via plugin "paperclip.daytona-sandbox-provider", but its worker is not running.' });
|
||||
const wrapped = new EnvironmentRunError("lease_acquire_failed",
|
||||
`Failed to acquire lease for environment "Paperclip Computer" (sandbox): ${refusal.message}`, { cause: refusal });
|
||||
`Failed to acquire lease for environment "Paperclip Sandbox" (sandbox): ${refusal.message}`, { cause: refusal });
|
||||
f.deps.scheduleBoundedRetryForRun.mockResolvedValueOnce({ outcome: "not_scheduled", reason: "Fixture scheduler boundary", issueId: null });
|
||||
await f.completion.failRunSetup(f.setup(wrapped));
|
||||
expect(await read(f.run.id)).toMatchObject({ status: "failed", errorCode: "plugin_worker_unavailable",
|
||||
|
||||
@@ -859,7 +859,7 @@ describe("AgentConfigForm environment selector", () => {
|
||||
});
|
||||
|
||||
it.each(["explicit", "instance", "managed", "env-draft"])("qualifies a saved Daytona Claude agent and upgrades with its legacy turn limit (%s environment)", async mode => {
|
||||
const environment = makeEnvironment({ id: "daytona-computer", name: "Paperclip Computer", driver: "sandbox", status: "active",
|
||||
const environment = makeEnvironment({ id: "daytona-computer", name: "Paperclip Sandbox", driver: "sandbox", status: "active",
|
||||
config: { provider: "daytona", snapshot: "managed-snapshot" }, metadata: { managedByPaperclip: true } });
|
||||
const inventory = (qualified: boolean) => [
|
||||
{ type: "claude_local", supportedRunners: qualified ? ["paperclip", "legacy"] : ["legacy"], defaultRunner: qualified ? "paperclip" : "legacy" },
|
||||
@@ -917,7 +917,7 @@ describe("AgentConfigForm environment selector", () => {
|
||||
});
|
||||
|
||||
it.each(["probe", "unsupported", "settings-changed"])("does not save after Daytona %s", async failure => {
|
||||
const environment = makeEnvironment({ id: "daytona-computer", name: "Paperclip Computer", driver: "sandbox", status: "active",
|
||||
const environment = makeEnvironment({ id: "daytona-computer", name: "Paperclip Sandbox", driver: "sandbox", status: "active",
|
||||
config: { provider: "daytona", snapshot: "managed-snapshot" } });
|
||||
mockAdaptersApi.list.mockResolvedValue([{ type: "claude_local", supportedRunners: ["legacy"], defaultRunner: "legacy" }, { type: "paperclip_runner", supportedRunners: ["legacy"], defaultRunner: "legacy" }]);
|
||||
let finish!: () => void;
|
||||
@@ -1680,12 +1680,12 @@ describe("AgentConfigForm environment selector", () => {
|
||||
expect(selector?.textContent).toContain("Fake Sandbox · sandbox");
|
||||
});
|
||||
|
||||
it("labels the platform-managed instance default by name, without the driver key", async () => {
|
||||
it.each(["Paperclip Sandbox", "Paperclip Computer", "Custom managed environment"])("labels the platform-managed instance default %s by its configured name", async (name) => {
|
||||
mockInstanceSettingsApi.get.mockResolvedValue({ defaultEnvironmentId: "managed-1" });
|
||||
const result = await renderForm([
|
||||
makeEnvironment({
|
||||
id: "managed-1",
|
||||
name: "Paperclip Computer",
|
||||
name,
|
||||
driver: "sandbox",
|
||||
config: { provider: "daytona" },
|
||||
metadata: { managedByPaperclip: true },
|
||||
@@ -1695,12 +1695,25 @@ describe("AgentConfigForm environment selector", () => {
|
||||
|
||||
const selector = await environmentOptions(result.container);
|
||||
|
||||
expect(selector?.textContent).toContain("Default: Paperclip Computer");
|
||||
expect(selector?.textContent).toContain("Paperclip Computer");
|
||||
expect(selector?.textContent).toContain(`Default: ${name}`);
|
||||
expect(selector?.textContent).toContain(name);
|
||||
expect(selector?.textContent).not.toContain("(sandbox)");
|
||||
expect(selector?.textContent).not.toContain("· sandbox");
|
||||
});
|
||||
|
||||
it("uses Paperclip Sandbox while the managed default environment is unavailable", async () => {
|
||||
mockInstanceSettingsApi.getExperimental.mockResolvedValue({ enableEnvironments: true, enableManagedSandboxOnly: true });
|
||||
mockInstanceSettingsApi.get.mockResolvedValue({ defaultEnvironmentId: null });
|
||||
const result = await renderForm([
|
||||
makeEnvironment({ id: "other-sandbox", name: "Other sandbox", driver: "sandbox", config: { provider: "daytona" } }),
|
||||
]);
|
||||
roots.push(result.root);
|
||||
|
||||
const selector = await environmentOptions(result.container);
|
||||
expect(selector?.textContent).toContain("Default: Paperclip Sandbox");
|
||||
expect(selector?.textContent).not.toContain("Paperclip Computer");
|
||||
});
|
||||
|
||||
it("renders non-local adapter config fields in the Adapter card", async () => {
|
||||
const result = await renderForm(
|
||||
[makeEnvironment({ id: "local-1", name: "Local", driver: "local" })],
|
||||
|
||||
@@ -1028,7 +1028,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
||||
const inheritedEnvironmentLabel = instanceDefaultEnvironment
|
||||
? environmentDisplayLabel(instanceDefaultEnvironment)
|
||||
: managedSandboxOnly
|
||||
? "Paperclip Computer"
|
||||
? "Paperclip Sandbox"
|
||||
: "Local";
|
||||
|
||||
const modelProvider = adapterType === "opencode_local" && aiConnectionBindingSchema.safeParse(
|
||||
|
||||
@@ -3301,7 +3301,7 @@ describe("OnboardingWizard restore-gate (stale localStorage across accounts)", (
|
||||
{
|
||||
code: "environment_identity",
|
||||
level: "info",
|
||||
message: 'Environment test identity for "Paperclip Computer".',
|
||||
message: 'Environment test identity for "Paperclip Sandbox".',
|
||||
detail: "paperclipLeaseId=ff9e58e9; provider=daytona",
|
||||
},
|
||||
],
|
||||
|
||||
@@ -17,11 +17,11 @@ describe("managed sandbox environment helpers", () => {
|
||||
it("labels platform-managed rows by name alone and keeps the driver suffix elsewhere", () => {
|
||||
expect(
|
||||
environmentDisplayLabel({
|
||||
name: "Paperclip Computer",
|
||||
name: "Paperclip Sandbox",
|
||||
driver: "sandbox",
|
||||
metadata: { managedByPaperclip: true },
|
||||
}),
|
||||
).toBe("Paperclip Computer");
|
||||
).toBe("Paperclip Sandbox");
|
||||
expect(
|
||||
environmentDisplayLabel({ name: "E2B", driver: "sandbox", metadata: null }),
|
||||
).toBe("E2B · sandbox");
|
||||
|
||||
@@ -181,7 +181,7 @@ export function NewAgentWizard({ initialScreen = "name", initialAdapter = null,
|
||||
try {
|
||||
const result = await agentsApi.testEnvironment(PREVIEW_COMPANY_ID, selected, {
|
||||
adapterConfig,
|
||||
environmentId: environment === "Paperclip Computer" ? "environment-storybook-sandbox"
|
||||
environmentId: environment === "Paperclip Sandbox" ? "environment-storybook-sandbox"
|
||||
: environment === "Local machine" ? "environment-storybook-local" : null,
|
||||
});
|
||||
if (testRun.current !== run) return;
|
||||
@@ -350,7 +350,7 @@ export function NewAgentWizard({ initialScreen = "name", initialAdapter = null,
|
||||
{selected === "kimi_local" && draft.apiKey && <TextField label="Kimi API model name" value={draft.kimiModel} onChange={kimiModel => setDraft({ kimiModel })} placeholder="kimi-for-coding" required />}
|
||||
</Section>
|
||||
{selected !== "cursor_cloud" && <Section title="Environment">
|
||||
<SelectField label="Environment" hideLabel value={environment} onChange={value => { setEnvironments(previous => ({ ...previous, [selected]: value })); resetTest(); }} options={["Organization default", "Paperclip Computer", "Local machine"]} />
|
||||
<SelectField label="Environment" hideLabel value={environment} onChange={value => { setEnvironments(previous => ({ ...previous, [selected]: value })); resetTest(); }} options={["Organization default", "Paperclip Sandbox", "Local machine"]} />
|
||||
</Section>}
|
||||
</fieldset>
|
||||
<RuntimeTestCard state={testState} result={testResult} error={error} onTest={() => void runTest()} />
|
||||
|
||||
@@ -329,7 +329,7 @@ export function createSettingsFixtures(
|
||||
url.pathname.split("/").at(-2) ?? agent.adapterType,
|
||||
outcome,
|
||||
data.adapterConfig?.model ?? "",
|
||||
"Paperclip Computer",
|
||||
"Paperclip Sandbox",
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export function useNewAgentFixtures(agent: Agent, outcome: TestOutcome, delayMs:
|
||||
const timer = window.setTimeout(() => { timers.delete(timer); resolve(); }, delay);
|
||||
timers.set(timer, resolve);
|
||||
});
|
||||
const environment = request.environmentId === "environment-storybook-sandbox" ? "Paperclip Computer"
|
||||
const environment = request.environmentId === "environment-storybook-sandbox" ? "Paperclip Sandbox"
|
||||
: request.environmentId === "environment-storybook-local" ? "Local machine" : "Organization default";
|
||||
return Response.json(runtimeTestResult(test[1], result, request.adapterConfig?.model ?? "", environment));
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ function installUpgradeFixture({ harness = "codex_local", failOnce = false, inco
|
||||
resetOnboardingFixtureState();
|
||||
setOnboardingFixtureState({ environments: "local", authSignal: "present", localLoginStatus: "ready" });
|
||||
const profile = harness === "claude_local" ? { provider: "acpx", acpxAgent: "claude" } : { provider: "codex" };
|
||||
const savedComputer = { id: "environment-native-recovery", name: "Paperclip Computer", driver: "sandbox", status: "active",
|
||||
const savedComputer = { id: "environment-native-recovery", name: "Paperclip Sandbox", driver: "sandbox", status: "active",
|
||||
config: { provider: "daytona", snapshot: "managed-snapshot" }, metadata: { managedByPaperclip: true } };
|
||||
let qualified = false;
|
||||
let agent = { ...storybookAgents[0]!, urlKey: "migration-agent", name: harness === "claude_local" ? "ClaudeWriter" : "CodexCoder",
|
||||
|
||||
Reference in new issue
Block a user