Skip to content

test(cli): verify TUI rendering without fixed UI text - #13693

Merged
marius-kilocode merged 2 commits into
mainfrom
investigate-prerelease-failure
Sep 2, 2026
Merged

test(cli): verify TUI rendering without fixed UI text#13693
marius-kilocode merged 2 commits into
mainfrom
investigate-prerelease-failure

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The rendered CLI smoke test added in #13598 could fail after a healthy startup. It waited for Ask anything..., sent Ctrl+P, and expected Commands. First-run provider setup could take focus or replace the palette, which caused the macOS Intel and Linux ARM64 validation jobs in run 33534471714 to time out.

The original requirement remains: a process that starts but leaves the TUI blank must not pass release validation. Process liveness, --version, and a successful headless command are not sufficient.

Why This Change Was Made

Read the current terminal screen with the existing VT parser instead of matching application copy or concatenating stripped output. Type a random suffix, move to the start of the input, insert a random prefix, and require the composed value on screen. That value is never sent as one input string, so plain terminal echo cannot satisfy the editing check.

Keep the fixture isolated and offline with a dummy provider. Retry input acquisition within the existing deadline to handle delayed focus. Preserve diagnostic detection, early-exit failures, and process-tree cleanup. Ignore hidden terminal control-string payloads so capability queries cannot count as rendered text.

Move the TUI-specific check beside its CLI command so it can reuse the existing terminal parser without adding a core-to-CLI dependency. Keep the real-PTY regression tests in the explicit Linux, macOS, and Windows workflow steps.

User Impact

Release validation still rejects a blank or unresponsive TUI, but no longer depends on placeholder text, command-palette wording, or first-run provider onboarding. No production TUI startup hooks, real credentials, or model requests are needed. The existing Alpine and Windows ARM64 PTY exclusions are unchanged.

Evidence

  • 53 focused smoke, VT parser, and interactive-terminal tests pass with Bun 1.3.14. They cover a real OpenTUI input, delayed focus, slow redraws (0.5 FPS), silent and probes-only processes, erased text, frozen output, cooked/raw echo, hidden input in control strings, early exits, and startup diagnostics.
  • Rebuilt the macOS ARM64 CLI and ran its complete __pty-smoke command ten times successfully. The binary remains 179 MiB as reported by du -h.
  • CLI and core typechecks, formatting, architecture boundaries, and upstream annotations pass. Repository lint reports no errors and existing warnings.
  • Local shell checks use Bash. The separate Fish OSC parsing issue is unchanged.
  • Full compiled release-matrix validation passed on all eight targets. The compiled TUI rendering/input check passed on Linux x64/ARM64, macOS Intel/ARM64, and Windows x64. Alpine x64/ARM64 and Windows ARM64 passed their existing artifact/model checks; those targets still do not run the PTY test.
  • The validation branch contains this PR's commit plus only temporary workflow/build-upload changes. Release build flags and the existing matrix were retained, but release creation, release uploads, package publication, and VSIX packaging were disabled. The GitHub token had read-only permissions. These temporary changes are not part of this PR.
  • PR CI also passed the real-PTY regression tests on Linux, macOS, and Windows, including the negative echo/blank-screen cases and slow-render test.

Manual test: run KILO_PTY_SMOKE=1 <compiled-cli> --pure __pty-smoke. The check must complete without credentials or submitted prompts. On Unix, use SHELL=/bin/bash if the local default shell is Fish.

@marius-kilocode
marius-kilocode merged commit 9cacc26 into main Sep 2, 2026
32 checks passed
@marius-kilocode
marius-kilocode deleted the investigate-prerelease-failure branch September 2, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants