Skip to content

fix: show the panel field's end press only while its key would make it - #6483

Merged
leaf-agent merged 2 commits into
mainfrom
field-end-keyless
Nov 19, 2026
Merged

leaf-agent merged 2 commits into
mainfrom
field-end-keyless

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

The panel field's end now shows a press only while one of its keys would make it. Where none would, as with the caret in a thread card's reply, where m types a letter, the end shows nothing, and the press returns with its key once the caret leaves. A touch device, which is shown no keys, still shows the press's word alone as the finger's route to it.

max-sixty asked for this: "The point of that section is to show shortcuts. if we don't have the active shortcut, then it shouldn't show anything." The rule lives in one place, the box's press at rest (composing/input.js), so it covers every press the end offers.

Caret in a card's reply Caret left the box
Before:
After:

What else leaves the end. Close while Escape would first take back a typed hint letter or close something over the mode; Open latest while the caret is in a box, where the leaf menu's row still opens the latest; a Reopen's Undo while the caret is in the reply it lands in; a Resolve's Undo until the log has the Resolve, when ⌘Z can't take it back yet either.

The row's seat is unchanged. As on main, it keeps the On Me mark while the field offers a stance's Close, so while that Close is hidden the row offers no pointer way out of the stance; Close returns once Escape would take the stance off again, as when the caret leaves the box. #6461, open, removes the stance's Close from the field's end and puts the mode's ✕ in the row, which ends that gap; it edits the same stance-Close lines, so whichever of the two lands second takes the other's edits there.

Tests: the changed assertions are listed in the commit message. 51 affected browser and journey cases pass on the branch merged with main, and the field's end was probed in Chromium and Firefox with the caret in and out of a card's reply.

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

The panel field's end shows one press with its key: Next On Me m, Open latest g V l, a stance's Close esc, a notice's Undo ⌘Z or Next thread t. Where the key would not make the press now, the end still drew the press with no key, as Next On Me did with the caret in a thread card's reply, where `m` types a letter. The user reversed that rule: the end is there to show shortcuts, so where no key of the press would make it now, it shows nothing. A touch device, which is shown no keys, keeps the press's word alone as the finger's route to it.

The box draws its press at rest only while it says a key (composing/input.js) and keeps rechecking the press each repaint frame, so the press returns with its key once the caret leaves the box. The rule covers every press the end offers. Comment… and Reply… already stood only with their key.

Behavior that changed, as the updated tests hold it:
- Next On Me leaves the end while the caret is in a card's reply and returns with `m` once the caret leaves (test_on_panel).
- The target picker's Close leaves the end while a typed hint letter stands, which Escape takes back first (test_render_semantic_selection), and Draw mode's Close while a card standing over the mode takes Escape (journeys/test_render_early_threads).
- A Reopen that puts the caret in the thread's reply offers no notice Undo there, as ⌘Z already didn't (test_resolving).
- A Resolve still on its way to the log offers its Undo once the log has it, since ⌘Z takes back no gesture before then (test_render_floating_panel).
- Open latest leaves the end while the caret is in a box; the leaf menu's row still opens the latest. Tests that opened it with the caret in a box run the press's action through the check API, which now exports `versionPicker`, rather than a page script clicking the press or a private import of a second runtime.

While a stance's Close is hidden, the row's seat keeps the On Me mark rather than switching to the stance's ✕, so the row doesn't swap controls as the caret moves or a hint letter is typed. keyboard/AGENTS.md now says a finger's Close is the route that leaves a stance whatever Escape would do first.
# Conflicts:
#	tests/browser/navigation/test_on_panel.py

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description leaves a design call open (Call to confirm: while a stance's Close is hidden, the seat keeps the On Me mark rather than showing the stance's ✕). Since a merge here would settle that call for the maintainer, this review comments rather than approves until it's confirmed.

That call also overlaps with #6461, which removes the stance's Close from the field's end altogether, deleting stanceClose, exits and the field's close fact. If #6461 lands, the call is moot. So are this PR's stance-Close edits: the Close sentence in keyboard/AGENTS.md, the field-readings.js header's "so Close leaves it", the stanceClose/fieldExit comments in floating-panel.js, the renamed picker test in test_render_semantic_selection.py, and the Draw-mode step in test_render_early_threads.py. Both PRs touch those same lines. Landing one first and rebasing the other onto it would avoid confirming a seat behavior the other PR removes.

The rest of the change (keyless presses leaving the end, the finger keeping the word, open_latest replacing the Control+Alt+r shim) reads correctly.

@max-sixty

max-sixty commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner Author

@leaf-agent The description no longer leaves a call open: the row's seat keeps main's behavior, and the overlap with #6461 is noted there. The maintainer asked for this PR to merge. Please review the head again.

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

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description now settles the open call: the row's seat keeps main's behavior, and the overlap with #6461 is noted.

The test job's one failure is inherited. test_an_early_anchored_send_merges_history_and_keeps_its_seen_revision[True] fails at teardown because the margin marker moves 39px without input. leaf-dev suite flake reproduces that same message on main (1 of 18 copies) as well as on this head (2 of 18), so the race predates this PR's Escape step. It's tracked in #6494.

