Skip to content

Show each part's question state in a page of parts' list, and mark a waiting row with On Me's tray - #6152

Merged
max-sixty merged 7 commits into
mainfrom
agent-a54f3baedeb87f066
Nov 18, 2026
Merged

max-sixty merged 7 commits into
mainfrom
agent-a54f3baedeb87f066

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

A page of parts lists its parts down the window's left edge, each row with its part's summary. A side list of tabs also shows, under each summary, the state of the questions its panel holds: an open mark while one waits on the user, "On " while it is the agent's, and a check with the answer's words once answered. The parts list showed none of that, so a page of parts with a question per part read the same untouched, answered, sent back and reopened. This draws the side list's state for parts too. On a phone, where the list is a one-line row of names, it is hidden as the summary already is.

It also changes how both lists mark a question waiting on the user. That mark was a lone open circle under the summary, which Max read as an empty list bullet. A waiting row now ends its name's line with On Me's tray, the panel's symbol for what waits on the user, and the line under the summary holds only the answer or whose turn it is. The tray keeps its room in every state, as the line does, so answering moves no row and a long name wraps the same either way. An accent dot (Leaf's mark for an unread reply) and a mark before the name were tried and dropped.

The gap was not a decision. Side lists got the line in #2633, before parts existed; #3198 added parts and moved the summary's condition from side to down, leaving the state line on side with no reason given.

To weigh:

  • A page of parts is the page's navigation, and a side list is the documented shape for one decision per item. This puts a second display of what On Me already counts on a surface whose job is to say what each part is. For a part holding many questions the tray stays until the last is answered.
  • Leaf's symbols otherwise mark controls; the tray here marks state, in the summary's grey, and the row is pressed as before.
  • Cost on a large page: Count every tab panel's and deck card's obligations in one pass #6151, now on main and merged into this branch, files a reading's obligations under their regions in one pass (obligationsByRegion), and the parts list takes that pass. Measured before it landed, with the two combined locally: a part switch on 400 parts with a question each takes 5.7 ms in Chromium, against 3.7 ms with no state line and 36.7 ms on the per-row path this change would otherwise have joined; from 100 to 400 rows the time grows 1.8 times.

It came out of comparing the visual-review widget with a page of parts for the same six cases, where this gap was most of the widget's lead. Max didn't ask for it; he read the before/after captures, asked for the lone circles to go, and accepted the tray.

Checked with main merged in, with a new browser test covering an untouched part, one answered through its widget, one the user commented on, one reopened by undo, a part that asks nothing, and the phone row; each piece of the change has an assertion that fails without it. The existing parts and side-list tests, the browser type check and pre-commit pass. Before and after captures at three widths in light and dark differ only inside the list column; the desktop pair is in a comment below.

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

… queue's rows do

A page of parts listed each part's name and summary but not the state of the
obligations it holds, so a page with one question per part read the same in its list
untouched, answered, sent back and reopened. Each row down the column now draws the
side list's obligation line under its summary: an open mark while one waits on the
user, "On <agent>" while one is the agent's, and a check with the answer's own words
once every one is answered. A row whose part asks something keeps that line either
way, so an answer moves no row, and a part that asks nothing reserves none. The tab's
accessible description says the same, as a queue row's does.

The phone's row of parts sticking over the open part shows names alone: it already
hid the summary to stay one line high, and now hides the state line with it. Parts
placed anywhere else still list their names in a row.

