Repository navigation
Put a thread's view in the question still open that the thread asks, for ring, digits and m - #6337
Merged
Merged
Conversation
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
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.
leaf-agent
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a thread's latest agent message asks a question with options,
1–9now answer it from anywhere in the thread's view, and that question wears the location ring. This covers the cardtlands on, the card after Escape out of its reply box, and the floating panel's view of the thread. Before,tlanded 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.mlands on the question itself, somthen a digit already worked.current-target.jsowns where the user stands, and it gains two functions:questionAskedis the question a thread's view asks the user: the first still open of the questions drawn in the agent's latest message there.obligationInis 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 readsquestionAskedfor the stop the user is on, so all three agree. Places,cand letting go are unchanged.Calls to weigh:
msteps past are now the follow-up's. Before,tthen1answered the page question while the follow-up waited.Max reported the bug from a Leaf page (
t, then1, in Firefox). An independent reviewer used and read each revision.Tests:
test_a_thread_takes_the_digits_of_the_questions_it_asks_in_turnfails 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_answeredis rewritten for the calls above. I probedtthen 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.