@leaf-agent
leaf-agent merged commit db7a60b into main Nov 19, 2026
5 of 6 checks passed
@leaf-agent
leaf-agent deleted the field-end-keyless branch November 19, 2026 06:52
max-sixty added a commit that referenced this pull request Nov 21, 2026
The panel's thread field said "Reply…" at the row's end even where `c` wrote
elsewhere, leaving the word without its key. The page's field couples its
Comment… to `c` through the field's end (composing/input.js, `enters`), the
rule #6483 set for every press there, but the thread's "turn" reading drew
Reply… as the field's own words, which the hint lead pushed to the far end,
outside that coupling. The reading now says no words and offers Reply… as its
end's word, so the word goes with its key.

Max saw it on #6675's handoff page: `t` from a thread open in the panel to a
kept comment left the thread's view open, reading "1 of 2 threads and drafts ·
Reply…" with `c` writing in the comment's box. It also happens on main: an `m`
walk from a thread open in the panel to a stop the view leaves in sight read
"1 of 9 waiting on me · Reply…". Both now read the position alone, and the
field at rest is pixel-identical.

On a touchscreen, which is shown no keys, the thread's field no longer says
Reply…, as the page's field says no Comment… there.

The guide and the glossary no longer say the line's Reply or selected words
read in full ink; every word the line says is dim, as a probe of the computed
colours shows.
max-sixty added a commit that referenced this pull request Nov 21, 2026
`t` and Shift+t now reach every draft Threads lists, not only open
threads: each comment the user began and put away, in page order at its
passage or element, and each resolved thread holding an unsent reply or
rewrite. Before, a page holding only a kept comment answered `t` with
"No open threads" while the leaf's dot counted the draft. Max asked for
this.

| | Before | After |
|---|---|---|
| Page | <img width="420" alt="Nothing beside the paragraph"
src="https://gist.githubusercontent.com/max-sixty/29afa0ef5470ee089c7be832fdc85e31/raw/bc39d81e87a6e5be71493df10d8ca2830f0a9958/before-subject.png">
| <img width="420" alt="The comment's box beside the paragraph, holding
its words, with the focus ring"
src="https://gist.githubusercontent.com/max-sixty/29afa0ef5470ee089c7be832fdc85e31/raw/bc39d81e87a6e5be71493df10d8ca2830f0a9958/after-subject.png">
|
| Panel | <img width="420" alt="No open threads"
src="https://gist.githubusercontent.com/max-sixty/29afa0ef5470ee089c7be832fdc85e31/raw/bc39d81e87a6e5be71493df10d8ca2830f0a9958/before-panel.png">
| <img width="420" alt="Draft 1 of 1"
src="https://gist.githubusercontent.com/max-sixty/29afa0ef5470ee089c7be832fdc85e31/raw/bc39d81e87a6e5be71493df10d8ca2830f0a9958/after-panel.png">
|

