Repository navigation
Draw a thread's and a code block's ring over their own pinned rows - #1329
Merged
Merged
Conversation
A margin card whose thread held the keyboard's focus drew its ring on three sides: the bottom run was missing under the Reply box. #1303 moved the thread's 4px foot padding into the sticky reply row, so the row reached the thread's bottom edge. The ring is an inset outline, and an outline paints with its box's in-flow content; the row is positioned, so it paints afterwards, and its opaque surface covered the bottom run. The page thread now draws its ring on a `::after` over its contents. The pseudo-element is positioned and follows the row in tree order, so it paints over it with no z-index that would also lift it over the page. The card no longer sets its thread `position: static`, a leftover from when its head was absolutely placed against the card. The reply row keeps #1303's padding, so it still does not drop 4px when the transcript starts to scroll. The ring check had the same blind spot. `RINGS_DRAWN` treated any box inside the ringed element as the element itself, so a covering descendant read as clean and the new test passed against the broken card. It now reports a positioned descendant that paints over the ring, unless the ring's own carrier is a positioned `::after` at a z-index at or above it. With that, the corpus sweep found a second case already on main: in `pr-walkthrough`, an `lf-code` note row (sticky, opaque) thinned the focused block's ring to 1px where it crossed. `lf-code` now draws that ring on the host's `::after`; the `<pre>` scrolls, so the host, whose box is the `<pre>`'s, carries it, as `.lf-threads-frame::after` does for the Threads list. ### Tests - `test_a_card_s_thread_ring_closes_under_its_reply_row` opens a card from the keyboard and requires the thread's ring whole. It passed on main under the old check and fails there under the new one, naming the reply row; it passes with the fix. - `test_an_inline_thread_wears_the_ring_only_while_the_keyboard_stands_on_it` reads the ring from whichever box carries it. - `test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus` fails on the `lf-code` note under the new check and passes with its fix. Its `SEEN_STOP` reading credited one overlay carrier by name (`.lf-threads-frame`); it now accepts a named ring on the stop's or an ancestor's `::after`, which covers all three. Local: `uv run pytest tests` 1467 passed; `npm run test:runtime` 147 passed; `test_render_controls.py` and `test_render_widgets.py` 287 passed. Across the margin, threads, controls, navigation, drafts, anchors, aim and chrome-contract files, five tests fail here and fail identically on main (64186bc). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The ring bug #1303 shipped came from a padding moved for geometry, checked by measuring positions only. The screenshot rule lived in /developing-leaf, which the agent making the change never loaded. skills/leaf/assets/AGENTS.md, which agents read before changing the runtime or theme, now points at it, and the rule names the states beyond rest (focused, drafting, scrolled) where such a change shows. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Sep 27, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 27, 2026
Agents proving a visible change wrote their own Playwright screenshot script each time: 140 throwaway scripts across 43 Leaf sessions and subagents in two weeks. The session behind #1303 took none, and a padding change there covered the focus ring of a keyboard-opened margin card until #1329 fixed it. `uv run scripts/stills.py [BASE_REF]` replaces those scripts with one opt-in command, about three minutes unattended. Nothing gates on it. It screenshots a fixed catalogue of 15 states on the merge base's runtime and HEAD's, each built by that arm's launcher from this checkout's example source and served by that arm's `leaf server run --temporary`. The catalogue covers states a user reaches by acting as well as pages at rest: a margin card opened by pointer and by keyboard, a reply being drafted, the Threads panel, a comment being composed, a board card grabbed, a focused code block, with some repeated at 900px and in dark mode. Each state that changed is cropped to a before/after pair plus a diff under `.tmp/stills/`, with an `index.html` listing changed and failed states first. A state counts as changed when any pixel differs: with the same runtime on both arms every state captures pixel-identically, so no noise threshold is needed. Run against the commit before #1329, it flags exactly the two ring regressions that PR fixed, plus the Threads panel's "Generating title" placeholder from #1330. - `scripts/stills.py`: the catalogue (`STATES`), the input that reaches each state, and the pixel diff. - `scripts/eval_harness.py`: `serving` (start an arm's temporary server and yield its address) and `merge_base`, moved out of `bench_page_latency.py` so both scripts share them. - `/developing-leaf` "Prove and hand off a visible change" and `skills/leaf/assets/AGENTS.md` "Render gates" name the script as the way to get the before/after pair, and say to add a missing state to `STATES` rather than drive it by hand. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
A margin card whose thread held the keyboard's focus drew its ring on three sides: the bottom run was missing under the Reply box. #1303 moved the thread's 4px foot padding into the sticky reply row, so the row reached the thread's bottom edge. The ring is an inset outline, and an outline paints with its box's in-flow content; the row is positioned, so it paints afterwards, and its opaque surface covered the bottom run.
The page thread now draws its ring on a
::afterover its contents. The pseudo-element is positioned and follows the row in tree order, so it paints over it with no z-index that would also lift it over the page. The card no longer sets its threadposition: static, a leftover from when its head was absolutely placed against the card. The reply row keeps #1303's padding, so it still does not drop 4px when the transcript starts to scroll.The ring check had the same blind spot.
RINGS_DRAWNtreated any box inside the ringed element as the element itself, so a covering descendant read as clean and the new test passed against the broken card. It now reports a positioned descendant that paints over the ring, unless the ring's own carrier is a positioned::afterat a z-index at or above it. With that, the corpus sweep found a second case already on main: inpr-walkthrough, anlf-codenote row (sticky, opaque) thinned the focused block's ring to 1px where it crossed.lf-codenow draws that ring on the host's::after; the<pre>scrolls, so the host, whose box is the<pre>'s, carries it, as.lf-threads-frame::afterdoes for the Threads list.The change that lost the ring was checked by measuring positions only; the screenshot rule lived in
/developing-leaf, which the agent making it never loaded.skills/leaf/assets/AGENTS.md, which agents read before changing the runtime or theme, now says the render gates judge contracts rather than looks and points at that rule, and the rule asks for stills of each state a change touches (focused, drafting, scrolled), not only the page at rest.Tests
test_a_card_s_thread_ring_closes_under_its_reply_rowopens a card from the keyboard and requires the thread's ring whole. It passed on main under the old check and fails there under the new one, naming the reply row; it passes with the fix.test_an_inline_thread_wears_the_ring_only_while_the_keyboard_stands_on_itreads the ring from whichever box carries it.test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpusfails on thelf-codenote under the new check and passes with its fix. ItsSEEN_STOPreading credited one overlay carrier by name (.lf-threads-frame); it now accepts a named ring on the stop's or an ancestor's::after, which covers all three.Local:
uv run pytest tests1467 passed;npm run test:runtime147 passed;test_render_controls.pyandtest_render_widgets.py287 passed. Across the margin, threads, controls, navigation, drafts, anchors, aim and chrome-contract files, five tests fail here and fail identically on main (64186bc).🤖 Generated with Claude Code