Skip to content

Give every On group a sticky band, and fold Done under its own - #5318

Merged
max-sixty merged 17 commits into
mainfrom
on-me-paved-road
Nov 4, 2026
Merged

max-sixty merged 17 commits into
mainfrom
on-me-paved-road

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

On me's groups were hard to tell apart: a heading was a line of muted words over its first card, only groups of two or more had one, and a lone card said its group's name over its place. Rules between items tied the first item to its heading and not the rest, and boxing each group was too noisy. This gives every group in On me and On Claude a band that names it, as a thread's author line names a message.

  • Bands. Each group opens with a band: its name and count across the panel, a thread head's height (28px), on a ground a shade off the panel's. The band sticks at the view's top while its group scrolls, and the next group's band pushes it off. Every group has one, a group of one included.
  • Done folds under its band in both lists, as Threads' Resolved does, a line each once unfolded. Its band is an arrow row, so the keyboard reaches what it folds.
  • Layout. A sticky box moves only inside its parent, so each group is a box of its own. Each group and the lines in it take the list's columns (subgrid), so line titles start on one edge across groups. Landings and focus stand below the stuck band (--lf-top).
  • Records. The headers' record that only a group of two or more had a heading (22 October) is rewritten: the user chose the bands on 3 November, and the record names the rejected designs (rules, spacing, bordered and tinted boxes, folding every group).
  • Tests. Tests that read finished items now unfold Done first (show_done, beside show_resolved), and the grouping tests expect a band on every group.

An item that moves to another group, as one the agent starts or finishes does, is drawn afresh in its new group's box; the panel's paint already carries focus to the item with the same key (holdFocus). The view now restarts the sticky slot as any scroller does, so a landing or focus clears the stuck band once, and the band reads slot 0, so focusing Done's band doesn't creep the list.

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

max-sixty and others added 16 commits October 31, 2026 18:02
… not for landing)

Five candidate designs for On me, each chosen by a data-playground-* attribute a
playground sample's root carries, today's design without one: options drawn from
their own parts (title, tags, picture, line), a thread message's widget drawn with
its message, long messages clamped or reduced to their title, the page folded to
its own questions while On me stands open, and On me opening beside the page on a
wide window. Without the attributes the panel reads exactly as on main (text and
card heights compared with --base on the fixture).

The exploration page and its log are in .tmp/ (on-me-paved-road.html,
iterate-on-me-panel.md). Whatever is picked gets rebuilt properly; every
PROTOTYPE block here goes.

Co-Authored-By: Claude Code <[email protected]>
# Conflicts:
#	dist/kernel/kernel.json
…, not for landing)

lf-options gets a static card() beside answerWords: it reads the group's
authored options (title, tags, picture, line) and sends the group's own
choose through its controller. On me asks the widget's class for it by tag
with widgetElement(id), so a choice frozen in a closed thread's message is
answerable from On me and the panel names no widget. Design A, On me reading
the options off the page, and its message-borne variant are deleted; the
obligation view no longer lends its control. answerWords reads
widgetElement, so a closed thread's answered choice names its option.

Exploration record: .tmp/iterate-on-me-panel.md, iteration 10.
# Conflicts:
#	browser/runtime/floating-panel.js
#	browser/runtime/obligations/answer.js
#	dist/kernel/kernel.json
#	dist/kernel/leaf.js
#	dist/kernel/runtime/bundle-data.js
#	dist/kernel/runtime/bundle-page-layout.js
Four more switches for the On me exploration page, each read off the
playground's data-playground-* attributes as the others are:

- done: what left a list folds under Done, as Threads folds Resolved,
  a line each once unfolded (On me and On <agent> both)
- items: space, a faint rule, or a box between one card and the next
- heads: a group starts at room and a darker rule, its heading in the
  ink, a lone card (data-lone) starting the same way
- lone: a lone card names its group in the small muted face

Today's look is unchanged without the attributes.
# Conflicts:
#	dist/kernel/kernel.json
#	dist/kernel/leaf.js
#	dist/kernel/runtime/bundle-page-layout.js
# Conflicts:
#	dist/kernel/kernel.json
#	dist/kernel/leaf.js
Max asked (3 November) that a group of one look like any other group,
so the lone switch's 'group' heads every group, and the small-grey-name
option goes. The ruled heading's rule moves above it, as the panel's
menu and plan part sections; a rule under a heading is a framed box's
head bar elsewhere in Leaf.
Max found the ruled list tied only the first item to its heading
(3 November): a rule between items cuts a group into equal pieces. One
groups switch replaces items/heads/lone: 'box' frames each group, its
heading the box's head bar as a pane's header draws it, drawn by its
parts since the list stays one keyed run (a group-end row closes it);
'space' parts groups by room alone. Either heads every group.
Spaced groups keep 12px between a group's cards and 57px between groups.
Done's arrow stands before its name, as Resolved's does, so its count
ends with the other headings', and its name takes the muted ink. A
finished line naming no kind gives the lead column no room. Boxed
groups take the small radius.
Each group heading becomes a band across the panel, a shade off its
ground, that sticks at the top of the view while its group scrolls, as a
thread's message heads do (groups=band). The list stacks as a flex
column, since a grid item's sticky range is its own grid area; the view
loses its top padding so the first band meets the panel's edge; the list
declares the band's height as --lf-top so m lands cards below a stuck
band. Done folds wherever bands are on. fold=yes makes every band a press
that folds its group. Replaces the spaced and boxed candidates, which the
user turned down, and drops the tinted-region candidate a blind review
ranked below the bands.
# Conflicts:
#	dist/kernel/kernel.json
#	dist/kernel/leaf.js
#	dist/kernel/runtime/bundle-page-layout.js
A band stuck over a flat list was covered by the next one, which sliced
its words mid-panel. Each group now renders as its own section, so its
band sticks only while the group passes and the next band pushes it off.
An item that moves to another group is drawn afresh there, a rare path
the user takes in at a glance. A folded group's next band follows 2px
below it, so folded groups stack without stripes.
On me's and On Claude's groups each open with a band: the group's name and
count across the panel, a thread head's height, on a ground a shade off the
panel's. The band sticks at the view's top while its group passes, and the
next group's band pushes it off, since each group is a box of its own. Every
group has its band, one card alone included. This reverses the user's choice
of 22 October that only a group of two or more had a heading and a lone card
said its group's name over its place; the user chose the bands on 3 November,
and floating-panel.js's record of it names the designs they rejected.

Done folds under its band in both lists, as Threads' Resolved does, a line
each once unfolded, with a key of its own in each list. Its band is an arrow
row. A finished line of the user's names no kind. Each group and the lines in
it take the list's columns (subgrid), so line titles start on one edge across
groups. A message a card quotes from its thread stands behind a stripe. The
view restarts the sticky slot as any scroller does, so a landing or focus
clears the stuck band once. An open line that folds away under Done is
forgotten, so Escape closes the view.

Tests: On me's and On Claude's lists show finished items once Done is
unfolded (show_done, beside show_resolved), and every group has a band.
leaf-agent
leaf-agent previously approved these changes Nov 4, 2026
# Conflicts:
#	dist/kernel/kernel.json
#	dist/kernel/leaf.js
@max-sixty
max-sixty merged commit d6bef36 into main Nov 4, 2026
4 checks passed
@max-sixty
max-sixty deleted the on-me-paved-road branch November 4, 2026 08:59
max-sixty added a commit that referenced this pull request Nov 4, 2026
)

Everything On me is now answered by the widget or thread that asks it.
Leaf no longer puts a to-do on the user with a Done of its own, so a
widget is never given an answer it doesn't declare. A step such as
trying a build is asked in a thread, and the user's reply or a 👍 answers
it.

Before, `leaf task create <subject> --on user` put a to-do on the user
on any thread, element or widget that had no open obligation, and the
turn-end check did the same for each step it found. On me then offered
that item a generic Done: on an `lf-code` block or a paragraph, the only
answer was a check mark the widget never offered. This reverses the
user's 2026-10 choice to keep such to-dos for steps.

## The rule, and where it lives

- **On me holds obligations only.** Each comes from a widget that
declares `x-awaits` (any widget: bundled, from a package or the page's
own), an agent message sent with `--obligation`, or an update to send
again. On the page, each is answered only through its source: the
widget's declared actions, or a reply or settling reaction in the
thread. A multi-select `lf-options` keeps its Done, since that is the
widget's own control. An answer the user gives elsewhere, such as in
chat, the agent still records with `leaf task end`.
- **Content that asks nothing** (a paragraph, a chart) and a step the
user takes get a thread whose message carries `--obligation`.
- The rule is stated in `obligations.py`'s header, the `x-awaits` key in
`browser/registry.json`, How it works ("On me and the agent's list",
with a new paragraph on what can ask), `conversation-loop.md` ("The On
lists", where the to-do row becomes an "action the user takes" row asked
in a thread) and `authoring-on-me.md`. `todos.py`'s header records the
decision.

## What goes

