Skip to content

Commit c506fea

Browse files
gewenyu99claude
andcommitted
fix(tui-capture): strip CI markers so ink renders the real TUI
ink renders non-interactively when it detects CI (CI / GITHUB_ACTIONS), leaving the captured xterm buffer blank. Strip them from the spawned host's env. Verified locally: with CI=true, render_screen now returns the real TUI instead of blank. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f03297c commit c506fea

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

e2e-harness/tui-capture.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,17 @@ export function captureTui(opts: {
5959
const rows = opts.rows ?? (Number(process.env.PTY_ROWS) || 50);
6060
ensureSpawnHelper();
6161
const term = new Terminal({ cols, rows, allowProposedApi: true });
62+
// Strip CI markers: ink renders non-interactively when it detects CI, which
63+
// leaves the captured screen blank. We want the real interactive TUI.
64+
const childEnv = { ...opts.env };
65+
for (const k of ['CI', 'CONTINUOUS_INTEGRATION', 'GITHUB_ACTIONS'])
66+
delete childEnv[k];
6267
const child = pty.spawn(opts.cmd, opts.args, {
6368
name: 'xterm-256color',
6469
cols,
6570
rows,
6671
cwd: opts.cwd,
67-
env: opts.env as { [key: string]: string },
72+
env: childEnv as { [key: string]: string },
6873
});
6974

7075
const cbs: Array<() => void> = [];

0 commit comments

Comments
 (0)