Skip to content

Put a thread's view in the question still open that the thread asks, for ring, digits and m - #6337

Merged
max-sixty merged 6 commits into
mainfrom
thread-option-number-keys
Nov 18, 2026
Merged

max-sixty merged 6 commits into
mainfrom
thread-option-number-keys

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

When a thread's latest agent message asks a question with options, 1–9 now answer it from anywhere in the thread's view, and that question wears the location ring. This covers the card t lands on, the card after Escape out of its reply box, and the floating panel's view of the thread. Before, t landed on such a thread and a digit did nothing: the thread's view stood only for the thread's target, and a thread about a plain passage has no question there. m lands on the question itself, so m then a digit already worked.

current-target.js owns where the user stands, and it gains two functions:

  • questionAsked is the question a thread's view asks the user: the first still open of the questions drawn in the agent's latest message there.
  • obligationIn is the obligation the user is in: that question, or else the obligation at the place the user stands for.

The location ring and the digits read obligationIn, and the On Me walk reads questionAsked for the stop the user is on, so all three agree. Places, c and letting go are unchanged.

Calls to weigh:

  • The thread's question comes before the one it is about. Take a thread on a page question whose agent reply asks a follow-up. The ring, the digits and the stop m steps past are now the follow-up's. Before, t then 1 answered the page question while the follow-up waited.
  • A thread asks only a question still open. A message asking several moves the user on to the next one as they answer. Once none is open, or once the agent says anything more, the view stands for the obligation the thread is about again, and that obligation's ring shows where the next digit goes. So a digit never revises an answer given in a thread, and Tab or a click reaches the question for that. In a thread about a page question, after the last answer the ring moves to the page question and the next digit answers it.
  • A thread's margin entry stands for its block, not the thread. Focusing the entry rings the page question, while the card rings the follow-up.

Max reported the bug from a Leaf page (t, then 1, in Firefox). An independent reviewer used and read each revision.

Tests: test_a_thread_takes_the_digits_of_the_questions_it_asks_in_turn fails without the change, and also fails if an answered question keeps the digits. test_an_obligation_in_a_reply_is_where_the_user_stands_once_answered is rewritten for the calls above. I probed t then a digit in Chromium and Firefox. pnpm run test:runtime, pnpm run check:browser, pre-commit and 94 focused ring, walk, thread and context-key browser tests pass.

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

A thread whose own message asks a question with options now answers it by
`1`–`9` while the user stands on the thread. Before, `t` landed on such a
thread and a digit did nothing: digits reached a widget only from inside the
question, from its margin entry, or from a thread about it. A thread about a
plain section, as an agent's question on a passage is, mapped to no question,
so its options showed no digits. `m` already landed on the question itself,
so `m` then a digit worked.

`obligationContext` (obligations/view.js) now falls back, where no obligation
stands at the user's place, to `threadQuestion`: the last widget obligation
drawn in the thread they are in, answered or not, read from the thread's own
`obligations`. The last rather than the first still open, so an answer
landing never moves the digits to another question and a second digit
changes the first one's answer; `m` still reaches an earlier open question.
It searches the whole drawing (`wholeThread`), so the floating panel's reply
row and head line take the digits too. A thread about a page question keeps
forwarding that question's digits, as before.

Behavior changed: from a thread about no obligation, including the panel's
view of it and after Escape out of its reply box, the digits answer the last
question drawn in the thread, and its options wear their digit badges.
leaf-agent
leaf-agent previously approved these changes Nov 18, 2026
… and m

The previous commit let digits reach a thread's own question through a
fallback in the digit routing alone. Probes showed it sat at the wrong level.
After `t`, the question the digits answered wore no location ring. A thread
about a page question whose agent reply asks a follow-up still sent the
digits to the page question: `t` then `1` picked the page question's first
option while the follow-up waited, the reported failure in another shape.
A first rewrite that put the view in the thread's last question showed two
more: once the agent had moved on, an old answered follow-up took the digits
from the open page question, and `m` from the card landed on the question
already ringed.

`current-target.js`, which owns where the user stands, now answers both.
`questionAsked` is the question a thread's view asks the user: of those
drawn in the agent's latest message there, the first still open, else the
last. `obligationIn` is the obligation the user is in: that question, else
the one at the place they stand for. The obligation view reads
`obligationIn` for the ring and the digits, and the On Me walk reads
`questionAsked` for the stop the user is on, so the three agree, and the
fallback is gone. Answering sends no message, so a second digit changes a
lone question's answer, and a message asking several moves the user on to
the next still open. Once the agent says more, the view goes back to the
obligation the thread is about. An answered obligation stays the current
location from chrome outside it that is in it, which covers On cards,
margin entries and thread views with one rule. Places, `c` and letting go
keep reading `placeOf`.

Behavior changed: from a thread whose agent's latest message asks a
question, the ring and digits go to that question rather than to the page
question the thread is about, and `m` steps past it.
`test_an_obligation_in_a_reply_is_where_the_user_stands_once_answered` now
asserts that, `m` included, and that a further agent message hands the
ring and digits back to the page question; the new thread test asserts the
ring.
When every question a thread's latest agent message asks had an answer,
its view fell back to the last question drawn. A user who had answered the
second question earlier, then answered the first by a digit, had their
next digit revise the second answer, given before. `questionAsked` now
falls back to the question answered last, by its answer's place in the
log, an answer the server hasn't read yet counting as the latest.

`test_a_digit_revises_only_the_answer_given_last_in_a_thread` covers it
and fails with the last question drawn as the fallback.
# Conflicts:
#	browser/runtime/queue-walk.js
Once every question in the agent's latest message had an answer, the
thread's view kept the ring and digits on one of them, chosen by a
fallback that needed fixing twice. The last question drawn let a digit
revise an answer the user gave earlier. The question answered last, by
its answer's place in the log, could not tell an answer the server had
not read yet from an agent's preselected default, since neither carries
an event: ranked latest, a digit changed the agent's default; ranked
earliest, a re-pick moved the ring off the question for about 40 ms.

`questionAsked` now returns only a question still open. Once none is,
the thread asks nothing and its view stands for the obligation it is
about again, as before this branch, whose ring shows where the next
digit goes. The fallback and its ranking are gone.

Behavior changed: a digit from a thread no longer revises an answer
given there; Tab or a click reaches the question for that. After the
last answer in a thread about a page question, the ring moves to the
page question and the next digit answers it.
`test_a_thread_takes_the_digits_of_the_questions_it_asks_in_turn` asks
two questions in one message and asserts the ring moves from the first
to the second and that a further digit revises neither; it fails on the
answered-last fallback. The reply test asserts the page question's ring
and digit once the reply's question is answered, as before this branch.
@max-sixty max-sixty changed the title Answer the question a thread asks by its digits from the thread Put a thread's view in the question still open that the thread asks, for ring, digits and m Nov 18, 2026
@max-sixty
max-sixty merged commit 6cd3580 into main Nov 18, 2026
5 checks passed
@max-sixty
max-sixty deleted the thread-option-number-keys branch November 18, 2026 07:28
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