Repository navigation
Stand a message head's name on its time's baseline - #4842
Merged
Merged
Conversation
In a thread message's head, the name (13px semibold) stood below the time, the receipt and a notice of news (11.5px): by 0.5px in Firefox and 0.92px in Chromium, and by 1.2px at a task seat's 10.5px scale. The head centres each box of words on its line, and text centred on a line of its own face sits lower the larger it is. The name now gives up its own line and holds a strut, a zero-width character in the head's face, whose line is the name's box. That box is then the same line in the same face as the time's, both engines round its baseline the same way, and every word on the head's line shares it. The name rises to the others; nothing else moves, and the head stays 28px tall. The name's box clips only at its inline end (`overflow: clip visible`, here and on a held header item), since the shorter line cut the top pixel of accented capitals. The strut opens only the first line, so the name keeps to one line and ellipsizes in a head that wraps, one holding a progress disclosure, where it could wrap to two before. Rejected: aligning the head's items by baseline, which stands the words at the top of the 28px head rather than centred on it; and a strut in the metadata on the name's line, which left the notice of news, centred beside the head, 1 to 1.6px above the rest. test_a_new_sent_message_does_not_hide_work_on_an_earlier_message also checks that the name, time and receipt in a margin card's head share a baseline.
leaf-agent
approved these changes
Oct 31, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 1, 2026
…ive more on one #4842 stood a message head's name on its time's baseline: centred each in its own box, the 13px name stood 0.92px below the 11.5px time in Chromium, 0.5px in Firefox, and a reader saw the line step. Any row that centres words of two faces separately does the same, so `leaf-dev stills` now looks for it in every state it captures. `stills_baselines.js` reads each item of a flex row or of a grid of more than one column (a subgrid by its parent's columns), and each box placed out of flow, such as a notice anchored beside a head, that holds one line of words. A run of words stands its baseline at its text box's top plus its ascent, read from a sample of the same words in the same face, set outside the page in a shadow root of its own, so the page's rules don't restyle the sample and the words measured are never touched. Items whose words share a line and stand within eight ems of each other read as one run; in the catalogue, words read together stood three ems apart or less, and words at a row's two ends, such as the panel's field and its count, thirty or more. Words in a box fixed over the page share no line with words outside it. The run's `baselines.txt` lists each run whose baselines stand a quarter of a CSS pixel or more apart, half a device pixel of the 2x stills: those only the head splits, those both arms split, and those only the base splits, each line keyed by which of the lines alike in row and words it is. It reports and fails nothing, and costs 0.1s on the feature gallery. A layout split is what a reader sees, though the paint rounds it: shifted by tenths of a pixel, a saved moment's time 0.55px above its name painted a whole pixel above it at six of ten positions in Chromium, and 1.0px above at every position in Firefox. Across the 307 catalogue states, the audit found lines that step here, each now on one baseline in Chromium and Firefox: - the floating panel's row: the On me count stood above the field's words, 0.92px (0.52px in Firefox) beside "Away" at rest and 1.42px beside page search's status under a finger. The count takes a strut in the field's font, as the head's name takes one in its time's. - Versions: "Showing" stood 0.92px (0.5px) above the shown version's name. The row aligns them by baseline, as `.lf-row` aligns a row's name and end. - the sort example's inputs: its smaller legend stood 0.54px (1.0px) above its choices. The legend takes a strut in their font. and two the audit leaves out: - All pages, which no catalogue state reaches, since it lists only while another page is live: a page's title stood 0.92px (0.5px) below what its agent is doing. The row now aligns them by baseline and centres their line, so the title doesn't move. `test_all_pages_is_a_view_of_the_panel` holds them to one baseline. - a trace's saved moments, whose name and time stand at a row's two ends: the time stood 0.55px (1.0px) above the name, against `.lf-row`'s rule that a row's end stands on its name's baseline. The moment's number now joins that baseline, so its ring, taller than the line, holds the line on its middle; the row keeps its height.
max-sixty
added a commit
that referenced
this pull request
Nov 1, 2026
…her line Keeping two rows' words apart unless one row stood in the other lost the panel's count beside page search's status, since the field's words and the count each stand in a row of their own, and Versions' name and Showing. What sets two cards side by side apart is that each holds words on other lines. So two runs share a line where no box between each and the box holding both holds words on another line; a box's height says nothing, since a field under a finger is 44px tall around one line. On the commit before #4842 the audit reports the message heads in the floating panel, a margin card and a task's seat with its notice of news, on main the panel count beside search (1.42px) and Versions (0.92px), none of them on the branch, and nothing across the playground's two cards.
max-sixty
added a commit
that referenced
this pull request
Nov 1, 2026
…ght more on one (#4886) Words of two sizes, each centred in a box of its own in a flex row or grid, stand on different baselines, the larger lower: the cause of the message head's split fixed in #4842. `leaf-dev stills` now measures every line in each state it captures and writes the lines whose words stand a quarter of a CSS pixel or more apart to `baselines.txt`, under "only head splits", "both arms split" (with each arm's spread) and "only base splits". It reports and fails nothing. Its first run over the catalogue found eight more lines, which now stand on one baseline in Chromium and Firefox. ### The fixes | Where | Split before (Chromium / Firefox) | Fix | |---|---|---| | The panel row's On me count | 0.92 / 0.52px | Strut in the field's face | | Versions' "Showing" | 0.92 / 0.5px | Baseline alignment | | All pages, a page's title and its agent's activity | 0.92 / 0.5px | Baseline alignment, row still centred | | The leaf's menu, a row's value | 0.84 / 0.43px | Strut in the menu's face | | A trace's saved moment, its name and time | 0.55 / 1.0px | The number joins the row's baseline | | The sort example's legend | 0.54 / 1.0px | Baseline alignment, radios centred | | A worktree's path and its label | 1 / 0.5px | Baseline alignment; the row grows 1px | | A call group's call and its count | 1 / 1px | Baseline alignment | A strut is a zero-width character in the neighbour's face on a box with `line-height: 0`, so both words stand on one line in one face. It stays where baseline alignment would move something else: a message head's notice of news, placed outside the head's flow, and the menu's Versions row, which would grow a pixel. `test_all_pages_is_a_view_of_the_panel` now asserts the All pages row's baseline. ### The audit `dev/leaf_dev/commands/stills_baselines.js` holds it; its header states which boxes it reads and which words it compares. It never touches the words it measures: a run's baseline is its text box's top plus an ascent read from a copy of the same words in the same face, set in a shadow root outside the page. It compares boxes whose words share a line and stand within eight ems of each other, leaves out words in two cards side by side and words under a fixed or top-layer box, and counts no words on a fill, border or shadow of their own that shows, such as a key's letter on its badge. The eight-em rule also leaves out a split at a row's two ends, as a trace's saved moment had. Reading a state costs up to a tenth of a second. ### Review Codex (`gpt-6-astra`) reviewed the audit three times. The last review asked whether the work leaves Leaf simpler, and answered that the interface reads better but the code isn't simpler: about 505 lines are developer tooling, and no change higher up (the theme, a shared row, the type scale) lets the per-site fixes go. It recommended keeping the audit report-only and not adding rules to chase each miss. The sort legend's strut was replaced by baseline alignment on its advice, and the audit now ignores transparent borders and shadows, which Leaf keeps on list rows and reaction chips and which had hidden a real split. ### Testing The audit was run over 306 of the 307 stills states in Chromium; `thread-choice-hints` times out on a loaded machine. Taking out each fix brings its split back, and every fixed line measures 0 in Chromium and Firefox (0.07px for the menu's value in Firefox). `dev/tests/model/test_stills.py` covers the report, and `test_versions_travel_opens_in_the_panel`, `test_all_pages_is_a_view_of_the_panel` and `test_call_diff_keeps_the_user_on_a_row_a_new_capture_moves` pass. > _This was written by Claude Code on behalf of max-sixty_
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.
In a thread message's head, the writer's name (13px semibold) stood lower than the time, the receipt and a notice of news beside it (11.5px): by 0.5px in Firefox and 0.92px in Chromium, and by 1.2px in Chromium in a task seat, whose words are 10.5px. The head is a flex row that centres each of its boxes on the row, and text centred on a line in its own face has its baseline lower the larger the face is.
The name's box now takes its line from a strut, a zero-width character in the head's face, rather than from the name's own face (
line-height: 0), and the name stands on the strut's baseline. The name's box is then the same line in the same face as the time's, both engines round the baseline in it the same way, and every word on the head's line shares one baseline, measured in the floating panel, a margin card and a task seat. The name rises to the others, nothing else moves, and the head stays 28px tall.The name's box clips only at its inline end (
overflow: clip visible), here and on a held header item, because its shorter line would otherwise cut the top pixel of an accented capital in Chromium. The strut gives height only to the first line, so the name now keeps to one line in every head: a head holding a progress disclosure lets its words wrap, and there a long name used to wrap onto a second line, where it now ends in an ellipsis as it already did in other heads.Rejected: aligning the head's boxes by baseline, which puts the words at the top of the 28px head rather than centred on it; and a strut in the metadata on the name's line, which left a notice of news, centred beside the head, 1 to 1.6px above the rest.
test_a_new_sent_message_does_not_hide_work_on_an_earlier_messagenow also checks that the name, time and receipt in a margin card's head share a baseline; on main they differ by 0.92px in Chromium. The panel's All pages list centres each row's 13px title beside its 11.5px status the same way, so its titles keep the same offset; this change doesn't touch it.