Repository navigation
Name the weighted voices, centre badges by layout, and set every muted word in one ink - #4791
Merged
Merged
Conversation
leaf-agent
approved these changes
Oct 31, 2026
This was referenced Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: 500was 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-lineby 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 itspadding-blockand its line; a badge that wraps onto two lines stands about 1.4px taller.One muted ink
--muted-2is 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--mutedread 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.pynow fails a font weight in a rule that names a voice, and any line height other thaninherit,0,1or the voices' shared leading (var(--lf-ui-lh)). Reintroducingfont: var(--voice-small); font-weight: 500on.lf-summary-labelandline-height: 14pxon.lf-margin-countfails it with both named.Checks
leaf-dev stillson 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-meadds the corpus's live generated document, andplan-card-replya target trace drawnfixed, neither from this change.leaf-dev probe --browser firefox), as before; the panel's search surface stays 32px in both.tests/model/test_interface_voices.pyandtests/browser/test_composition.py(the theme fixture that set both muted inks) pass.