Side lists drew the line before parts existed (#2633). When #3198 gave parts the side
list's row, it widened the summary from `side` to the list running down (`#down`) and
left the state line on `side`; neither that commit, its pull request nor the module
header records a reason. The `lf-tabs.js` header now says a part's row is drawn as a
side list's is.

Parts take the side list's path, one `obligationsIn` per row that authors an
obligation, and so its cost, which grows with rows times obligations: a switch on a
generated page of 400 parts, one question each, took 37 ms of main thread in Chromium
against 4 ms before, and a 400-item queue already takes 40 ms.

Tests: adds `test_each_part_s_row_says_where_its_question_stands`. No existing test
changed.

> _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 cost bullet postpones a fix that AGENTS.md doesn't let this change postpone. Each row calls obligationsIn(panel), which filters the page's whole obligation list. So drawing the list walks every obligation once per part, which is the "one collection for each member of another" case that Responsiveness rules out. Your own numbers show it growing that way: the time per part switch rose 10× at 400 parts (3.7 → 37 ms). Before this change, only a side list paid that cost. With it, every page of parts does too, and that is the main navigation on large pages.

The reason given for deferring is that the fix "adds a widget API export". By AGENTS.md, that isn't a cost to avoid. Fix the underlying issue says to extend the canonical API when its own job is incomplete. Pages across Leaf updates says changing widget-api.js during alpha needs no protocol bump. A one-pass form, for example one that files obligations under a set of regions by walking each obligation's source up to the nearest region, fixes tabs, parts and the deck together, as the description says. Building it here makes the fix cheaper than this change, not harder. If it lands later, a second surface depends on the quadratic path in the meantime.

@max-sixty

max-sixty commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner Author

Agreed on the finding. Correction to what I first wrote here: nothing is being built for it on this branch, because #6151 already builds exactly this (obligationsByRegion in obligations/place.js, with obligationsIn as its one-region form, used by lf-tabs' render()). A second copy here would collide with it line for line.

This change goes through the same #tab call #6151 rewrites, so once #6151 lands, the parts list takes its one pass with no further change. So #6152 should land after #6151, and I'll add the growth measurement for parts and the side list on the two combined to the description.

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

@leaf-agent

Copy link
Copy Markdown
Collaborator

Confirmed. #6151's lf-tabs.js renders each panel's rows from one obligationsByRegion(this.#panels) pass. This PR's parts list reads its rows through that same path, so it gets the single pass with no change of its own. My review's concern is settled by landing #6151 first, and I have nothing else outstanding here.

# Conflicts:
#	packages/default/widgets/lf-tabs.js
# Conflicts:
#	packages/default/widgets/lf-tabs.js
…roup labelled with the question, and no choose attribute

The test's markup used lf-ask and lf-options' choose, which main dropped, so page check refused the fixture. It protects the same behavior.
@max-sixty

max-sixty commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner Author

Before and after, main beside this branch (881a874037), on a page of five parts at 1280×800. Cutover's question is answered, Backfill's and Owners' wait on the user, Rollback's question carries a comment the agent hasn't answered, and Overview asks nothing.

main, Chromium light this branch, Chromium light this branch, Firefox dark
main: each part's name and summary, no state this branch: a check and Saturday 02:00 under Cutover, On Me's tray at the end of the Backfill and Owners rows, an open circle and On Agent under Rollback this branch in Firefox, dark: the same rows

A row waiting on the user ends its name's line with On Me's tray. An earlier version of this branch drew a lone open circle under the summary there, as side lists on main do, and it read as an empty list bullet; the branch now draws side lists the same way. The capture's page has no session holding it, so the agent's name reads "Agent"; on a page a session holds it reads "On Claude". On a phone the row of names is the same on both.

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

A side list's or page of parts' row whose panel waits on the user drew a bare open circle on its answer line, which read as an empty list bullet. That row now ends its name's line with On Me's symbol, the panel's mark for what waits on the user, and leaves the answer line empty; the line shows only the answer or whose turn it is. The symbol keeps its room in every state, as the line does, so a long name wraps the same whatever its answer. Leaf's dot already means an unread reply, and a mark before the name read as a bullet too. The side-list and parts tests assert the symbol where they asserted the open mark.
@max-sixty max-sixty changed the title Show each part's question state in a page of parts' list, as a side list does Show each part's question state in a page of parts' list, and mark a waiting row with On Me's tray Nov 18, 2026
@max-sixty
max-sixty marked this pull request as ready for review November 18, 2026 17:59
leaf-agent
leaf-agent previously approved these changes Nov 18, 2026

@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 feature gallery's queue steps (examples/developer/feature-gallery.html, #bg-side-list-steps) still say the first obligation's row "carries an open mark" and that undo "restores the open mark and tally". With this change, a row waiting on the user ends its name's line with On Me's tray instead, so those two sentences on the published page now describe a mark readers won't see. Worth updating them in this PR.

…steps and the side-list journey's docstring

A row waiting on the user now ends its name's line with On Me's symbol, so the gallery's steps and the journey's description of the row named a mark readers no longer see. Leaf's reviewer flagged the gallery's steps on #6152.
@max-sixty
max-sixty merged commit bc828a2 into main Nov 18, 2026
5 checks passed
@max-sixty
max-sixty deleted the agent-a54f3baedeb87f066 branch November 18, 2026 18:43
max-sixty added a commit that referenced this pull request Nov 18, 2026
…ws' styles on the mark (#6406)

`lf-tabs.js` decides once whether a tab set's list runs down beside its
panels: a side list, or a page's parts in a `main` with no Layout.
`tabs.css` repeated that decision as `:is(lf-tabs[list="side"],
lf-parts)[data-lf-views]` in the eight rules that draw a row's name,
summary, state line and On Me's symbol. The module now sets
`data-lf-down` on the set and those rules key on it, so the theme draws
rows exactly where the module does, and a third kind of downward list
needs no CSS edit.

The side list's own layout rules (its column, stacking and groups) stay
on `lf-tabs[list="side"]`, and the rules that reserve a row's height
before upgrade stay on the authored tags, since the mark arrives with
the upgrade. Parts placed anywhere but a page's root matched the old
selector too and took the column row's grid; they now draw as a boxed
set's row of tabs does, their names 1px lower and ringed at the name.

Max chose this on the review page for #6152, which it follows.

On a root page of parts and on a side list, at desktop and phone widths,
every element of the list has the same computed style and box as on the
parent commit. The side-list and parts browser tests and the side list's
focus and ring tests pass; two of them fail with the module's mark
removed.

> _This was written by Claude Code on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Nov 21, 2026
main now shows each part's question state in a page of parts' list (#6152), so
the comparison-only change this branch carried for that is dropped for main's
stylesheet and tab set. The widget keeps this branch's row state on main's row
index (#6369).
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