Skip to content

fix(tui): picker polish — stable height, inverse-bold selection, dropdown pinned#13592

Merged
OutThisLife merged 4 commits into
mainfrom
bb/tui-picker-polish
Apr 21, 2026
Merged

fix(tui): picker polish — stable height, inverse-bold selection, dropdown pinned#13592
OutThisLife merged 4 commits into
mainfrom
bb/tui-picker-polish

Conversation

@OutThisLife

@OutThisLife OutThisLife commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

From TUI v2 blitz-test feedback: "/model switching pop-up changes in size whilst scrolling", "Contrast on highlighted items in TUI slash menus are a bit low contrast", and during retest "this dropdown box.. as i scroll and more options appear, for some reason more options appear and it expands the height".

Three related tweaks landing together because they all touch the picker UX surface and share the same root concern (stable height + readable selection).

Summary

  • Stable picker height — warning row, ↑/↓ more hints, and the items list were all conditionally rendered, so the picker jumped as selection moved or providers without a warning slid into view. Every slot now renders unconditionally: warning falls back to a blank line, hints render an empty string at the edge, and the items grid always emits VISIBLE rows padded with blanks.
  • Truncate long rows — the items grid was fixed-height, but the row <Text> itself had no wrap prop so Ink defaulted to wrap="wrap". Long model/provider names wrapped to a second visual line and bounced the height right back. Every picker row (plus padding / empty-state) is now wrap="truncate-end". Same treatment applied to sessionPicker and skillsHub.
  • Pinned picker widthFloatBox uses alignSelf="flex-start" so it shrinks-to-fit. Without a width constraint, truncate-end had nothing to truncate against and the float grew/shrank as long rows scrolled into view. Pinned the outer Box to a stable width derived from terminal cols.
  • Stable completion dropdown — the slash-command completion popup (typing /model) grew from 8 rows at compIdx=0 to 16 at compIdx≥8 because the slice end scaled with compIdx instead of being a fixed window. Now a fixed COMPLETION_WINDOW = 16 rows, centered on compIdx, clamped to array bounds.
  • Contrast — selected rows in model/session/skills pickers and approval/clarify prompts used a dim → cornsilk color swap, which reads as low contrast on lighter themes and LCDs. Switched to inverse bold with the brand accent. sessionPicker's middle meta column (previously always dim) now inherits the row's selection state.

Test plan

  • npm run type-check clean
  • npm test — 152/152 pass
  • Manual: open /model picker, scroll — both axes stay rigid, selection is high-contrast
  • Manual: type /model with the dropdown visible, hold Down — stays at 16 rows, does not grow
  • Manual: type /model ha (filter down to ~2) — dropdown shrinks only from the filter, not from scroll
  • Manual: /resume (session picker), /skills (skills hub), approval prompt, clarify prompt — selection consistent

Copilot AI 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.

Pull request overview

Improves Hermes TUI picker UX by preventing the /model picker from changing height while scrolling and by standardizing higher-contrast selection styling across pickers/prompts.

Changes:

  • Make ModelPicker layout height stable by always rendering warning/hint rows and padding the visible list to a fixed row count.
  • Update selection styling in pickers/prompts to use inverse + bold with accent colors for clearer contrast.
  • Ensure SessionPicker meta column reflects selection state (no longer always dim).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
ui-tui/src/components/modelPicker.tsx Stabilizes picker height via unconditional slots and fixed VISIBLE row rendering; updates selection styling.
ui-tui/src/components/sessionPicker.tsx Updates selection styling across all columns so the entire row reflects selection state.
ui-tui/src/components/skillsHub.tsx Updates category/skill selection styling to the new inverse+bold accent approach.
ui-tui/src/components/prompts.tsx Updates Approval/Clarify option selection styling to inverse+bold for higher contrast.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI 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.

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui-tui/src/components/modelPicker.tsx Outdated
Comment thread ui-tui/src/components/modelPicker.tsx Outdated
Comment thread ui-tui/src/components/modelPicker.tsx Outdated
@OutThisLife OutThisLife force-pushed the bb/tui-picker-polish branch 4 times, most recently from 0967f33 to ced2de7 Compare April 21, 2026 19:04
@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) area/nix Nix flake, NixOS module, container packaging labels Apr 21, 2026
@OutThisLife OutThisLife changed the title fix(tui): picker polish — stable height + inverse-bold selection fix(tui): picker polish — stable height, inverse-bold selection, dropdown pinned Apr 21, 2026
Warning row, "↑ N more" / "↓ N more" hints, and the items list were all
conditionally rendered, so the picker jumped in size as the selection
moved or providers without a warning slid into view.

