Repository navigation
Colour a thread margin entry when its next word is the reader's - #785
Conversation
A reader scanning the rail had no way to tell which conversations wanted something from them. The agent's own state was already there in green, so the reader's side of the same question was the gap. The thread reading now carries `awaitsReader`, the server's one answer to whose turn a conversation is, and paints it in Margin and Page Map the way working paints green: blue glyph, blue interior, and "On you" in the label and the accessible name, so the colour is never the only channel. Agent workflow outranks it on the same carrier. An aggregated thread control takes the turn of any member. `--lf-agent-tint` becomes `--lf-entry-tint`, because two states now set the tint that hover must not erase. The colour is a first pass, not a settled scheme, and reading `awaitsReader` rather than "the agent spoke last" has a visible consequence: an agent comment that asks something, followed by an agent reply that asks nothing, reads as on nobody. TODO.md carries both questions. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
leaf-agent
left a comment
There was a problem hiding this comment.
The prose this PR adds to bg-thread-text — offered in place of the dedicated blue specimen — points a developer at a control the gallery does not render.
Rendering examples/developer/feature-gallery.html at 1440×1000, the only element carrying data-lf-turn="reader" is the marker on bg-crowded, and it is hidden: the suggestion's Accept is primary, so keepsHidden(row, … || Boolean(primary)) takes the marker down. Opening that cluster's ⋯ yields the four reaction marks and Show 4 more in Page Map — the Thread reading spills rather than materialising. The blue row is reachable only through Page Map, where it does paint (--turn-wash interior, --turn-ink glyph, "On you" under the label). bg-crowded also sits in the section headed Margin entries (<section id="bg-margin-controls">, "Combine roles."), not in Suggestions (bg-changes), so the sentence sends the reader to the wrong section and then to a control that is not there.
That matters because examples/CLAUDE.md asks a focused specimen to name "the real control or gesture" and tell the developer "what result to inspect", and this sentence is what the PR offers instead of one. The inline suggestion names Page Map as the gesture; seeding the state on a thread whose margin control is actually visible would be the stronger fix if the fixture can take it. Either way examples/corpus.html carries the same sentence, so scripts/corpus.py needs rerunning after the edit.
The prose added to `bg-thread-text` pointed at `bg-crowded`'s Thread reading, which the gallery does not render: the suggestion's Accept is primary, so the marker is hidden and the reading spills to Page Map. It also named the wrong section. Reviewed on the rendered page, `bg-crowded`'s marker reports `checkVisibility() === false`. The fixture now carries the state where a developer can see it. The gallery's existing agent reply on that thread asks the reader a question and sets `awaits`, so `bg-thread-text`'s own control is blue, visible, and in the Threads section. Editing one existing reply leaves the log's thread set, ids and order alone, which is what broke three `t`-walk tests when this was tried by seeding a new thread. The test now also answers both threads and holds the marker to losing the attribute and the word, since the specimen tells a developer to reply and watch the colour go. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
leaf-agent
left a comment
There was a problem hiding this comment.
The last commit falsifies the TODO item this PR adds. a3f78ec6 gives bg-thread-text's later reply awaits: true, and the item added in 4ffa38d7 cites that same specimen as an agent question a later plain turn hides — "is exactly that shape and wears no colour". Rendering the merged gallery at 1440×1000, that marker now carries data-lf-turn="reader" with the blue interior, the blue glyph, and Thread, On you, 9 of 21, … as its accessible name: it is this PR's showcase for the new colour, not an instance of the gap. Whoever picks the item up goes looking for a specimen that isn't there.
The design question itself survives — _thread_awaits_reader still reads only the latest spoken turn, so a structural Ask outlives a later plain turn where the comment-is-a-question rule does not. Only its evidence moved. The inline suggestion drops the citation; re-pointing it at a page that still stands the shape would be better if one exists, but I did not find one in the corpus.
The PR description carries the same sentence, and the repo squash-merges with PR_BODY, so it lands in main's commit message unless it is edited too.
`a3f78ec6` gave `bg-thread-text`'s later reply `awaits: true` to make it the gallery's blue specimen, which is the opposite of what the TODO item added in `4ffa38d7` cited it for: an agent question a later plain turn hides. Whoever picked the item up would have gone looking for a gap that page no longer shows. The behaviour is unchanged — `_thread_awaits_reader` still reads only the latest spoken turn — so the item now states the shape in terms of the log rather than pointing at a page, and says no corpus page stands it, since seeding one is the evidence the decision will need. `bg-resolved-text` is the near miss and is named as one: it is excluded for being resolved, not by this rule. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The item called `bg-resolved-text` a near miss "excluded for being resolved rather than by this rule". Both halves are wrong: its answering reply carries no `awaits` and no ask element, so the latest-turn branch returns False on it independently of the resolved branch, and what the rule hides there is an answer, which is the reading that should hold. It is still the thread to start from, so the item now says so and says what it needs — a later agent reply that answers nothing — rather than describing it as something the rule leaves alone. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
"Give it a later agent reply that answers nothing" does not produce the instance: `build_threads` clears `resolved` only on an explicit `unresolve`, so a reply appended after the `resolve` leaves the thread resolved and `_thread_awaits_reader` returns at that branch before the latest-turn rule. That is the third wrong claim in three passes over this one sentence, all of them operational detail about work nobody has started. The item keeps the decision, its stakes, and the fact that no corpus page stands the shape, and says only what `bg-resolved-text` is — answered and resolved, so not a shortcut — rather than a recipe for turning it into one. Whoever seeds the instance picks the route. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
A reader scanning the margin rail had no way to tell which conversations wanted something from them. The agent's side of that question was already there in green, so the reader's side was the gap.
A thread reading now carries
awaitsReader— the server's one answer to whose turn a conversation is, which the Threads panel's On you filter and the banner's Ask count already read — and paints it the way working paints green: blue glyph, blue interior, and "On you" in the label and the accessible name so colour is never the only channel. Agent workflow outranks it on the same carrier, because live work is what the reader needs first and one interior carries one wash. An aggregated thread control takes the turn of any member, as it already takes the most urgent member's workflow stage. Margin and Page Map paint the same attribute.Reading the existing projection rather than deriving "the agent spoke last" is deliberate: a second reading in the margin would let the rail say On you about a thread the panel's On you filter then hides. It is narrower in one shape: with no structural Ask the projection consults only the latest spoken turn, so a thread whose root is an agent comment and whose latest spoken turn is an agent reply carrying no
awaitsreads as on nobody, however plainly the root asked. A structural Ask deliberately survives a later plain turn; the comment-is-a-question rule does not. That asymmetry isevents.py's to settle and would move the banner and the panel with it, so it is a TODO item rather than a workaround here. No page in the corpus stands that shape, which the item says, because seeding one is the evidence the decision will need.The colour is a first pass, not a settled scheme.
--turn-tint/--turn-wash/--turn-inksit beside the--ok-*trio,--turn-inkis currently the accent, and TODO.md names what is still open: whether the reader's turn wants a hue of its own, whether a thread on nobody should say so, and the panel's On you chip, whoself-needshook class no stylesheet reads.--lf-agent-tintbecomes--lf-entry-tint, since two states now set the tint that hover must not erase.Where to look
skills/leaf/assets/runtime/margin-projection.jsreadsawaitsReaderonto the thread item and paints the marker and each reading option;margin-entries.jsownssyncMarginTurnand the module header's statement that the turn is projection state rather than a contributor axis;page-map-dialog.jspaints the map rows;chrome.cssholds both rules and the precedence;theme.cssholds the tokens and the comment saying they are provisional.Checks
Everyday suite green (1141). Nightly render suites for margin, conversations, gate, pages, navigation, startup, controls, widgets, reactions, product and export green, plus
test_site.py. The new test intest_render_margin.pybug-backs five ways: flip the icon token, flip the projection predicate, drop the agent-workflow precedence, drop the Page Map paint, or make the attribute sticky instead of clearing, and it goes red on the matching assertion.The gallery specimen is
bg-thread-textin the Threads section, whose own Thread control is blue and visible. Its existing agent reply now asks the reader a question and setsawaits, which leaves the log's thread set, ids and order untouched — seeding a new thread instead shifted the order and reddened threet-walk tests across a fixture twelve nightly files share.