- Move BranchToolbar below the chat input box to match Codex app layout
- Change worktree path to ~/.t3code/worktrees/{repo}/{branch}
- Split desktop tsdown config into separate main/preload builds to prevent
code-splitting from leaking node:os into the sandboxed preload script
- Migrate turbo scripts to turbo watch, add desktop start/smoke-test tasks
- Update server output to .mjs, add CJS format, remove tsx dependency
Co-Authored-By: Claude Opus 4.6 <[email protected]>
58 lines
1.4 KiB
JavaScript
58 lines
1.4 KiB
JavaScript
import { spawn } from "node:child_process";
|
|
import { dirname, resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const desktopDir = resolve(__dirname, "..");
|
|
const electronBin = resolve(desktopDir, "node_modules/.bin/electron");
|
|
const mainJs = resolve(desktopDir, "dist-electron/main.js");
|
|
|
|
console.log("\nLaunching Electron smoke test...");
|
|
|
|
const child = spawn(electronBin, [mainJs], {
|
|
stdio: ["pipe", "pipe", "pipe"],
|
|
env: {
|
|
...process.env,
|
|
VITE_DEV_SERVER_URL: "",
|
|
ELECTRON_ENABLE_LOGGING: "1",
|
|
},
|
|
});
|
|
|
|
let output = "";
|
|
child.stdout.on("data", (chunk) => {
|
|
output += chunk.toString();
|
|
});
|
|
child.stderr.on("data", (chunk) => {
|
|
output += chunk.toString();
|
|
});
|
|
|
|
const timeout = setTimeout(() => {
|
|
child.kill();
|
|
}, 8_000);
|
|
|
|
child.on("exit", () => {
|
|
clearTimeout(timeout);
|
|
|
|
const fatalPatterns = [
|
|
"Cannot find module",
|
|
"MODULE_NOT_FOUND",
|
|
"Refused to execute",
|
|
"Uncaught Error",
|
|
"Uncaught TypeError",
|
|
"Uncaught ReferenceError",
|
|
];
|
|
const failures = fatalPatterns.filter((pattern) => output.includes(pattern));
|
|
|
|
if (failures.length > 0) {
|
|
console.error("\nDesktop smoke test failed:");
|
|
for (const failure of failures) {
|
|
console.error(` - ${failure}`);
|
|
}
|
|
console.error("\nFull output:\n" + output);
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log("Desktop smoke test passed.");
|
|
process.exit(0);
|
|
});
|