Skip to content

Commit dce48b2

Browse files
anandgupta42claude
andauthored
fix: pipe stdio in engine.ts to suppress subprocess noise (#54)
* test: add E2E tests for engine.ts stdio piping Verify that all execFileSync calls in engine.ts use { stdio: "pipe" } to prevent subprocess output (uv, pip install, python --version, etc.) from leaking into the TUI's text input area. Tests use real subprocess calls via spawnSync to confirm the piping behavior end-to-end, plus a source-level check that every call site in engine.ts includes the stdio option. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: add stdio: "pipe" to all execFileSync calls in engine.ts Without this option, subprocess output from uv, pip install, tar, and python/uv --version leaks into the TUI's text input area. Piping stdio suppresses this noise while still capturing the return value. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: update docs URL to GitHub Pages Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: include stderr in telemetry error messages for piped execFileSync With stdio: "pipe", e.message is a generic "Command failed" string. The actual diagnostics are in e.stderr, so prefer that for telemetry. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d3301b1 commit dce48b2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/altimate-code/src/bridge/engine.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ async function ensureEngineImpl(): Promise<void> {
179179
timestamp: Date.now(),
180180
session_id: Telemetry.getContext().sessionId,
181181
phase: "venv_create",
182-
error_message: (e?.message ?? String(e)).slice(0, 500),
182+
error_message: (e?.stderr?.toString() || e?.message ?? String(e)).slice(0, 500),
183183
})
184184
throw e
185185
}
@@ -196,7 +196,7 @@ async function ensureEngineImpl(): Promise<void> {
196196
timestamp: Date.now(),
197197
session_id: Telemetry.getContext().sessionId,
198198
phase: "pip_install",
199-
error_message: (e?.message ?? String(e)).slice(0, 500),
199+
error_message: (e?.stderr?.toString() || e?.message ?? String(e)).slice(0, 500),
200200
})
201201
throw e
202202
}

packages/altimate-code/src/cli/cmd/tui/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ function App() {
555555
title: "Open docs",
556556
value: "docs.open",
557557
onSelect: () => {
558-
open("https://altimate-code.dev/docs").catch(() => {})
558+
open("https://crispy-adventure-6lj1ey3.pages.github.io/").catch(() => {})
559559
dialog.clear()
560560
},
561561
category: "System",

0 commit comments

Comments
 (0)