ui: ctrl+c hint replaces the meta line for 3s; meta line truncates with … - #120
Conversation
…eta line to the pane
There was a problem hiding this comment.
Caution
Changes requested ❌ — 1 issue
Reviewed fd5e3fb in 4 minutes, 12 seconds.
- Reviewed
1commit with60lines of code in2files - Ran
1review agent producing1comment where1was posted - This pipeline runs no gatekeeper, so findings are posted as written.
- View full details on ellipsis.dev
This review was created by . You can tag
@ellipsis in this pull request.
| 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))}…` |
There was a problem hiding this comment.
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.
| 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))}…` |
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.
press ctrl+c again to exithint now appears on the meta line below the composer instead of the notice line above it, and the prompt automatically disarms after 3 seconds.…when it exceeds terminal width, instead of attempting to shorten the session ID itself.This description was created by
for fd5e3fb. It will automatically update as commits are pushed.