A comment's stop opens the draft's own box through its writing route, as
Resume writing does, and lends focus to the box's frame rather than its
editor (`showDraft`, `arriveEditor`'s `onFrame`), so the next `t` walks
on and puts the box away, and `c` puts the caret after the words.
Landing in the editor was rejected for the reason Send lands on the
thread rather than its box: the next walk key would type into the
comment. The user is on a stop while focus is on that draft's frame
(`standsOnDraft`), so the draft's own context identifies the stop. An
earlier version stood the user at the comment's subject instead; review
reproduced four ways that lost the draft (an editor subject took `t` as
a letter, re-keyed passages, a thread on the same element, two parts of
one diagram), all fixed by the box landing.

Walking from a thread open in the panel to a kept comment leaves the
thread's view open while `c` writes in the comment's box, and the
panel's row read "1 of 2 threads and drafts · Reply…" without `c`. That
came from an older gap, also on main after an `m` walk from a panel
thread ("1 of 9 waiting on me · Reply…"): the thread field drew Reply…
as its own words, outside the field's end, which shows a press only with
its key (#6483). Reply… is now the end's word, as the page field's
Comment… is, so it goes with `c`. On a touchscreen, which is shown no
keys, the thread's field no longer says Reply…, as the page's says no
Comment….

Left for review: nothing on screen says `c` enters the box at a draft
stop, since the field shows its key only while empty (a thread's reply
box holding a draft has the same gap); Enter on the box does nothing,
unlike a thread card's.

Tests: new browser tests for the walk over a comment, a thread and a
comment beside it, and for a resolved thread holding a reply; two tests
that passed kept drafts with `t` now open their thread by its marker.

> _This was written by Claude Code on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Nov 22, 2026
…ar words

The user decided that a press's word alone at the panel field's end, as a
touchscreen showed Show annotations, Show changes, Open latest, Next On Me or
Next thread, reads as status rather than a button, and that the panel's menu and
lists are a finger's route to each. So the end shows a press only with keys that
would make it now, and a touchscreen is shown none (control-keys.js,
`commandKeysNow`). This reverses #6483's word-alone press for a finger. A notice
about where the user stands, such as "Annotations hidden", leaves the page field
to its standing words wherever its press doesn't show, a touchscreen included.

The user also asked that Leaf leave to the browser what it can of speaking keys.
The live region hears a notice's words alone again, as before this branch, and
a screen reader meets the press as the button it is, its key inside. Gone:
`spokenKeysNow`, `spokenNotice` and `pressWords`, whose one remaining use the
box now spells itself.

Tests: the news and annotations tests expect the live region to hear the words
alone; the touchscreen news test now sees no press and reaches Show changes from
the menu; a new test hides the annotations on a phone and sees the standing
words with no press.
max-sixty added a commit that referenced this pull request Nov 22, 2026
Four panel notices wrote their keys into their words: "2 changes since
v1 — v shows them", "Annotations hidden — o shows them", "Edit
discarded; g D restores it" and "Draft kept — g i resumes writing".
Nothing checked those keys, so a phone showed `v`, and the discard
notice named `g` while the caret sat in the reply box, where `g` types a
letter. Now a notice names an action only through `press`, which the
panel field's end shows with the keys that would make it now
(`keyboard/control-keys.js`, `commandKeysNow`).

This PR also takes the best of #6685, which converted the same four
notices; Max asked for the merge and for the rules on how long words
stay to be easy to change. What a reviewer should weigh:

- **How long a notice stands is one rule** (`notifications.js`,
`showNotice`), from #6685: every notice stands 4 s; one answering the
user's own gesture with a press, or an undo's, then stays until the next
input, and inputs within the 4 s don't end it; news passes with its
press. Callers no longer pass `holds` for Next thread or Resume writing.
So "Annotations hidden" now stays until the next input after its 4 s,
and the Escape that leaves the reply box after a discard shows Restore
edit.
- **A touchscreen is shown no press at the field's end**, reversing
#6483's word-alone press for a finger: Max judged a word alone there
reads as status, and the panel's menu and lists reach each press's
result.
- **The live region hears a notice's words alone**, as on main; a screen
reader meets the press as a button with its key chip inside.
- **The pointer hold is main's**, for the page's own press only.
- **An error may carry the press that recovers from it** (`errors.js`,
`press`), from #6685: a refused send whose words went out of view offers
Resume writing at the field's end and beside Dismiss in the Errors list.
A field reading whose words come with a press names it
(`field-readings.js`, `press`), so notices and errors share one path to
the end.
- **`architecture/spelled-keys`** (`eslint.config.mjs`), from #6685,
refuses a string that spells a key after a dash or semicolon, the form
the four notices used, including in what a screen reader hears from
`announce`; #6702 has those announcements read their keys from the
register. It reads that form, not every way of writing a key.
- Left out from #6685: the spoken shortcut after a notice's words.

Max asked for this in a Claude Code session; a separate Claude Code
reviewer read the earlier rounds. Tests: `test:runtime`, `check:browser`
and the affected browser tests pass; the new retention tests fail with
the rule reverted.

> _This was written by Claude Code on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Nov 23, 2026
…the panel (#6796)

A thread about a passage can now be read beside the passage, as before
and by default, or in the floating panel, and a card's Open in panel and
the panel's Show on page switch between them. Until now each route
picked a reader by the thread's kind, so a thread moved into the panel
came back as a card on the next `t`. One setting, kept for the tab, now
decides every route to a passage's thread: `t`, a press on the passage,
Threads, On Me, a `?thread=` link, Resolve's move to the next thread and
Undo. The panel's `reveal` takes the thread or declines it by the
setting, and the margin draws no card under the panel setting
(`thread/threads-in-panel.js`).

- Each switch raises a notice, "Threads open in the panel" or "Threads
open beside their passages", whose `p` switches back and moves that
thread back.
- Under the panel setting, a route scrolls the passage into view above
the panel, only as far as needed. `landing-scroll.js` judges what the
panel covers by where its opening animation ends, and history adds a
Back step only where the page moves.
- Placements Leaf forces, such as a thread about the whole page, a
resolved thread, a passage the page doesn't draw or a window too narrow
for cards, put the thread in the panel without changing the setting.
- Undo no longer records which reader a thread was settled in
(`settled.reader`), since it reopens the thread by the route.

To weigh: a switch lands on the thread so its notice shows, unless the
user was writing in the reply, where the caret stays. On a touchscreen
the notice shows no press, following the rule from #6483 and #6687; a
finger switches back with the thread's own button. The Back/Forward pull
request, #6799, also changes `anchor-travel.js` and `floating-panel.js`,
so whichever lands second will conflict there.

Max asked for this. A blind UX review shaped it: the page still scrolls
under the panel setting, the notice offers the way back, forced
placements leave the setting alone, and one setting decides every route.
A fresh agent used it in Chromium and Firefox, and Codex reviewed it
twice; their findings are fixed. Tests:
`tests/browser/threads/test_threads_in_panel.py` is new, tests that
opened a passage's thread in the panel from Threads now choose the panel
first, and `test:runtime` and `pnpm run check` pass.

> _This was written by Claude Code on behalf of max-sixty_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants