Skip to content

Lay out every label beside its value in one facts list, Leaf's own and a page's - #4889

Merged
max-sixty merged 6 commits into
mainfrom
list-ui-fixes
Nov 1, 2026
Merged

max-sixty merged 6 commits into
mainfrom
list-ui-fixes

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Leaf showed a set of labelled values four ways. About's CSS counts stood as tiles, each label over its number. Visual review's capture details split into two equal columns of label-over-value pairs, which broke the observation time after its hyphen and left "px" alone on a line. A worktree's snapshot details had a two-column list of its own. The reading theme's dl.facts (the command hub's counts, a task card's worktree evidence, a release page's rail) was a two-column list that stacked into label-over-value under a 640px container, so the hub's narrow panel stacked its four counts down the column.

This change gives them one layout, dl.facts for a page's markup and dl.lf-facts for what Leaf draws itself, stated once in browser/styles/components/reading.css. Each label stands beside its value, muted and a step smaller: a list Leaf draws sets its labels in the small font of the label over a field, and the reading theme steps a page's labels down from its prose. The labels take a column as wide as the longest of them, up to two fifths of the list, and wrap past that, so a long label never leaves its value a few words a line. That cap replaces the 640px stacking rule, which existed for the same reason. The values line up on one edge, in tabular figures, and break anywhere only where they must.

Where it lives

The rule is a component, outside markup's reading face, like .lf-media-frame beside it. lf-worktree declares a shadow tree, and its authored snapshot details are slotted into it, where :host turns the reading face off; a rule inside the face never reached them, which is why the diff package kept its own copy. Outside the face it holds on any page and in slotted content.

The reading theme keeps only what is the theme's: a list's margin in the column, and labels that step down to the apparatus size (min(var(--t-5), 1em), so a label is never larger than the words around the list, as inside a worktree's smaller disclosure). The diff package keeps its values in ink inside its muted disclosure.

What changes on screen

  • About: the five CSS counts read as a list, each label beside its count, instead of a row of tiles, which on a phone cut off the last one. The three JavaScript counts below them join the same list instead of a sentence. The tab's observations stay a stacked list, since their values are lists.
  • Capture details: one list instead of two columns of stacked pairs. The time and the focus box each fit on one line.
  • The command hub's counts and a release page's rail: label beside value instead of stacked, in their narrow columns.
  • A worktree's snapshot details: unchanged apart from rows 4px closer and values 8px closer to their labels.
  • A task card's worktree evidence and a wide dl.facts: unchanged.

Authoring change

A worktree's snapshot details are now written <dl class="facts"> (packages/diff/instructions/author.md and the worktree example). A plain <dl> there takes the browser's definition list.

Also: leaf-dev stills runs again

Since #4873, image-difference.js imports /runtime/portable-api.js, and the tab where leaf-dev stills compares its pairs answered that path with an empty page, so every run stopped before its first comparison. The tab now serves the runtime as read_runtime reads it.

Checks

  • test_interface_fonts.py; the facts layout test in Chromium and Firefox; the options rail tests; the visual review inspection test; the worktree disclosure test.
  • leaf-dev stills over About, capture details (light and dark), the hub, the ship review's facts and option rail, and the worktree summaries, and probes of the worktree's snapshot details, the hub's task card evidence and the release rail on main and on this branch.

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

Since #4873, `image-difference.js` imports `canvas2D` from
`/runtime/portable-api.js`, as any widget imports the package API. The
tab `leaf-dev stills` loads it in answered only that module, the default
package's vendored files and the stills themselves, and gave every other
path an empty HTML page, so each run stopped before its first comparison
with "Failed to fetch dynamically imported module". The tab now answers
the runtime's paths from this tree's runtime as `read_runtime` reads it,
under the package's own vendored modules.

> _This was written by Claude Code on behalf of max-sixty_
@max-sixty
max-sixty merged commit 9c5a77c into main Nov 1, 2026
4 checks passed
@max-sixty
max-sixty deleted the list-ui-fixes branch November 1, 2026 06:01
max-sixty added a commit that referenced this pull request Nov 1, 2026
Behavior changes:

- A double-click on a list's ‹ goes back to the menu once. The menu is taller
  than the list, so the second click used to press, and focus, whichever menu
  row came under the pointer, Undo among them. A capture listener on the panel
  now refuses the mousedown and click of a run begun on another control; clicks
  repeated on one control, as Next match or Resolve, each still press it.
- `/` in the menu returns to its search, keeping the words typed, rather than
  opening page search. Each view declares its own keys on VIEWS (`keys`,
  `claims`), and the one declaration on the view is generated from the view
  shown, replacing the hand-merged Threads and Versions declaration.
- The menu's search lists the lists whose names match first, then rows, then
  threads and versions. A thread found there opens over the menu, so its ‹
  returns to the words typed.
- The search results' separator is a 1px rule instead of an unstyled hr.
- On a phone (420px and narrower) the On view's tabs keep 3px of their inset,
  so at 390px the four tabs, a list's press and Close stand on one line.
- About this page shows each copy's full text since #4889, so the dead
  one-line summaries in page-about.js go; the startup journey checks the
  preview's checkout in Page details instead of the removed summary.
- The quick seat no longer steps aside for page search before its way out
  arrives in the repaint frame, which wrote `hidden` twice to the same value in
  the task that put the menu away.

> _This was written by Claude Code on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Nov 1, 2026
…eld (#4895)

The leaf now opens the On view on a new first tab, **Menu**, beside On
me, On <agent> and Threads, and the field becomes the menu's search. The
user chose this combination on 30 October from a playground of
independent choices. The menu now reaches the obligations and threads
its status counts, and the popup it replaces, with the machinery only it
needed, is gone.

## What changes for the user

- **The menu is a view.** Its Close ends its tabs, as every list's does.
Versions, Navigate, Annotations and Errors open over it, with the ‹
before their name leading back to it. Escape steps back from a list to
the menu, onto the row that opened it, and from the menu to the leaf. A
double-click on the ‹ goes back once: the menu is taller than a list, so
the second click would land on whichever of its rows comes under the
pointer, Undo among them. While the menu is open it holds its rows and
the status's lines (`opening.menuSeats`, `opening.menuLines`), so news
moves nothing in it.
- **The field searches the menu.** Typing filters the menu's rows: the
lists whose names match lead, then the rows on the menu and inside its
lists, then matching threads and versions, and last "Search commands for
'…'", which opens the command reference on the same words
(`findCommands`). Enter presses the first result, ↓ moves into the
results, ↑ from the first and `/` from any return to the search. A
thread found there opens over the menu, so its ‹ returns to the words.
- **Copies move to About this page.** Copy agent session, Copy preview
diagnostics and Copy Leaf version now stand only in About this page,
under a new `about` group of page controls; Copy link stays in the menu.
About shows each copy's full text (since #4889), so those rows' one-line
summaries, which only the menu showed, are gone.
- **Smaller changes:** the status no longer repeats the Waiting on
counts the tabs now show; `s` reads "Select mode"; Undo's row keeps a
long gesture's name to two lines; the arrows skip disabled rows. The On
view's foot follows one rule on Menu, On me and Threads: the tabs keep
their words whole, and where a press and Close don't fit beside them
they take a line of their own over the tabs, at its end, so the tabs
stay on the row and a tab turned to never leaves the finger that turned
it, On <agent>'s plan head included. Close now ends the foot's presses
as it ends the head line's, and every tab keeps room for one press, so
turning tabs moves nothing wherever the line breaks; `data-named`, which
gave On me that rule while Menu and Threads scrolled their tabs, goes.
On a phone (420px and narrower) the tabs keep 3px of their 8px inset, so
at 390px in Apple's faces the row is one line.
- **One hairline above the field.** While a view is open, the panel's
one hairline now stands above the field, also under a list's tabs, where
it stood above them, so the tabs read with the view they steer. The
field without the caret, which shows the status, no longer reads as the
view's last row. The user chose this on 31 October.

## Where to look

- `browser/runtime/floating-panel.js`: the `menu` view in `VIEWS`,
`menuView`/`menuFound`, the menu tab in `onTabs`/`onTab`, `pressLeaf`,
the Escape steps in `pageRung`, and `back()` landing on the opening row;
the view's Close stays offered at the end of the tabs while the menu's
search holds the field. The popup's state, template, fade, level keys
and `menuitem` roles are deleted. A view's own keys are declared on
`VIEWS` (`keys`, `claims`) and the one declaration on the view is
generated from the view shown, since an element holds one key
declaration (`keyboard/scopes.js`): the menu's and Threads' `/` and
Versions' number keys. A capture listener on the panel swallows the
second press of a run begun on another control, its mousedown as well as
its click, so it neither presses that control nor takes focus to it. The
quick seat no longer steps aside for a search with no way out yet: page
search's comes in the repaint frame, and stepping aside meanwhile hid
the seat again in the task that put the menu away.
- `browser/styles/floating-panel.css`: the popup's rules, its way back
among them, removed; the hairline drawn on `.lf-fp-row` while a view is
open.
- `browser/runtime/undo.js`: the Undo arm is kept when the chrome
replaces the view it was armed in, so pressing Undo twice through the
menu still works.
- `page-controls.js`, `page-about.js`, `activity-words.js`,
`composing/target-picker.js`, `keyboard/command-reference.js`: the
`about` group, the status words, Select mode, and the command reference
opened on a query.
- Tests, stills drivers, glossary and `docs/ui.html` follow the new
menu. Tests that pressed the On view's tabs by position count Menu
first, a list's way back to the menu is the ‹ in its head, and Escape
out of a list over the menu takes two presses.

## Behaviour to weigh

Pressing the leaf while a thread is open shows the menu in the thread's
place, since every tab replaces the view; the way back to the thread is
through Threads. Stacking the menu over the thread with its own way back
would add a case to Back and to the Escape order.

## Testing

Runtime unit tests (737) and `pnpm run check:browser` pass. A
menu-related browser and journey selection passes, except tests that
fail identically on a clean copy of `main` on this machine (obligation
walk, the leaf's fold travel, draft editing, diffs, widget quality,
dictation, application boundary, options, key surfaces, touch return, a
wait's deadline, a data-bound diff, a boxless target's reading). New
tests cover the double-click on ‹, the menu's `/`, list order and a
found thread's way back, and the phone tab row; each fails without its
fix. The automated review could not run on this PR (tend's Codex
accounts are out of quota); an independent review of the late changes
found the defects these commits fix.

> _This was written by Claude Code on behalf of max-sixty_
leaf-agent added a commit that referenced this pull request Nov 5, 2026
…s its own (#5421)

Core `reading.css` now lays out only Leaf's own `dl.lf-facts`; the
reading theme's `defaults.css` gives `dl.facts` the same layout. A page
initialized without a theme keeps the `class="facts"` layout its author
wrote, as @max-sixty decided in #5089.

Since #4889, the core rule `dl:is(.facts, .lf-facts)` reached every
page, so the editorial plain-page fixture's three 244px cards became
four 177px grid tracks with their `div`s shown as contents. `.facts` is
already the reading package's registry idiom, so its layout now lives
with it, the way #5288 gave Leaf's own controls `lf-` names.

What changes on screen: nothing under the reading theme; a page with no
theme, or another theme, no longer takes Leaf's facts grid. The worktree
details in the diff package's example and an option's `.facts` rail keep
their layout under the reading theme, as before.

Verification:
-
`tests/journeys/test_plain_pages.py::test_an_ordinary_page_is_drawn_as_written`:
`editorial` failed on main (#5089) and passes here. Its
`class-vocabulary` pin and the `dl.facts` half of that obstacle are
removed; `form` still xfails on the `.choice` half.
- `leaf-dev stills` for `page-about`, `worktree-startup`, `ship-review`,
`live-progress`, `alert-review`, `visual-review-inspection` and
`plan-option-picked`: six unchanged. `page-about` differs only in the
About dialog's version text, which reports a dirty tree; its `lf-facts`
lists draw identically.
- `tests/browser/test_render_options.py`: 47 pass. Two fail identically
on unchanged main (`test_a_quoted_widget_exhibits_without_taking_input`,
`test_a_thread_obligations_done_press_keeps_its_keys_and_one_workflow`).

Closes #5089

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