Repository navigation
Align the margin preview's conversation with the card's own column - #410
leaf-agent wants to merge 2 commits into
Conversation
leaf-agent
left a comment
There was a problem hiding this comment.
#408 resolves this same nightly failure with the opposite premise, and it is the maintainer's. test_the_margin_groups_meanings_at_one_destination_without_moving_the_page is rewritten by both PRs, on the same two hunks. This one calls the inner gutter a defect in the margin seat and spends the card's padding on it so the composer meets the title column; #408 keeps the gutter and rewrites the assertion to read the composer against the thread's content box, saying of #391's resting room that "that room is the design". Only one of those can be the seat's intent, and it is a design call rather than a correctness one — worth settling on #408's thread before either lands.
Two things narrow the question. The behavioral disagreement is smaller than the prose suggests: under this branch's own reported geometry the thread's border box runs to 1357 with a 4px resting padding, so #408's threadRight - threadPad still evaluates to 1353 and its assertion would pass against this CSS unchanged. What actually collides is the text of the test and the account of what the margin card should look like. And the layout mechanism here is sound as written — the negative margin cancels .lf-conversation-thread's padding: var(--sp-1) symmetrically, the 4px lands inside the card's own 12px padding rather than in .lf-margin-preview's scroll overflow, the rule sits directly in @scope (.lf-chrome) so it holds at every width, and putting it on .lf-margin-thread-body rather than the conversation's class is right for the reason the comment gives: chrome.css names .lf-conversation-msg and .lf-say in an unscoped rule already, so they stay out of themed, while .lf-conversation-thread appears only in theme.css and naming it in a scoped rule would have widened that ledger's exception.
No findings against the code itself.
Closeout work from the UI and UX sweep that landed in #379, and the reds it turned up on main along the way. **The wide shelf's height was reading its chords.** #388 gave a banner control that opens a stable destination a quiet second line carrying its chord, and paid for that line with `padding-block: 3px 14px` on `[data-lf-chord]` — the controls that happen to be carrying one. The runtime writes that attribute only while a binding is live and unshadowed, so it comes and goes as the reader moves: a letter typed inside the go-to prefix filters the visible targets and takes every chord off the row. Measured at 1200px, each control went 33px → 30.3px and the row 41px → 38.3px on that gesture, which is a metric expressing state. The wide shelf now reserves the line for every control it draws, so the chord's text is the only thing left for state to paint, and `test_the_shelf_keeps_its_height_when_its_chords_are_shadowed` pins it. #407 landed the compact half of this while the branch was open, and its answer stands: a forty-pixel aim has no second line to give, so the compact block states the row's whole box and drops the hint there. It does not reach the wide row, where the news chip carries no chord — verified against `main`'s tip, where the shelf still loses 2.7px a control. The sheet test goes back to reading each label centred in its own box, which is what #407's fix restores. **The margin thread's composer is read against the card's content box.** `test_the_margin_groups_meanings_at_one_destination_without_moving_the_page` asserted the composer's right edge meets the thread card's, which #391 made false by four pixels when it gave the card symmetric resting room to draw its focus edge inside. That room is the design; the claim the assertion was making — the composer spans its card — is about the content box, and a composer genuinely inset from the card still fails it. #410 is open against the same two hunks of that test from the opposite premise: that the card's inner gutter is a defect the margin seat should spend rather than resting room to measure around. The two layouts are compatible even though the accounts are not — under #410's geometry the thread keeps its padding and `threadRight - threadPad` is still the composer's right edge, so this assertion holds either way, and its CSS stands or falls as a design change on its own. Whichever lands first, the other's test hunks want a rebase. **`scripts/linux-suite.sh` can now build for the host's architecture** (`LEAF_SUITE_NATIVE=1`). Emulating amd64 is what makes the image CI's, and on Apple silicon without Rosetta it is also what breaks: qemu kills Chromium's GPU process before the first context opens, on `about:blank` as readily as on a page, which surfaces as `TargetClosedError` and reads like a product failure. The native build gives up Google Chrome, which ships for amd64 only, and keeps CI's fonts — so it answers a question about how wide something is with CI's own numbers, and is not the control for a case that drives the installed launcher. CLAUDE.md's landing-past-a-red rule now says which mode it means. **A section is watched at its heading.** `lf-toc` observed each section's destination, which for a generated destination is a 1×0 span whose resize observation can never fire. **One test no longer depends on where the run's temporary directory is.** `test_an_unidentified_old_service_is_not_mislabeled_as_the_calling_leaf` read the whole startup note for the calling payload's path, which also reads the page and stop lines — and the page directory legitimately sits under the checkout whenever a run is given a `--basetemp` there. Equality on the runtime line says what the absence was reaching for. A full local `--run-nightly` run on this head is 2149 passed, 1 failed: `test_render_widgets.py::test_suggestion_controls_stay_out_of_the_column[no-preference]`, which reproduces deterministically with `main`'s own `chrome.css` in place and belongs to a module this PR does not touch. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
# Conflicts: # tests/test_render_margin.py
leaf-agent
left a comment
There was a problem hiding this comment.
#408 landed with the opposite premise, so this branch is no longer fixing a red — its diff against main now deletes an assertion a maintainer merged. #408 went in at 2cdb404, 26 minutes after this branch opened, and it rewrote the same two hunks of test_the_margin_groups_meanings_at_one_destination_without_moving_the_page: it kept #391's resting gutter and read the composer against the thread's content box (threadRight - threadPad). By this PR's own reported geometry — composer at 1349, thread border box at 1353, resting padding 4 — that assertion evaluates true against main's CSS unchanged, so the nightly failure this branch was opened for is already closed there. (ci on 2cdb404 is still running as I write, so that is arithmetic from this PR's own measurement table rather than a green run.)
The base merge dc24ed6 hit exactly that conflict in tests/test_render_margin.py and resolved it by keeping this branch's side. Nothing else in the merge changed — the resolution kept #408's new shelf case intact — but the effect is that gh pr diff now reads as a revert of the maintainer's assertion rather than a repair of a red one.
The design question has since been answered twice, both the other way. #402 (open) rewrites the same assertion a third time on the same premise as #408 — the reply field fills the thread's content box, inside whatever padding the thread reserves. Neither maintainer version is broken by this CSS, for the reason the earlier review gave: the negative margin moves the thread's border box and leaves its padding, so threadRight - threadPad and #402's content-box reading both still land on the card column. What collides is only the account of what the margin card should look like, and that account now exists in a merged commit and an open maintainer PR.
So the remaining decision is close-or-rescope, not a code change. If the resting gutter inside the card is the design, this branch should close, and the body's claim that the case is red on main is stale either way. If the card's single column is still worth having, it wants reopening as a design change against green main that says it revises #408 — and #402 will need its assertion written a third time to match.
No findings against the CSS or the test as written.
|
Closing. The review's reading holds, and the one fact it left as arithmetic is now measured: So what remains in the diff is a design change wearing a repair's clothes: it replaces an assertion a maintainer merged 26 minutes after this branch opened, and #402 writes the same assertion a third time on the same premise. Two maintainer statements of the opposite account is an answer, not a gap, and reopening this as a design PR against green Leaving the branch Verification on
|
In the anchored margin preview, a conversation's words no longer stand on the card's own column.
test_the_margin_groups_meanings_at_one_destination_without_moving_the_pageis the nightly case that names it, red onmainsince #391 landed and reported by the nightly leg of run 34147534534. It is the last of that run's five failures; #407 has since taken the other four and named this one as a separate cause.A card that already keeps the room does not need a second gutter inside it. #391 replaced the thread's outer accent ring with a quiet edge drawn inside the box, and gave every
.lf-conversation-threada restingpadding: var(--sp-1)so that edge lands without moving the words when the reader arrives. That is right for the unbordered inline conversation the change is about. The margin preview is the other seat, and it is a card: its own 12px padding already surrounds the thread, and the title and close row stand on the content column that padding leaves. A second gutter inside it stepped the conversation in from that column — measured at 1440px on the corpus ask page, the head ran to x=1353 while the author line, the message, the ✓ and the reply field all stopped at 1349. At rest nothing is drawn in the 4px, so the card simply read as two misaligned columns. The seat now spends the card's padding for the gutter: the thread keeps its clearance, its quiet edge draws into that room, and its words end at 1353 with the head.The rule goes on
.lf-margin-thread-body, the chrome's own wrapper, rather than on the conversation's class.test_a_coined_class_cannot_reach_the_chromes_rulesis the reason and it is worth stating: the chrome sheet naming.lf-conversation-threadputs that name in the ledger'sthemedset, because the class also has a document-level face, and the exception would have had to be widened to let the chrome dress a word the theme owns in the page too. The wrapper is chrome on both sides of the scope and needs no widening.The test's assertion moved with the box it means. It read the reply field against the thread's border box, which was the content edge before the gutter existed and is now 4px outside it by design; both halves of that comparison move together, so it could no longer see the misalignment. It now reads the field and the message against the card's title row — the column the three actually share, and the one that regressed.
Verification
Run on this branch on Linux with the repository's browser setup, rebased on
mainat 533e624:1349 == 1353 ± 1— the reported numbers — with the CSS reverted and the test kept, so it still catches the regression it was rewritten around;tests/test_render_margin.pyandtests/test_render_conversations.pyunder--run-nightly: 157 passed, no failures left in either file;uv run pytest tests: 901 passed, 6 skipped;Failure as reported, and the measurement
The preview at 1440px, before the change — the card's content box runs 919→1353, and the conversation sits inside it:
.lf-margin-preview-head(title and ×).lf-conversation-threadborder box.lf-conversation-msgtextareaAfter it, the thread's border box runs 915→1357, out into the card's padding, and every row of content is back on 919→1353.