Skip to content

fix(tui): size the welcome screen to the viewport it actually gets - #1376

Merged
will-lamerton merged 1 commit into
Nano-Collective:mainfrom
addyCooks:fix/welcome-viewport-height-1330
Sep 21, 2026
Merged

will-lamerton merged 1 commit into
Nano-Collective:mainfrom
addyCooks:fix/welcome-viewport-height-1330

Conversation

@addyCooks

@addyCooks addyCooks commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1330

Description

welcome-message.tsx budgeted its logo and menu against the raw terminal height (useTerminalRows), but fullscreen mode clips at the chat viewport, which is the terminal minus the input footer and the frame's padding. chat-history.tsx clips with overflow: "hidden", so the overflow was silent: on a standard 80×24 screen a new user's first view lost the Quit /exit row and the tip line, with nothing to indicate content was missing.

Measured at 80 columns (this drove the thresholds):

banner variant height
header + tagline + location 11 rows
+ two-item menu 14 rows
+ full four-item menu 16 rows
+ block wordmark 26 rows
input footer 5 rows (+2 root padding)

A 24-row terminal leaves the banner ~17 rows, and the old ladder rendered 26 into it.

Fix:

  • WelcomeMessage accepts an availableRows budget (defaults to the terminal height, for callers nothing clips).
  • App.tsx passes terminalRows - FULLSCREEN_CHROME_ROWS when the alternate screen is active, and the full height inline, where scrollback clips nothing. createStaticComponents forwards it.
  • The thresholds become the banner's measured heights, so each rung is only offered when it fits, and the decorative wordmark is the first thing dropped the menu and tip are what a new user needs.

At 80×24 the banner now renders in 16 rows: full menu, tip, no wordmark. The wordmark returns once the banner has 26 rows.

Behaviour change worth calling out: the block wordmark now needs 26 available rows rather than 16, so short terminals show the menu and tip instead of the logo. That is the trade this issue asks for, and it applies inline too, where the 26-row banner never fit on a 24-row screen either.

Recording

B08-FIXED-welcome-8024

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Changeset

  • Added a changeset (pnpm changeset) describing this change for the changelog

Testing

Automated Tests

  • New features include passing tests in .spec.ts/tsx files
  • All existing tests pass (pnpm test:all completes successfully)
  • Tests cover both success and error scenarios

Manual Testing

  • Tested with Ollama
  • Tested with OpenRouter
  • Tested with OpenAI-compatible API
  • Tested MCP integration (if applicable)

Checklist

  • If this was for an open issue, I was assigned to it
  • Code follows project style guidelines
  • Self-review completed
  • Documentation updated (if needed)
  • No breaking changes (or clearly documented)
  • Appropriate logging added using structured logging

The banner budgeted its logo and menu against the raw terminal height, but fullscreen clips at the chat viewport - the terminal minus the input footer and frame padding - so on a standard 80x24 screen the last menu item and the tip were cut off with no hint anything was missing. App now passes the rows the banner actually has, and its thresholds are the banner's measured heights (14 rows with a two-item menu, 16 with the full menu, 26 with the block wordmark), so the decorative wordmark is dropped before the menu and tip. At 80x24 the banner now renders in 16 rows inside a ~17-row viewport. Closes Nano-Collective#1330.
@github-actions

Copy link
Copy Markdown
Contributor

nc-review: nothing to raise

@addyCooks — nothing to raise from the automated review.

The PR threads an availableRows budget from App.tsx down through createStaticComponents to WelcomeMessage, so the banner's menu/logo thresholds reflect the chat viewport (terminal minus the 7-row interactive chrome) rather than the raw terminal height. On an 80×24 fullscreen screen the banner now renders the full four-item menu and tip in 17 rows instead of being silently clipped at 26 rows. The threshold constants are the banner's own measured heights, the regression test exercises the exact 80×24 viewport, and a changeset is included.


🔴 blocking · 🟠 a reviewer would ask for a change · ⚪ optional

Automated code review — correctness, security, design, tests, plus duplicates and scope. A human still decides; this is not a substitute for review and is not exhaustive. The required status checks separately cover lint, formatting, types, unused dependencies, the test suite and the build. This bot never merges. Maintainers can rerun with /re-review.

@github-actions github-actions Bot added the agent:clean nc-review had nothing to raise label Sep 17, 2026
@will-lamerton

Copy link
Copy Markdown
Member

Nice as always! @addyCooks

@will-lamerton
will-lamerton merged commit 7fd0841 into Nano-Collective:main Sep 21, 2026
17 checks passed
@addyCooks

Copy link
Copy Markdown
Contributor Author

Thankyou @will-lamerton : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:clean nc-review had nothing to raise area:tui Terminal UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Welcome screen is clipped on a standard 80×24 terminal

2 participants