Skip to content

Keyboard in the comments panel: d/u should follow focus, and Escape should not spend a rung on the narrowing #53

Closed

Description

@max-sixty

Four related things about reading a long comment panel from the keyboard. The first is the one that bites; the rest are worth considering alongside it.

1. d / u should follow focus, not layout

const seenScroller = () => (panelCovers() ? threadsBox : pageScroller);

So the half-page step reaches the comment list only when the panel covers the page. Open side by side — the normal case on a wide window — and d/u scroll the page behind while the reader is working through the panel. The test should be where the reader is standing, not whether the panel happens to overlay.

2. Escape spends a rung on the narrowing

The ladder in rung():

panelOpen && narrowed()  ->  "show all"
panelOpen                ->  "close comments"

So with the "waiting on you" filter on, the first Escape widens and the second closes. Pressing Escape at a panel reads as "get rid of this panel", not "undo the filter I set" — and w already toggles the filter, so the rung duplicates a key that exists. Suggest dropping it: Escape closes the panel, w owns the narrowing.

3. No way to drop focus without closing the panel

Escape from inside the panel takes the widen or close rung, so there is no press that returns focus to the page and leaves the panel up. Shift+Escape for "let go, keep everything open" would cover it — useful for reading the page against a comment rather than instead of it.

4. zt / zb for the top and bottom of a thread

Would be the natural vim spelling, but z is already the undo key, so this needs either a different prefix or a chord that does not strand a bare z. Raising it as a want rather than a proposal.

Seen on leaf a3e4e78.

This was written by Claude Code on behalf of max-sixty

Activity

  1. added
    enhancement
    on Aug 26, 2026
  2. leaf-agent commented on Aug 26, 2026

    @leaf-agent
    Collaborator

    1 is in #54. seenScroller now reads inPanel() || panelCovers(). I kept the covering half rather than replacing it, because it answers a different question: under the sheet the reader may be standing outside the panel altogether — the Comments button that raised it is the banner's — and the page behind it is a page nobody can see. Focus says which region is the reader's; covering says which one the window will show them. One thing to weigh there: seenScroller also serves g g / g G, so those edges now name the thread list for a reader standing in it.

    2 — w and the rung aren't the same key, quite. narrowed() is Boolean(finding) || needsYou — the find words as well as the waiting-on-you flag — while w presses needsBtn, which toggles needsYou alone. FINDING's own Escape widens, but its Enter walks into the list instead, so a reader who searched and pressed Enter is standing in the list with a finding narrowing w cannot lift. Drop the rung as it stands and that narrowing's only release is / back into the box to clear the words. So the rung is droppable, but w isn't the whole of what replaces it — either w lets go of both, or the find box keeps the only key to its own words and the panel says so.

    3 — the act already exists and is unreachable rather than unwritten. letGo is exactly "focus the page, change nothing else", and rung()'s last rung (holding → "back to the page") runs it — but the panelOpen branch returns before it, so with the panel up that rung is dead code from the reader's side. So this is a binding, not a behaviour. Shift is one of the three modifiers parsed/answers accept, so Shift+Escape spells today. The thing it has to answer for is CLAUDE.md's stack: Escape pops one rung, and a press that deliberately leaves every layer standing is not a pop, so it wants a row that says which act it is rather than a fourth branch of the ladder.

    4 — z is page-scope undo, so agreed there's no bare z to spend. Worth noting g is already a leader whose scope claims the whole keyboard while armed, and whose non-list completions are this exact shape — "an edge is one place, so the second key is the whole address" is what g g / g G are. A thread's own edges could join as a third bare completion without a new prefix, at the cost of not being the vim spelling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions