diff --git a/scripts/e2e.config.ts b/scripts/e2e.config.ts index dc10e32f7a..effaaf6c68 100644 --- a/scripts/e2e.config.ts +++ b/scripts/e2e.config.ts @@ -152,7 +152,7 @@ export default { targets: [ { name: "web", - engine: web({ viewport: { width: 1280, height: 800 } }), + engine: web({ viewport: { width: 1280, height: 1000 } }), app: { url: `http://${LOOPBACK}:0`, // Vite answers before the server does; this path is proxied to the server. diff --git a/scripts/prove-scenario.ts b/scripts/prove-scenario.ts index 68e5433ebe..cc0756582e 100644 --- a/scripts/prove-scenario.ts +++ b/scripts/prove-scenario.ts @@ -313,11 +313,14 @@ const prove = Effect.fn("prove")(function* (input: { const proveDir = path.join(scripts, ".e2e/prove"); const scenarioPath = path.resolve(yield* HostProcess.WorkingDirectory, input.scenario); // A proof left by an earlier run must not be read as this one's. - yield* fs.remove(proveDir, { recursive: true, force: true }); + if (process.env.T3_PROOF_SIDE !== "head") yield* fs.remove(proveDir, { recursive: true, force: true }); yield* fs.makeDirectory(proveDir, { recursive: true }); // Only that target's app starts: a web scenario needs no Metro and no device. const target = Option.getOrElse(input.target, () => "") || (yield* targetOf(scenarioPath)); - const base = yield* runSide("base", input.base, scenarioPath, target); + const base = process.env.T3_PROOF_SIDE === "head" + ? JSON.parse(yield* fs.readFileString(path.join(proveDir, "base.json"))) + : yield* runSide("base", input.base, scenarioPath, target); + if (process.env.T3_PROOF_SIDE === "base") return 0; const head = yield* runSide("head", input.head, scenarioPath, target); const links = Option.isSome(input.uploadCommand) ? yield* upload(input.uploadCommand.value, [...base.captures, ...head.captures]) diff --git a/scripts/scenarios/start-app.ts b/scripts/scenarios/start-app.ts index 5dee3f26c1..3ad8a0bc6b 100644 --- a/scripts/scenarios/start-app.ts +++ b/scripts/scenarios/start-app.ts @@ -58,6 +58,9 @@ const prepareHome = Effect.fn("startApp.prepareHome")(function* (home: string) { yield* fs.remove(home, { recursive: true, force: true }); yield* fs.makeDirectory(path.join(home, "userdata"), { recursive: true }); yield* fs.makeDirectory(path.join(home, "bin")); + const installHome = path.join(home, "install-home"); + yield* fs.makeDirectory(installHome, { recursive: true }); + yield* fs.writeFileString(path.join(installHome, ".bashrc"), 'export PS1="setup$ "\nexport PATH="$HOME/.local/bin:$PATH"\n'); for (const command of ["hostnamectl", "scutil"]) { const shim = path.join(home, "bin", command); yield* fs.writeFileString(shim, HOST_LABEL_SHIM); @@ -75,7 +78,8 @@ const prepareHome = Effect.fn("startApp.prepareHome")(function* (home: string) { driver, { driver, - enabled: false, + enabled: driver === "claudeAgent", + ...(driver === "claudeAgent" ? { config: { binaryPath: path.join(home, "install-home/.local/bin/claude") } } : {}), ...(driver === "codex" ? { config: { binaryPath: noModel } } : {}), }, ]), @@ -128,6 +132,9 @@ const startApp = Effect.fn("startApp")(function* (input: { yield* prepareHome(input.home); const env = { ...hostEnvironment, + HOME: path.join(input.home, "install-home"), + SHELL: "/bin/bash", + T3CODE_DEV_SEED: "0", PATH: `${path.join(input.home, "bin")}:${hostEnvironment.PATH ?? ""}`, T3CODE_AUTO_BOOTSTRAP_PROJECT_FROM_CWD: "0", };