Repository navigation
Give view selection, native observation and clipping one owner - #4852
Merged
Merged
Conversation
Let the browser evaluate view membership, end parser-time native observation when the runtime watcher starts, and share layout-shift collection without merging evidence windows. Keep native authored defaults and CSS first-paint placement. Trace comparisons now require each substantive child to contain a recording.
Remove the margin ancestor walk and use the canonical clipping reader up to each stable seating boundary. This keeps positioned and slotted targets commentable while preserving viewport, sticky-cover and scroller policies. Cover the complete escaped-target comment interaction; make the sticky-strip check scroll by the actual pin and the strip height rather than its pre-scroll position.
# Conflicts: # browser/layouts.css # dist/kernel/kernel.json # dist/kernel/runtime/bundle-comment-placement.js # packages/playwright/widgets/lf-trace-compare.js
leaf-agent
approved these changes
Oct 31, 2026
This was referenced Nov 1, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 1, 2026
Four browser tests closed borrowed pages before fixture teardown could read their health. Remove those closes and the cleanup-only try/finally blocks, leaving the browser fixture to read health, cancel routes and close contexts. All behavioral assertions remain. The ownership audit fails on the original four closes and passes after this change. The focused selection reports five passes (ownership, first replay, observation windows and both delayed-shift cases). Ruff and Python compilation pass. The native-layout case still fails because its exhibit shrinks from 189.25px to 187.96875px; the same failure reproduces on current main at `769a84cf1`, and is owned by #4985. This preserves the native layout and rendering lifecycle introduced in #4724 and the observation-window coverage in #4852; only teardown ownership changes. Closes #4926 — automated triage Co-authored-by: leaf-agent <[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.
View membership was evaluated by both Python and the browser, parser-time content observers kept running after the runtime took ownership, and margin annotations used a clipping walk that disagreed with native hit testing. Give each of these rules one owner: the browser evaluates selectors, runtime arrival observation replaces the startup observer, and margins consume the shared clipping geometry. A visible button that escapes an intermediate clip now retains its comment control.
The render checks also share layout-shift collection while preserving their separate observation windows and retaining anonymous sources in the single startup summary; passive advice names only locatable sources. Every direct child of a trace comparison must now contain a recording; shared introductory text belongs outside. This lets the browser hide later recordings during parsing. At widths where the prose and note fit exactly, the note now stands beside its passage instead of wrapping. Shared geometry now follows rendered ancestry through slots and shadow trees, so all geometry consumers use the same clipping rules.
This is an ownership consolidation, not a large line-count reduction. Tests account for most added lines. Generic selectors can still change membership while parsing; authored-state capture and revision continuity remain necessary.
Validation: browser bundle build and full pnpm check (713 runtime, 29 build and 88 Worker tests); focused browser checks for initial trace selection, sidebar placement and an annotation whose target escapes clipping. Prior focused cases cover observation windows, reconnects, scrollers, slots and sticky headers. Independent Opus review approved the consolidation after removing unlocatable passive advice and duplicate sidebar coverage.