Repository navigation
Seat margin pins past a display: contents child by what it draws - #7487
Merged
Merged
Conversation
The margin's child index let a child with no box meet every band, so every pin's seat walk descended into each `display: contents` child it passed. Every light widget `defineWidget` draws stands in such a box, so each Effect UI port made the walk read more of the page per pin. The index now spans a boxless child by the union of what it draws (`drawnSpan`), and it meets only the bands that reach that; one that draws nothing meets none. shown-box.ts said no widget displays as contents, which the adapter's light box made untrue. Bench, load CPU at 256, 5 interleaved rounds, min / median, base main: drafts 3019 / 3198 -> 2876 / 2930 ms; cards 2170 / 2324 -> 2173 / 2365 ms (lf-card is still a plain element on main, so cards holds no such box). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V22NWd3erndyoj2G9LEP7y
leaf-agent
approved these changes
Nov 28, 2026
Owner
Author
|
Generated by Claude Code |
Collaborator
|
Re-ran the failed jobs of that run (attempt 2); |
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.
Requested by Maximilian · project thread
The margin's child index (
childIndex, margin-layout.js) treated a child with no box as meeting every band. Every pin's seat walk (coverIn) then descended into eachdisplay: contentschild it passed. Every light widget thatdefineWidgetdraws stands in such a box, so each Effect UI port made the walk read more of the page per pin.The index now gives a boxless child the union of what it draws (
drawnSpan): its words' line boxes and its boxed descendants, reached through any boxless ones. The child then meets only the bands that reach that, and a child that draws nothing meets none. The walk below the child doesn't askskippedagain: the child's own answer covers what it holds, and asking it of a boxless element climbs every ancestor.shown-box.tssaid no widget displays as contents, which the adapter's light box made untrue.Bench
leaf-dev bench drafts cards --sizes 64,256 --read cpu --input key --rounds 5 --base origin/main, load CPU at 256, in ms:lf-card is still a plain element on main, so the cards page holds no such box and stays flat. On
drafts, a V8 profile of an earlier cut of this change movedcoverInfrom 708 to 555 ms (profiled) andstuckShiftfrom 218 to 108 ms. That cut also askedskippedof each descendant, anddrawnSpancost 137 ms, mostly thoseskippedcalls; the final version drops them.Checks
pnpm run checkpasses.tests/runtime/margin-placement.test.mjs: 27 pass.tests/browser/margin/: 302 pass. The 13 WebKit cases fail because no WebKit build is installed on this host. Three Chromium cases fail and one errors onorigin/maintoo, with this change reverted:test_a_growing_draft_under_its_words_holds_the_editor_s_toptest_threads_on_two_parts_of_a_picture_stand_an_entry_each_tracing_its_parttest_a_pin_keeps_clear_only_of_controls_the_user_can_seetest_suggestion_actions_stay_reachable_through_a_decision_and_its_undo🤖 Generated with Claude Code
https://claude.ai/code/session_01V22NWd3erndyoj2G9LEP7y
Generated by Claude Code