Skip to content

style(tui): polish agent picker layout, cards, and status bars#3543

Merged
dgageot merged 5 commits into
docker:mainfrom
dgageot:worktree-board-50b04d99c73eca46
Jul 9, 2026
Merged

style(tui): polish agent picker layout, cards, and status bars#3543
dgageot merged 5 commits into
docker:mainfrom
dgageot:worktree-board-50b04d99c73eca46

Conversation

@dgageot

@dgageot dgageot commented Jul 8, 2026

Copy link
Copy Markdown
Member

The agent picker had a handful of rough edges: the status bars used a hand-rolled key rendering path while every other dialog had already moved to dialog.RenderHelpKeys, cards were taller than necessary, the panel was wider than it needed to be, and the selected card had no visual accent to make it stand out.

This change brings the picker in line with the rest of the TUI. The main help line and the YAML details dialog both now go through dialog.RenderHelpKeys, which removes duplicated logic and gives them the same look as other dialogs. A fitHelpPairs helper was extracted so that on narrow terminals trailing bindings are dropped cleanly rather than soft-wrapping and distorting the layout. Card height was reduced from 7 to 5 rows by removing vertical padding, and the panel was narrowed from ~99 to ~83 columns with its title, subtitle, and status bar centered. The redundant "double-click select" binding was dropped. The selected card now gets a thick accent border, the Lean Mode label is rendered brighter when ticked, and the Open Board entry is rendered as a button-like control.

Mouse hit-testing invariants (panelSize == render geometry) are preserved throughout; existing tests were updated and new regression tests for fitHelpPairs and hit-testing were added.

dgageot added 5 commits July 8, 2026 21:30
Replaces the hand-rolled help strings with the shared dialog helpers,
matching the style of other dialogs. Removes the now-unused percentLabel
helper and its test.

Assisted-By: Claude
…rapping

Drop trailing key bindings instead of letting the help line soft-wrap on
narrow terminals; fix TestAgentPickerCardAtMatchesRenderedText to assert
both subtitle and status-bar rows; add TestAgentPickerDetailsHelpNeverWraps.

Assisted-By: claude-opus-4-5
Remove vertical padding from cards; update agentPickerCardHeight and
windowing test height math accordingly.

Assisted-By: Claude
Drop redundant double-click status-bar binding, shorten lean binding help,
and center title/subtitle/status bar within the content column.

Assisted-By: Claude
Thick border on selected card, highlighted lean-mode label when ticked,
muted brackets around bright label on Open Board button.
@dgageot
dgageot requested a review from a team as a code owner July 8, 2026 20:27

@docker-agent docker-agent 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.

Assessment: 🟢 APPROVE

The diff was reviewed for bugs introduced by the changed + lines. No issues were found.

Scope reviewed:

  • fitHelpPairs helper logic (narrow-terminal truncation)
  • Card height invariants (7 → 5 row change) and panel width (~99 → ~83)
  • Mouse hit-testing math consistency with render geometry
  • dialog.RenderHelpKeys integration in status bars and YAML details dialog
  • Accent border rendering for selected card
  • Lean Mode / Open Board button rendering
  • New regression tests for fitHelpPairs and hit-testing

The refactor cleanly removes duplicated key-rendering logic, preserves hit-testing invariants, and the new tests provide good regression coverage.

@aheritier aheritier added kind/refactor PR refactors code without behavior change area/tui For features/issues/fixes related to the TUI labels Jul 8, 2026
@dgageot
dgageot merged commit dccc5a5 into docker:main Jul 9, 2026
10 of 11 checks passed
Piyush0049 pushed a commit to Piyush0049/docker-agent that referenced this pull request Jul 15, 2026
…3eca46

style(tui): polish agent picker layout, cards, and status bars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tui For features/issues/fixes related to the TUI kind/refactor PR refactors code without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants