Skip to content

Walk to unsent comments with t - #6675

Merged
max-sixty merged 8 commits into
mainfrom
t-walks-to-drafts
Nov 21, 2026
Merged

max-sixty merged 8 commits into
mainfrom
t-walks-to-drafts

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

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 Nothing beside the paragraph The comment's box beside the paragraph, holding its words, with the focus ring
Panel No open threads Draft 1 of 1

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

leaf-agent
leaf-agent previously approved these changes 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
max-sixty merged commit c9d5e98 into main Nov 21, 2026
6 checks passed
@max-sixty
max-sixty deleted the t-walks-to-drafts branch November 21, 2026 21:24
max-sixty added a commit that referenced this pull request Nov 22, 2026
At a `t` stop on a kept comment, the walk leaves focus on the comment's
box rather than in its words (#6675), so the next `t` walks on. There
`c` put the caret after the words and Enter did nothing, the one place
you stand on a box that Enter didn't enter. The box's frame now has its
own Enter row in `composing/input.js`: while focus is on the box but not
in its words, Enter puts the caret after them, as `c` does. The row is
declared on every box `wireInput` builds, but only a draft stop leaves
focus on a frame today.

Max picked this over one page-wide Enter row that would write wherever
`c` would when the box belongs to what you stand on (replacing
`thread.primary`'s reply half and `option.reply`). That rule saved no
lines, made Enter live on any focused element without an Enter of its
own, and tied Enter to each of `c`'s six destinations. Every Enter row
in Leaf stays tied to the element focus is on, or to the mode it
confirms.

Tests: the walk's draft-stop test now ends with `c` and with Enter and
checks the caret stands after the words; with the row disabled the Enter
case fails. The runtime tests pass.

> _This was written by Claude Code on behalf of max-sixty_
leaf-agent added a commit that referenced this pull request Nov 22, 2026
…rgets journey (#6746)

#6675 made the thread walk stop at each comment the user began and put
away, as Threads lists them. This journey keeps a comment at Paragraph 3
and then pressed `t` to travel to the open thread at Paragraph 41, so
`t` now lands on the kept comment's box ("1 of 2 threads and drafts")
and the thread is never focused; in the early-Resume case no trip to the
thread starts, so `earlyResumeBoxes` is never written and the wait times
out.

The test now presses Shift+t at both points. From the kept comment, the
walk's first stop, walking back wraps straight to the thread in one
trip, so the journey still covers what it protects: Resume interrupting
a trip to the thread (before its first frame, and mid-scroll on a slowed
CPU) returns the same editor with its words and caret, and Comment at
the thread opens the thread's own reply while the earlier words stay
with Paragraph 3. Pressing `t` twice instead would put a stop at the
comment itself before the trip, which changes the scenario under test.
No product code changes, so #6675's behavior stands as its author
intended.

All three cases fail on `d53e9994f` and pass with this change (`uv run
pytest
"tests/journeys/drafts/test_comment_targets.py::test_comment_follows_a_thread_current_location_instead_of_an_earlier_draft"`).

Closes #6740 — automated triage

Co-authored-by: leaf-agent <[email protected]>
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