- **Protocol 39 → 40.** A `todo` event has no `owner`; `todo_end` is the
agent's alone, is no longer browser-postable or undoable, and its
handling clause for the user's Done is gone. A Leaf at 39 would misread
a 40 log and the reverse, hence the bump. (`main` took 38 → 39 for an
undoable edit in #5221.)
- **Model.** `user_task_obligations`, the `todo` obligation source,
`--on`, the `duplicate-obligation`/`users-question`/`agents-todo`
refusals, and `owner` on served to-dos. `queues.on_user` rows are
`widget`, `message` or `update`; to-do rows stay on On <agent>.
- **Clerk.** The fork's answer has no `kind`. Every ask, a step
included, is a thread question whose message says what to do and asks
for a reply. `turn-end-check.md` (#4900) asks the fork that way, and the
fork eval (`dev/leaf_dev/fork_eval.py`,
`evals/workflows/fork_eval.yaml`) labels the step cases as questions.
- **Browser.** The To-do Done on panel rows, On me cards and a thread's
head; the `x` key and its "On a to-do waiting on me" stance;
`queueActions.done` (public package API); local `todo_end` folding and
its undo words; `offers`; `showOnMe`, which #5223 had extended to land
`m` on a page to-do's card; the `done` action face and `checked` icon. A
stance's exit is always Close's ✕, since no stance names another action
now. The margin card's grid loses the row the to-do header held;
`leaf-dev probe review-a-plan --do drive:card-by-keyboard --base`
measures identical child boxes in both arms.

## A cost this keeps

A reply answers a step's question whatever it says. A to-do stayed open
until Done, so "where do I get the build?" left the step On me; now that
reply answers the question, and a plan step naming it reads done until
the agent asks again with `--obligation` and points the step at the new
question. `conversation-loop.md` tells the agent to ask again, and the
clerk's header records the trade.

## Tests and evals

Behavior changed on purpose:

- `todo-on-the-user` becomes `step-on-the-user-takes-a-thread` (pass: a
thread message with `--obligation`).
- `closeout-asks-take-their-route` now requires the `/reload-plugins`
step as a thread question.
- `on-lists-read-todo-records` puts the phone build on the user as a
question.
- Tests that protected to-dos on the user (their Done, `x`, undo of
Done, the To-do placeholder, the thread-head line, and #5223's page
to-do on its card) are deleted. Tests that used one as a convenient On
me item now use a question in a thread.

On the candidate tree (Claude Code, 2 runs each):
`step-on-the-user-takes-a-thread` 2/2, `closeout-asks-take-their-route`
2/2, `on-lists-read-todo-records` 1/2. The failed run listed both user
items correctly and failed on the agent side, doubting that the
benchmark re-run was under way. No base arm was run: the base
instructions route a step through `leaf task create --on user`, which
these rubrics now fail by construction.

`pnpm run check:browser`, `pnpm run test:runtime` (775) and the model
selections covering to-dos, the clerk, obligations, hooks, undo and the
protocol pass, as do the resolved browser tests and #5232's
Back-from-an-obligation tests.
`test_an_item_arriving_above_takes_its_walk_place_and_moves_no_card_read`
fails here and on `main` alike since #5318: the card read moves down by
the new card's height (116px on `main`, 95px here), so the list no
longer holds its place when an item arrives above.

> _This was written by Claude Code on behalf of max-sixty_
leaf-agent added a commit that referenced this pull request Nov 4, 2026
…-words test (#5376)

`test_an_answered_obligations_words_are_its_widgets_semantic_state`
fails on main because its fixture still posts the events the playground
sent before #4845. That PR made a playground's controls draw the `tune`
in force rather than the latest `choose`, and the widget's own submit
records a `tune` before it sends `choose`. The test posted a bare
`choose`, so the controls stayed on Banner and the output never said
"strip". It now posts the `tune` the widget would post, then the
`choose`.

That first failure hid a second stale read. #5318 folded answered On me
cards under Done, and a Done card draws its answer in `.lf-fp-on-says >
.lf-fp-value`. The test now unfolds Done with `show_done` and reads that
element, as the neighbouring tests updated in #5318 do.

No product code changes. The behavior the test protects still holds: an
answered playground's On me card names the instruction it sent ("Build
the strip one."), not the setting its controls show afterwards. The test
failed on main with the reported `strip` assertion and passes with this
change (local run on Linux).

Closes #5168 — automated triage

Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Nov 5, 2026
On me and On Claude group their rows under a tinted band that sticks to
the top of the list while the group scrolls under it (#5318). Threads,
Page Map and the command reference grouped theirs under a muted line
that scrolled away with its rows. This moves the band into the shared
list style, so every list that groups its rows wears it, as chosen on 4
November.

## What the reader sees

- **Threads**: the open threads stand under "Open 2", and the resolved
ones fold under "Resolved 1", as before. A search lists its matches
under "Matches". Each band counts the threads the page holds in that
state, as the tab does, so the numbers agree while the list holds a
moved row behind its notice.
- **Page Map**: each location's name is a band across the dialog that
sticks as the list scrolls. A long name now ends in an ellipsis on one
line, where it wrapped to two.
- **Command reference**: each section's name is a band. Every row stays
under the one listbox parent, so a section has no box of its own to end
at, and a later band slides over the stuck one instead of pushing it
off.
- **On me and On Claude**: unchanged at desktop, apart from On Claude's
lines, which stand 4px lower. A band now keeps a 4px gap below it,
because the focused first row's wash met the band and the two read as
one block. On me's cards trim their padding by the same amount, so they
stay where they were.
- **Touch**: under a finger every band takes the aim floor's height,
44px, since a band that folds its group is a press.

## How it works

The band is `.lf-rows-group > .lf-rows-head` in
`browser/styles/components/controls.css`, with no new class, so a
heading outside a group's box (a tab strip's group label, a trace's
Moments, a card's place line) stays a plain line. The comment there
holds the design and the alternatives it rejected, moved from
`floating-panel.js`.

A band sticks at the `--lf-top` slot it meets and hands its rows that
slot plus its own height (`--lf-rows-slot`, `--lf-rows-band`), so a row
reached by the keys lands clear of the band, and geometry.js's reading
of what the headers cover counts it. Each scroller says how far its band
reaches past the rows to its edges (`--lf-rows-bleed`) and which ground
the band's tint mixes into (`--lf-ground`). Page Map restarts the slot
for its list through `data-lf-scroll`. The reference resets the slot by
hand, since a tab stop on its results would sit between the search field
and its listbox.

`floating-panel.js` draws every grouped list through one `bandedGroups`.
Threads keeps its `.lf-fp-list` wrapper, which the margin tests read.

## Testing

`test_a_band_names_the_group_passing_under_it`
(`tests/browser/test_chrome_contracts.py`) scrolls Threads, Page Map and
the reference in Chromium and Firefox, checks that a band stands at the
list's top across its full width, then walks up the rows by ArrowUp and
checks that no focused row stands under a band. With the slot hand-off
removed, all six cases fail. The panel tests that read the old
`.lf-fp-on-group` selector now read the band, and the Resolved-news test
checks both bands' counts. Those tests and the band test pass on the
branch merged with main.

Before/after stills in both schemes and in Firefox went to the
maintainer on a Leaf page. They show On me and On Claude's desktop
states with no pixel changed.

## Left as they are

- In Page Map, a location with one row still gets a band, so a map of
many small groups reads as stripes.
- Threads shows the Open band even when nothing is resolved, which
repeats the tab's count.

> _This was written by Claude Code on behalf of max-sixty_
leaf-agent added a commit that referenced this pull request Nov 5, 2026
Three `--run-main` On me tests have failed on `main` since #5318 gave
every On group a sticky band. Two of them still expected On me as it was
before #5318. The third caught a real regression: when a new group
joined above the card being read, that card dropped by the new group's
height (115px in the test).

**The regression.** #5318 put each group in its own box and spaced the
boxes with `margin-block-start: 10px` on each group but the first. When
a group joins at the top, the group that used to be first picks up that
margin. A margin change on an ancestor of the browser's scroll anchor
suppresses anchoring, so the 115px the new group added went
uncompensated. Only the later 57px, from the asked message filling its
outlet, was corrected. The space now hangs below each group but the last
(`margin-block-end` on `:not(:last-child)` in `controls.css`), so a
group arriving above leaves the anchored group's style as it was. The
gap between groups is unchanged: `leaf-dev stills` for `on-me`,
`hub-on-me`, `page-map` and `ship-threads` reports 0 px changed against
main (only computed margins differ). The one visible difference is in
lists where something other than a group follows the last group:
Threads' "saved threads still to come" note, which shows only briefly,
now has 10px of space above it.

**Tests updated to #5318's intent:**

- `test_on_me_places_an_item_by_its_tab_s_title_or_label`: under place
grouping a card no longer says its place over its question, because the
band says it (#5318 changed the neighbouring grouping test the same
way). The test now reads the bands' names, and these still check how a
tab's title or label names the place.
-
`test_obligation_cards_keep_identity_and_walk_order_when_the_live_dom_moves`:
it now unfolds Done before counting five cards. When `#sug-refill`
leaves the page, its item moves into "The whole page" group, and #5318's
description says such a card is "drawn afresh in its new group's box",
with `holdFocus` carrying focus over. The test now checks that card
stands under that band and keeps focus, and that every other card keeps
its node.

All three failed on `53337b5e9` and pass with this change (`uv run
pytest --run-main tests/browser/widgets/test_on_panel.py -k ...`). The
band contract test (`test_a_band_names_the_group_passing_under_it`) and
the grouping tests I selected also pass, with two exceptions.
`test_an_answer_in_on_me_keeps_its_groups_and_the_m_walk_in_one_order`
and `test_the_chosen_grouping_orders_on_me_and_the_m_walk_alike` fail
the same way on unmodified main and with this change. They aren't part
of #5481 and this PR doesn't touch them.

Closes #5481 — 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