Skip to content

Name the weighted voices, centre badges by layout, and set every muted word in one ink - #4791

Merged
max-sixty merged 2 commits into
mainfrom
list-ui-fixes
Oct 31, 2026
Merged

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

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Three changes close the remaining ways a rule of Leaf's interface could set a face or ink of its own beside the voices (--voice-*, base.css), each chosen on the session's Leaf page.

A voice owns its weight

A rule that names a voice no longer adds a weight to it: font: var(--voice-small); font-weight: 500 was a face without a name, and three rules spelled that one. Each such rule now names a voice:

  • --voice-status (500, small): a passage's status, a drawing's reference, a summary's label.
  • --voice-error (500, ui): why a box refused what was typed in it.
  • --voice-goal (600, the message face): a plan's goal over its steps.
  • --voice-name (600, compact), whose comment now covers the page's state atop the leaf's menu as well as a message's author.

A run that keeps its holder's voice may still set 400, 500 or 600, since some runs take their size from wherever they stand by design: the inline face (a press read as part of its line, chosen on 28 October) and a pending thread name inside whatever title holds it.

A box centres its words by layout

Badges centred their count with a line as tall as the badge, a leading outside every voice. The margin's count and the folded leaf's badge are now grids that centre their words, and the key badges keep the flex centring they already had and drop their line. The floating panel's search field and its field's error sit in --lf-line by a padding of half what the voice's line (1lh) leaves, where they set a 22px line. The command reference's wrapping key badge loses its padding-block and its line; a badge that wraps onto two lines stands about 1.4px taller.

One muted ink

--muted-2 is folded into --muted, at the values #4779 gave it (light-dark(#676257, #b1aa9d)). It began in the first theme as a fainter third grey for times and ages; the two had since converged, and only the "-2" held the 4.5:1 contrast the interface needs. The document's old --muted read under AA on five of the layer's tints in light (4.09 to 4.47:1). Now the page's prose and every package read the AA values too, so captions, quotes and table heads gain contrast: 5.10 → 5.76:1 on paper in light and 6.21 → 7.70:1 in dark, where they turn visibly lighter.

The check

tests/model/test_interface_voices.py now fails a font weight in a rule that names a voice, and any line height other than inherit, 0, 1 or the voices' shared leading (var(--lf-ui-lh)). Reintroducing font: var(--voice-small); font-weight: 500 on .lf-summary-label and line-height: 14px on .lf-margin-count fails it with both named.

Checks

  • leaf-dev stills on 34 states (panel views, threads, dialogs, the command reference, margin badges, prose pages; light, dark, phone and touch): no face appears on one side only. Apart from the muted ink's two values, every style difference is a badge's or field's line and centring, and the command reference's key badges. Two states differ by more than antialiasing (a pixel channel over 60): About, by its fingerprint and runtime ids, and the command reference, whose rows stand 0.16px shorter (29 → 28.84) because a key badge's baseline moved by that much, so a list of thirteen rows ends 2px higher. on-me adds the corpus's live generated document, and plan-card-reply a target trace drawn fixed, neither from this change.
  • The margin's count centres its digits on the box's middle in Chromium and Firefox alike (leaf-dev probe --browser firefox), as before; the panel's search surface stays 32px in both.
  • tests/model/test_interface_voices.py and tests/browser/test_composition.py (the theme fixture that set both muted inks) pass.

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

@max-sixty
max-sixty merged commit 1f3171e into main Oct 31, 2026
4 checks passed
@max-sixty
max-sixty deleted the list-ui-fixes branch October 31, 2026 01:37
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