Skip to content

ui: ctrl+c hint replaces the meta line for 3s; meta line truncates with … - #120

Merged
hbrooks merged 1 commit into
mainfrom
ctrlc-hint-footer
Aug 20, 2026
Merged

ui: ctrl+c hint replaces the meta line for 3s; meta line truncates with …#120
hbrooks merged 1 commit into
mainfrom
ctrlc-hint-footer

Conversation

@hbrooks

@hbrooks hbrooks commented Aug 20, 2026

Copy link
Copy Markdown
Member

The first ctrl+c now shows "press ctrl+c again to exit" on the footer meta line (replacing it) instead of the notice line above the composer, and the arm expires after 3 seconds. The meta line also truncates to the terminal width with a trailing … when even the plain form overflows.

Important

Moves the ctrl+c hint to the footer meta line and makes it expire after 3 seconds; improves meta line truncation to respect terminal width.

  • When Ctrl+C is pressed, the press ctrl+c again to exit hint now appears on the meta line below the composer instead of the notice line above it, and the prompt automatically disarms after 3 seconds.
  • The meta line now truncates with a trailing when it exceeds terminal width, instead of attempting to shorten the session ID itself.

This description was created by Ellipsis for fd5e3fb. It will automatically update as commits are pushed.

@hbrooks
hbrooks merged commit efe6f12 into main Aug 20, 2026
1 check passed

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Changes requested ❌ — 1 issue

Reviewed fd5e3fb in 4 minutes, 12 seconds.
  • Reviewed 1 commit with 60 lines of code in 2 files
  • Ran 1 review agent producing 1 comment where 1 was posted
  • This pipeline runs no gatekeeper, so findings are posted as written.
  • View full details on ellipsis.dev

This review was created by Ellipsis. You can tag @ellipsis in this pull request.

Comment thread src/ui/ConnectApp.tsx
Comment on lines +1495 to +1501
const metaLine = ctrlCArmed
? CTRL_C_QUIT_HINT
: linked.length < cols
? linked
: plain.length < cols
? plain
: metaParts(`${sessionId.slice(0, 20)}…`).join(' · ')
: `${plain.slice(0, Math.max(0, cols - 2))}…`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The armed branch bypasses the width fit every other branch applies: CTRL_C_QUIT_HINT is 26 columns, so on a terminal 26 columns or narrower it wraps to two rows while the footer math budgets the meta line at exactly one (const fixed = 1 /* meta line */, line 831) — the over-tall frame scrolls Ink's render region and smears stale rows, the failure the comment above warns about. Fit the hint like the other branches.

Reproduce by narrowing the terminal (or a tmux split) to <=26 columns and pressing ctrl+c: metaLine is emitted through a plain with no wrap="truncate" (line 1673), so Ink wraps it onto a second row that the viewBudget/padRows computation never reserved.

Suggested change
const metaLine = ctrlCArmed
? CTRL_C_QUIT_HINT
: linked.length < cols
? linked
: plain.length < cols
? plain
: metaParts(`${sessionId.slice(0, 20)}…`).join(' · ')
: `${plain.slice(0, Math.max(0, cols - 2))}…`
const metaLine = ctrlCArmed
? CTRL_C_QUIT_HINT.length < cols
? CTRL_C_QUIT_HINT
: `${CTRL_C_QUIT_HINT.slice(0, Math.max(0, cols - 2))}…`
: linked.length < cols
? linked
: plain.length < cols
? plain
: `${plain.slice(0, Math.max(0, cols - 2))}…`

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.

1 participant