feat(client): the three list pickers adopt the chrome type ramp (UI/UX v3 P4e) - #98
Merged
Conversation
…X v3 P4e)
P4b deferred the command palette, host manager and macro picker as "safe in
principle, deferred to keep the diff reviewable". Measuring them found one
thing that was not safe.
Both list pickers aligned their two columns with `{:<20}` / `{:<22}` — a count
of characters, which lines up only because the chrome borrows the terminal's
monospace font. That is the assumption the ramp removes, and it was already
broken for any name past the pad width and for CJK names. `name_column_width`
replaces it: the widest measured name plus a gap, clamped so the detail column
keeps a floor, so a long name shortens nothing but its own column.
Two more defects the migration closes:
- None of the three truncated, so a long palette action or host name drew past
the panel edge. Every row now goes through `draw_picker_run`, which
truncates and draws from one measurement — the pickers' `draw_row_run`.
- The selection marker moved out of the label. `"> "` and `" "` are the same
width only in a monospace font, so a prefixed marker would have shifted every
selected row's text sideways; it is its own run now and both states start
their label at the same x.
No hit-region work, for the same reason the dialog buttons needed none: none of
the three pickers is mouse-hit-tested at all — `mouse.rs` does not mention
`palette`, `host_manager` or `macro_picker`. Panel sizes and row pitch stay in
cells, so nothing moves.
Observed and deliberately not fixed: the host manager and macro picker draw
their row fills and every text colour from hard-coded literals — G11 residue
that the token migration missed, so those rows do not answer to the scheme and
were never contrast-corrected in P5. Changing hue and type size in one PR would
make a visual regression impossible to attribute; it wants its own change.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Coverage reportGenerated by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was deferred, and what measuring found
P4b's §5.2 left the command palette, host manager and macro picker on the cell path as "safe in principle, deferred to keep the diff reviewable". One of them was not safe:
Both list pickers aligned their columns with
{:<20}/{:<22}— a count of characters. That lines up only because the chrome borrows the terminal's monospace font, which is precisely the assumption the ramp removes. It was already broken before this PR for any name past the pad width and for CJK names, whose cells are twice as wide.name_column_widthreplaces it: the widest measured name plus a gap, clamped so the detail column keeps a floor. A long name shortens nothing but its own column.Two more defects this closes
draw_picker_run, which truncates and draws from one measurement — the pickers' equivalent of the widget layer'sdraw_row_run."> "and" "are the same width only in a monospace font, so a prefixed marker would have shifted every selected row's text sideways once rows drew proportionally. It is its own run now, and selected/unselected labels start at the same x.No hit-region work
Same finding as the dialog buttons in #96: none of the three pickers is mouse-hit-tested at all —
mouse.rsnever mentionspalette,host_managerormacro_picker. They are keyboard- and AccessKit-driven. Panel sizes and row pitch stay in cells, so nothing moves.Gates
name_column_widthis pure and tested: widest-plus-gap, the long-name clamp (a 10 000 px name cannot starve the detail column), and never negative on a degenerate panel.Verification
cargo fmt --check— cleancargo clippy --workspace --all-targets -- -D warnings— no warningscargo test --workspace— 28 suites pass, 4 new testsObserved, deliberately not fixed
The host manager and macro picker draw their row fills and every text colour from hard-coded literals (
[0.35, 0.15, 0.50, 1.0]and friends) — G11 residue the token migration missed. Those rows do not answer to the colour scheme and were never contrast-corrected in P5. Changing hue and type size in the same PR would make a visual regression impossible to attribute, so it wants its own change, sized as a G11/P5 follow-up.Still deferred after this: the status bar (cell-aligned by design — the Lua status format is column-oriented), tab-bar labels (N-3), the SFTP file-transfer dialog (cell-derived field geometry), the context menu, and the hand-written parts of
ssh_tab.rs/keybindings_tab.rs.🤖 Generated with Claude Code