fix(help): keep the shortcuts panel inside its dock #54

Merged
BlackAngelTV merged 2 commits from fix/help-action-column into main 2026-12-03 10:17:02 +01:00
Owner

Summary

The action column of the keyboard shortcuts panel was written without any width bound, so on a narrow dock the text was cut by the panel edge, in the middle of an identifier:

kitty_mod+alt+v   paste_from_clipboard_his
kitty_mod+a > d   set_background_opacity dt

The column is now sized from the room the row leaves and truncated with a single-cell … inside that column, the key column shrinks on very narrow docks so a row always fits, and the full name of the selected action is shown on the help line when its column had to ellipsize it.

Changes

  • kittens/command_palette/main.go: bound the action column, adaptive key column, ellipsis (… instead of ...), full action on the detail line.
  • kittens/command_palette/main_test.go: tests for the column budget, the ellipsis and the row width at 10/20/35/50/104 cells.
  • docs/changelog.rst: changelog entry.

Tests

  • go test ./kittens/command_palette/
  • gofmt on the touched files

The panel is drawn by the Go TUI loop, so the tests cover the width arithmetic rather than a rendered screen; the panel itself was not viewed.

Fixes #50

## Summary The action column of the keyboard shortcuts panel was written without any width bound, so on a narrow dock the text was cut by the panel edge, in the middle of an identifier: ```text kitty_mod+alt+v paste_from_clipboard_his kitty_mod+a > d set_background_opacity dt ``` The column is now sized from the room the row leaves and truncated with a single-cell `…` inside that column, the key column shrinks on very narrow docks so a row always fits, and the full name of the selected action is shown on the help line when its column had to ellipsize it. ## Changes - `kittens/command_palette/main.go`: bound the action column, adaptive key column, ellipsis (`…` instead of `...`), full action on the detail line. - `kittens/command_palette/main_test.go`: tests for the column budget, the ellipsis and the row width at 10/20/35/50/104 cells. - `docs/changelog.rst`: changelog entry. ## Tests - `go test ./kittens/command_palette/` - `gofmt` on the touched files The panel is drawn by the Go TUI loop, so the tests cover the width arithmetic rather than a rendered screen; the panel itself was not viewed. Fixes #50
BlackAngelTV added 2 commits 2026-12-03 10:17:00 +01:00
The action column of the panel was written with no width limit, so on a narrow
dock a long action name was cut by the edge of the panel in the middle of an
identifier, and a selected row padded with reverse video overflowed. The column
is now bounded by the room the row leaves and ellipsized with a single cell
ellipsis, the key column shrinks on very narrow docks, and the full name of the
selected action stays reachable on the help line.

Fixes #50
chore(release): bump the fork version to 0.1.12
CI / check (pull_request) Failing after 5m21s
f76eccc169
The shortcuts panel now renders differently, so cut a patch release. All the
version copies must agree for the packaging workflow.
BlackAngelTV merged commit b036fb352e into main 2026-12-03 10:17:02 +01:00
BlackAngelTV deleted branch fix/help-action-column 2026-12-03 10:17:04 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: FWS/FWS-Kitty#54