Skip to content

fix(tui): show the Inspector version in the header - #2706

Merged
cliffhall merged 1 commit into
v2/mainfrom
v2/fix/2656-tui-header-version
Oct 12, 2026
Merged

cliffhall merged 1 commit into
v2/mainfrom
v2/fix/2656-tui-header-version

Conversation

@cliffhall

Copy link
Copy Markdown
Member

Closes #2656

Problem

The TUI header box was height={1} and also drew a bottom border. Ink sizes the border inside the box, so the border used the box's only row, the title row got zero height, and the right-justified v{APP_VERSION} was clipped off screen.

Fix (clients/tui/src/App.tsx)

  • headerHeight is now 2: one row for the title and one for the border. availableHeight derives from it, so the panes below shrink by the row the header really uses.
  • Narrow terminals. With the height fixed, an 80-column terminal still had a problem. The full title (84 chars) doesn't fit, so it wrapped into the border row and squeezed the version out. Before this change, the header at 80×24 showed only the border. Now the name and version don't shrink (flexShrink={0}), and the description truncates with … (wrap="truncate-end").

Tests

clients/tui/__tests__/App.test.tsx has a new header block with two cases. Each checks the title row, the version at its right edge, and a clean border row below it:

  • at 100 columns, the full title and the version;
  • at 80 columns, a truncated description with the version still shown.

Both cases fail without the App.tsx change and pass with it. npm run local:gate passes.

Screenshots

Captured from the built launcher (--tui) in a real pty. The raw output was replayed through @xterm/headless and rendered to PNG.

160×40 (the issue's repro): before / after
before 160x40
after 160x40

80×24: before (title missing entirely) / after
before 80x24
after 80x24

🤖 Generated with Claude Code

The header box was one row tall and also drew a bottom border, which
took that only row and left the title zero height, so Ink clipped the
right-justified version. Size it to two rows. On a terminal too narrow
for the full title, truncate the description rather than letting it
wrap into the border row and squeeze the version out.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
@cliffhall cliffhall added the v2 Issues and PRs for v2 label Oct 12, 2026
@cliffhall
cliffhall requested a balanced review from Copilot October 12, 2026 20:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The layout fix is focused, correctly accounts for available height, and includes appropriate regression tests.

0 open findings

What changed in this PR

Fixes the TUI header layout so the Inspector version remains visible across standard terminal widths.

Changes:

  • Reserves separate rows for header content and its border.
  • Prevents the name/version from shrinking while truncating the description.
  • Adds coverage for 100- and 80-column terminals.
File Description
clients/​tui/​src/​App.tsx Corrects header sizing and narrow-width layout.
clients/​tui/​__tests__/​App.test.tsx Verifies version visibility, truncation, and border placement.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@cliffhall

Copy link
Copy Markdown
Member Author

Copilot review loop closed: round 1 came back clean (0 inline comments, nothing in the body or a suppressed block), so no further rounds were requested.

@cliffhall
cliffhall merged commit 771430c into v2/main Oct 12, 2026
8 checks passed
@cliffhall
cliffhall deleted the v2/fix/2656-tui-header-version branch October 12, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Issues and PRs for v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI header never shows the Inspector version (header box too short for its border)

2 participants