You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Resume writing leaves the combined-selection passage above the window #5182
Resume writing fails its original-passage visibility check with y=-3.046875 and height=27.1875. This is a geometry failure before the returning-frame compositor check and differs from #4469’s missing raster evidence; do not conflate them without reproduction.
Failed: Resume writing did not reveal its original passage; last reading was {'x': 105, 'y': -3.046875, 'width': 422, 'height': 27.1875}
> wait_for(
This report triage has not run a local reproduction or established the cause. Reconcile current main, existing repairs and active workers, reproduce the focused boundary, then repair the owner of the rule. Split independent mechanisms if the grouped observations require different fixes. The complete failed log and pytest-results artifact on each run retain the traceback and screenshots.
Status: cause found and reproduced on current main (0e29ca14b). No fix yet: the two simple repairs I tried each break one side of the conflict.
Cause: #4833. That PR added a rule (annotation-chrome.css) that sets the root's scroll-padding to 0 whenever a floating comment box or card holds focus. The goal was to stop Chromium's native caret reveal from scrolling the document under a floating editor. But Leaf's own landings read that same scroll-padding as their landing band (geometry.js, landingBand). Resume writing focuses the editor (anchor-travel.js#L171) and then places the passage in the same task (#L187). So it lands with a 0px band, where it should get the 12px landing room plus any head room (base.css#L301). The selected words' line box ends up flush with the window top, and the paragraph box sits 3px above it, which is the y=-3.046875 in the report. clearFor/landedBox run before the focus, so in that one task they read a different band from the scroll that follows.
On pages with a head room the same landing would put the passage under the top chrome. Any other script landing made while a floating editor holds focus reads the 0px band too.
Locally, [combined-selection] fails every time on main. With only Keep floating-editor caret reveals from scrolling the document #4833's rule neutralised it passes. A debug read after g i shows root scroll-padding-top: 0px and --lf-head-room: 0px, with the pane at scrollTop 0.
Limit the override to an edit: a leaf-text:state(editing) set in #beforeEdit. Clearing it at input covers neither regression, because the reveal comes later. Clearing it two frames later covers the rewrite case but not grows_back, whose first scroll comes from double-click → Enter with no edit. The native reveal also follows selection and focus in a focused floating editor, so the override really is needed for as long as the editor has focus.
Scroll before focus in arrive's place: this would fix Resume writing. But an arrival that starts from a focused floating editor would then scroll while that editor still holds focus, and land with the 0px band. Not tried, since it moves the bug rather than removing it.
Left: have Leaf's landings read the root's band from its declared custom properties rather than from computed scroll-padding, so the override changes only what the browser's native reveal and scroll anchoring see. That changes geometry.js's contract that landings and scrollIntoView share one band, and it means checking motionBand, which mirrors Chrome's anchoring band, against the override. That is the next experiment for whoever picks this up. The test on main already reproduces the failure, so no separate reproduction PR is needed.
Activity
leaf-agent commentedon Nov 3, 2026
Status: cause found and reproduced on current
main(0e29ca14b). No fix yet: the two simple repairs I tried each break one side of the conflict.Cause: #4833. That PR added a rule (
annotation-chrome.css) that sets the root'sscroll-paddingto 0 whenever a floating comment box or card holds focus. The goal was to stop Chromium's native caret reveal from scrolling the document under a floating editor. But Leaf's own landings read that samescroll-paddingas their landing band (geometry.js,landingBand). Resume writing focuses the editor (anchor-travel.js#L171) and then places the passage in the same task (#L187). So it lands with a 0px band, where it should get the 12px landing room plus any head room (base.css#L301). The selected words' line box ends up flush with the window top, and the paragraph box sits 3px above it, which is they=-3.046875in the report.clearFor/landedBoxrun before the focus, so in that one task they read a different band from the scroll that follows.On pages with a head room the same landing would put the passage under the top chrome. Any other script landing made while a floating editor holds focus reads the 0px band too.
Evidence
cirun onmainI checked from 41330645337 (7c1e4494a) through 41707867482. It passed in 41322860278 (792abf43c). Keep floating-editor caret reveals from scrolling the document #4833 (06aa939b0) is in that range.[combined-selection]fails every time onmain. With only Keep floating-editor caret reveals from scrolling the document #4833's rule neutralised it passes. A debug read afterg ishows rootscroll-padding-top: 0pxand--lf-head-room: 0px, with the pane atscrollTop 0.test_a_rewrite_leaves_a_card_at_the_windows_foot_as_it_stoodandtest_a_card_at_the_windows_foot_grows_back_to_how_it_stood) fail again: the document scrolls 1421 → 1427/1435. So reverting the rule brings Thread rewrites shrink cards held at the window foot #4821 back.Repairs tried, and the ones left
leaf-text:state(editing)set in#beforeEdit. Clearing it atinputcovers neither regression, because the reveal comes later. Clearing it two frames later covers the rewrite case but notgrows_back, whose first scroll comes from double-click → Enter with no edit. The native reveal also follows selection and focus in a focused floating editor, so the override really is needed for as long as the editor has focus.arrive'splace: this would fix Resume writing. But an arrival that starts from a focused floating editor would then scroll while that editor still holds focus, and land with the 0px band. Not tried, since it moves the bug rather than removing it.scroll-padding, so the override changes only what the browser's native reveal and scroll anchoring see. That changesgeometry.js's contract that landings andscrollIntoViewshare one band, and it means checkingmotionBand, which mirrors Chrome's anchoring band, against the override. That is the next experiment for whoever picks this up. The test onmainalready reproduces the failure, so no separate reproduction PR is needed.Let Home stop a glide that hasn't moved the page, and keep the error …