Skip to content

fix(tui): show a scroll rail on the /statusline list when it doesn't fit - #7028

Merged
Hmbown merged 1 commit into
codewhale-hq:mainfrom
Lstarsky0:ux/statusline-scroll-rail
Oct 20, 2026
Merged

Hmbown merged 1 commit into
codewhale-hq:mainfrom
Lstarsky0:ux/statusline-scroll-rail

Conversation

@Lstarsky0

Copy link
Copy Markdown
Contributor

What and why

When the frame is too short for all eleven /statusline items, the list shows what fits and scrolls with the cursor, but nothing says more items are below. At 40×12, before:

 │ Choose what the footer shows:      │
 │                                    │
 │  ▸ [✓] Mode  (plan · work ·…)      │
 │    [✓] Model  (the model id…)      │
 │    [✓] Context window %  (tokens…) │
 │    [✓] Session cost  (running…)    │
 │  Space toggle   a all   n none     │

After:

 │ Choose what the footer shows:      │
 │                                    │
 │  ▸ [✓] Mode  (plan · work ·…)    █ │
 │    [✓] Model  (the model id…)    █ │
 │    [✓] Context window %  (token…)│ │
 │    [✓] Session cost  (running…)  │ │
 │  Space toggle   a all   n none     │

/theme, /help, the session and file pickers and the settings list already use render_panel_scroll_rail for this, so the item rows here do too. When the rail is drawn, the rows and their hitboxes give up its column: hints are truncated one column shorter, and since handle_mouse hit-tests with rect.contains, a click on the rail doesn't toggle the row next to it. A list that fits draws no rail and is unchanged.

Issue

No-Issue: /statusline gives no cue that more items are below when the list scrolls, no issue filed for it

How I tested it

  • Ran a debug build in a pseudo-terminal with an empty HOME and opened /statusline at 40×12, 60×16, 80×19, 80×24 and 100×32, with this change and without it. The rail shows at 40×12 and 60×16, and End moves the thumb to the bottom; 80×19 and up fit all eleven and are byte-identical before and after.
  • At 40×12, clicking the rail cell on the Model row changes nothing; clicking the column just left of it moves to Model and toggles it.
  • cargo fmt --all -- --check, cargo clippy -p codewhale-tui --all-targets --all-features with CI's flags, and cargo check -p codewhale-tui --all-targets: clean. Clippy also on 1.99, plus cargo +1.89.0 check -p codewhale-tui.
  • cargo nextest run -p codewhale-tui --lib: 15349 passed, none failed, including the 15 status picker tests.

Checklist

  • One focused change, on db04c38; it merges cleanly into current main
  • cargo fmt --all passes, and tests cover new or changed behavior
  • If this adds or changes a user-facing feature, I updated its docs and its row in docs/features.toml (cargo test -p codewhale-tui --test feature_registry checks it) — n/a

When the frame is too short for all eleven /statusline items, the list
shows what fits and scrolls with the cursor, but nothing says more
items are below. At 40x12 it shows four, at 60x16 eight, and the last
visible row looks like the end of the list.

/theme, /help, the session and file pickers and the settings list
already paint render_panel_scroll_rail for this, so use it here over
the item rows. When it is drawn the rows and their hitboxes give up its
column, so hint truncation leaves room for it and a click on the rail
does not toggle the row beside it. A list that fits draws no rail and
renders as before.

Signed-off-by: Lstarsky0 <59827030+Lstarsky0@users.noreply.github.com>
@Lstarsky0
Lstarsky0 requested a review from Hmbown as a code owner October 19, 2026 16:40

@claude claude 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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added the contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm label Oct 19, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T16:43:07.366920Z 150257c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Hmbown
Hmbown merged commit 705bf08 into codewhale-hq:main Oct 20, 2026
28 checks passed
@Hmbown

Hmbown commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

🤖 This reply is from Claude Opus 5.5, an AI agent working on behalf of the Codewhale maintainers. It is posted through @Hmbown's account, but Hunter did not write it.

Thanks @Lstarsky0. Reusing render_panel_scroll_rail brings /statusline in line with /theme, /help and the settings lists, and narrowing the row hitboxes means a click on the rail no longer toggles the row next to it. Your 40×12 captures made it quick to review. Merged in 705bf08 for 0.10.2, which hasn't shipped yet.

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

Labels

contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants