diff --git a/CLAUDE.md b/CLAUDE.md index 8f7fd12..0a1d04d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -193,6 +193,15 @@ as a grouped list does. Filling a page in is editing its `.md`; no Python follow both platforms. - Key notation: `↑↓ move` (include the verb), `^R`/`^End` for Ctrl chords, `⌫` for backspace, `⇧` for shift. +- An **arrow atom** leads the hint and names only the arrows: what they do (`↑↓ move`, + `←→ choose`, `↑↓ newer/older`) or what they move (`←→ slot`). Several keys share one + atom only when they do the same thing — `↑↓ PgUp/PgDn scroll`, `Home/End ends`; a key + that does something *else* gets its own, which is what `←→/Y/N choose` and `↑↓ Tab + complete` had wrong (Y/N answers, Tab completes, neither is what those arrows do). The + subject must be the right one, too: *cursor* is the row `❯` points at, so the composer's + ←→ moves its `slot`. Every button dialog carries the same hint, + `←→ choose · Enter select · Esc cancel` — a yes/no prompt is a button row like any + other, so its y/n accelerators ride its `Yes`/`No` labels rather than the line. ### Dialogs diff --git a/meshterm/ui/path_composer.py b/meshterm/ui/path_composer.py index 2ee44cb..ea0750c 100644 --- a/meshterm/ui/path_composer.py +++ b/meshterm/ui/path_composer.py @@ -142,7 +142,11 @@ class PathComposerScreen(Screen): #: The composing keys, in the hint grammar's navigation-then-actions-then-Esc order. #: Esc's verb is the only part that moves — see :attr:`footer_hint`. - _HINT = "↑↓ move · ←→ cursor · Enter add · type to filter · ⌫ remove · Esc cancel" + #: ``←→ slot``, not ``←→ cursor``: this app's *cursor* is the row the ❯ points at, + #: which is what ↑↓ moves here — the arrows move the **insertion slot** along the path + #: being built, the app's own word for it (and the one thing besides the row cursor + #: that wears the selection white). + _HINT = "↑↓ move · ←→ slot · Enter add · type to filter · ⌫ remove · Esc cancel" @property def footer_hint(self) -> str: # type: ignore[override] diff --git a/meshterm/ui/tui/prompt.py b/meshterm/ui/tui/prompt.py index 6debc06..f69b003 100644 --- a/meshterm/ui/tui/prompt.py +++ b/meshterm/ui/tui/prompt.py @@ -432,7 +432,11 @@ class ConfirmScreen(_KeylessDialog): title: str, *, default: bool = True, - footer_hint: str = "←→/Y/N choose · Enter select · Esc cancel", + # The ButtonDialog hint verbatim: a yes/no prompt is a button row like any other, + # and the row is what differs, not the keys. The y/n accelerators stay unwritten — + # the Yes/No labels are their own hint, and naming them cost the Esc verb its + # cells inside a PicoCalc-width box. + footer_hint: str = "←→ choose · Enter select · Esc cancel", ) -> None: """Build a confirm prompt. @@ -757,7 +761,7 @@ class AutocompleteScreen(_KeylessDialog): prompt: str = "", default: str = "", validate: Optional[Validator] = None, - footer_hint: str = "type · ↑↓ Tab complete · Enter accept · Esc cancel", + footer_hint: str = "↑↓ move · Tab complete · Enter accept · Esc cancel", ) -> None: """Build an autocomplete prompt.