Render every slot unconditionally: warning falls back to a blank line,
hints render an empty string when at the edge, and the items grid always
emits VISIBLE rows padded with blanks. Height is now constant across
providers, model counts, and scroll position.
Selected rows in the model/session/skills pickers and approval/clarify
prompts only changed from dim gray to cornsilk, which reads as low
contrast on lighter themes and LCDs (reported during TUI v2 blitz).

Switch the selected row to `inverse bold` with the brand accent color
across modelPicker, sessionPicker, skillsHub, and prompts so the
highlight is terminal-portable and unambiguous. Unselected rows stay
dim. Also extends the sessionPicker middle meta column (which was
always dim) to inherit the row's selection state.

Copilot AI 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.

Pull request overview

Copilot reviewed 25 out of 25 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui-tui/src/components/modelPicker.tsx Outdated
Comment thread ui-tui/src/components/sessionPicker.tsx Outdated
Comment thread ui-tui/src/components/skillsHub.tsx Outdated
A6 added a fixed-height grid (Array.from({length: VISIBLE})), but the
row <Text> itself had no wrap prop so Ink defaulted to wrap="wrap".
A sufficiently long model or provider name would wrap to a second
visual line and bounce the overall picker height right back — which
is exactly what reappeared during the TUI v2 blitz retest on /model.

Pin every picker row (and the empty-state / padding rows) to
wrap="truncate-end" so each slot is guaranteed one line.  Applies
across modelPicker, sessionPicker, and skillsHub.
The completion popup (e.g. typing `/model`) grew from 8 rows at
compIdx=0 up to 16 rows at compIdx≥8 — the slice end was `compIdx + 8`
so every arrow-down added another rendered row until the window filled.
Reported during TUI v2 retest: "as i scroll and more options appear,
for some reason more options appear and it expands the height".

Fixed viewport (`COMPLETION_WINDOW = 16`) centered on compIdx, clamped
so it never slides past the array bounds.  Renders exactly
`min(WINDOW, completions.length)` rows every frame.
@OutThisLife OutThisLife force-pushed the bb/tui-picker-polish branch from 71e8d66 to 34f24da Compare April 21, 2026 19:43
@OutThisLife OutThisLife merged commit 26394d9 into main Apr 21, 2026
9 of 10 checks passed
@OutThisLife OutThisLife deleted the bb/tui-picker-polish branch April 21, 2026 20:50
ulasbilgen pushed a commit to ulasbilgen/hermes-adhd-agent that referenced this pull request May 1, 2026
…-polish

fix(tui): picker polish — stable height, inverse-bold selection, dropdown pinned
aj-nt pushed a commit to aj-nt/hermes-agent that referenced this pull request May 1, 2026
…-polish

fix(tui): picker polish — stable height, inverse-bold selection, dropdown pinned
Luminet2023 pushed a commit to Luminet2023/hermes-agent that referenced this pull request May 1, 2026
…-polish

fix(tui): picker polish — stable height, inverse-bold selection, dropdown pinned
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…-polish

fix(tui): picker polish — stable height, inverse-bold selection, dropdown pinned
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…-polish

fix(tui): picker polish — stable height, inverse-bold selection, dropdown pinned
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…-polish

fix(tui): picker polish — stable height, inverse-bold selection, dropdown pinned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/nix Nix flake, NixOS module, container packaging comp/tui Terminal UI (ui-tui/ + tui_gateway/) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants