Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

test(ui): opt the attach launch-pad render test out of Ink's CI mode (final-frame-only output)

Salman Qureshi6f214b9aeee4
diff --git a/src/ui/attach-launch-pad.test.tsx b/src/ui/attach-launch-pad.test.tsx
index c529ab8f..4a3e9508 100644
--- a/src/ui/attach-launch-pad.test.tsx
+++ b/src/ui/attach-launch-pad.test.tsx
@@ -1,11 +1,13 @@
+// Ink prints only the final frame when it believes it runs in CI (is-in-ci
+// reads CI at import). Opt out before ink loads, like live-region-residue.
+process.env.CI = '0';
+
import { describe, expect, it } from 'vitest';
import React from 'react';
-import { render } from 'ink';
import { EventEmitter } from 'node:events';
import { readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
import { dirname, join } from 'node:path';
-import { AttachTui } from './attach-tui.js';
import { VtScreen } from './vt-screen.js';
class FakeStdout extends EventEmitter { isTTY = true; constructor(public screen: VtScreen) { super(); } get columns() { return this.screen.columns; } get rows() { return this.screen.rows; } write(c: string) { this.screen.write(c); return true; } }
@@ -23,6 +25,8 @@ const fakeClient = {
describe('attach TUI opens with the launch pad', () => {
it('shows the wordmark and the real status rows before the session picker', async () => {
+ const { render } = await import('ink');
+ const { AttachTui } = await import('./attach-tui.js');
const screen = new VtScreen(100, 36);
const app = render(<AttachTui client={fakeClient} pid={4242} version="1.3.3" onExit={() => {}} />, { stdout: new FakeStdout(screen) as never, stdin: new FakeStdin() as never, exitOnCtrlC: false, patchConsole: false } as never);
await sleep(400);