Repository navigation
Close a panel view that would cover where travel lands - #4515
Conversation
Walking On me with `m` from a thread opened in the floating panel to a choice on the page left the thread's view standing over that choice: the landing keeps clear of an open view through the root's scroll-padding, but a long thread's view leaves too little room above it, and a place near the page's foot can't scroll above even a short one. Leaf used to clear such a surface on every trip (`clearFor` in auxiliary-surfaces.js); removing the classic chrome in #3100 dropped that step and left only the thread-to-card case. Travel now asks the panel, in `arrive`, whether its open view would cover any of the destination where the landing leaves it, and the view goes if so. `landedBox` (landing-scroll.js) reads that landing by the same arithmetic the move makes, and geometry's occluder measure, `coveredShare`, answers for the landed box. Every route through `arrive` shares it: `m`, `t`, Go-to, Show, fragment links and datum references. A Tab onto a page stop the view would cover clears it too. A view the landing clears stays, so a link followed from a thread's view still leaves it open for Back, and On me stays because it rings the walked item's card. Validation: a new browser test walks from a panel thread to a choice the view leaves in sight (the thread stays) and one at the page's foot (it goes), and fails without the change. 71 panel, walk, travel and Tab browser tests and all runtime tests pass; the one intermittent failure, test_an_arrival_region_fits_above_the_floating_panel, fails the same way on the base under load. Probed in Chromium and Firefox at 1280x900 and 390x844.
# Conflicts: # browser/runtime/floating-panel.js # dist/kernel/kernel.json # dist/kernel/runtime/bundle-data.js # dist/kernel/runtime/bundle-geometry.js
…ove it When a walk goes on from a thread open in the panel to a stop on the page that the view leaves in sight, the view stays open (the user's pick on the review page: the walk prioritizes the next item rather than closing whatever it moves off). The field still read "Reply · Your turn" for the thread left behind, with the walk's position squeezed into its 40% aside and cut to "1 of 3 waiting on me ·…". While the user stands outside the panel and a walk's position is shown, the open thread's field now says that position as its words. The 22 October rule, Reply with the walk's position at the end, still holds while the user is in the thread; focusing the field still says "Reply in this thread". The travel test now checks the field's words at the stop the view leaves open.
# Conflicts: # dist/kernel/kernel.json
The travel rule exempted On me whenever it stood open, guessing from "On me is showing" that its ringed card shows wherever travel lands. That holds for `m`, whose stops are On me's items, but not for `t` to a thread On me doesn't list: with On me open, `t` to a thread at the page's foot left the list over 75% of the passage. The queue walk now answers whether On me lists an item at a node (`onMe.lists`, by the rule a walk standing there would be on it), and the panel keeps On me only where it does. Travel hands the panel the whole destination, so that question reads the place the user lands on. A new test covers `m` keeping On me open and `t` to the foot putting it away; the second fails without this change.
leaf-agent
left a comment
There was a problem hiding this comment.
[P2] Include enclosing scrollers in the landing prediction
landedBox takes only the first result from scrollersOf, whereas scrollIntoReadingBand also moves its enclosing regions. This leaves the reported problem unfixed for destinations inside bounded content: the predicted box can remain below the viewport, so clearFor sees no overlap, then the enclosing page scroll lands the focused destination behind the open panel. Share the complete placement calculation between prediction and scrolling, including enclosing scrollers, so clearing is decided from the actual final position.
Verified reproduction
In Chromium at 1280×900, place an options obligation at the end of a 220px-high data-bound="start" block near the page's foot, with enough preceding content to scroll the page. Add a long unanchored thread whose agent reply waits on the user. Walk with m to the obligation and then the thread, wheel the page back to the top outside the panel, and press m again. The obligation receives focus, but the thread view stays open over its controls. The prediction was y=1807–1948; the actual landing was y=591–732, inside the panel's y=134–842. seenRect reported only a 90px-wide strip of the 720px destination visible.
# Conflicts: # browser/runtime/floating-panel.js # dist/kernel/kernel.json # dist/kernel/leaf.js
`landedBox` read only the innermost reading region's move, while `scrollIntoReadingBand` goes on to move each enclosing region. A destination inside a bounded block was predicted where the block's own scroll left it, often below the window, so the open view seemed to cover nothing, and the page's scroll then landed it behind the view (the review's case on #4515: a choice at the end of a bounded block at the page's foot, `m` from a panel thread with the page scrolled to its top). Both now read one plan, `readingBandMoves`, the moves a landing makes region by region and how far they carry the destination together, so the prediction and the scroll can't disagree. A new test walks that case and fails without this change.
# Conflicts: # browser/runtime/floating-panel.js # dist/kernel/kernel.json # dist/kernel/leaf.js
# Conflicts: # browser/runtime/floating-panel.js # dist/kernel/kernel.json # dist/kernel/leaf.js # dist/kernel/runtime/bundle-geometry.js # dist/kernel/runtime/geometry.js
# Conflicts: # dist/kernel/kernel.json
The obligation-walk test tried to focus a reply control after travel had closed and removed its panel. #4515 deliberately closes a panel view that would cover the destination; the test now verifies that closure and reopens the reply through Threads before exercising its control. The final assertion still checks that backward travel measures from the reply obligation rather than the earlier page stop. Product behavior is unchanged. The reported test fails on current main at `pick.focus()` with a 120-second timeout and passes with this setup repair. Closes #4528 — automated triage Co-authored-by: leaf-agent <[email protected]>
Walking On me with
mfrom a thread open in the floating panel to an item on the page could leave the panel's view standing over that item. The landing already scrolls a destination above an open view (the root'sscroll-padding-bottom), but a long thread's view, or any view at phone width, leaves too little room, and an item near the page's foot can't scroll that high. Leaf used to clear such a surface on every trip (clearForinauxiliary-surfaces.js); removing the classic chrome in #3100 dropped that step.The rule
Travel shows where it lands.
arrive(anchor-travel.js), the one arrival every route uses (m,t, Go-to, Show, links,navigateToDatum), now asks the panel before moving focus whether its open view would cover any of the destination once landed, and the view closes if so. A Tab onto a page stop runs the same check.landedBox(landing-scroll.js) reads where the landing will leave the destination from the same plan the scroll carries out (readingBandMoves: each region's move, from the one holding the destination outward, ends of scroll ranges included). An arrival that scrolls nothing is measured where it stands.coveredShare(geometry.js) is the occluder measure, now able to take that landed box;hideskeeps its more-than-half threshold for the composer's seat check. What holds the surface (the chrome's dialog, which Firefox's Shift+Tab can stop on) is not covered by it.clearForcloses the view.What stays open, by the maintainer's picks on the review page
turnLead) name the walk's position alone, without the left thread's turn.onMe.lists, from the queue walk), since its card shows that item, ringed wheremreached it.tto a thread On me doesn't list gets no such exemption.Testing
Three new browser tests in
tests/browser/navigation/test_on_panel.py:mfrom a panel thread keeps it over a stop it leaves in sight and closes it at the page's foot; the same at the end of a bounded block, where the page's scroll follows the block's (the review's case);mkeeps On me whiletto a foot thread closes it. Each fails without its change. The panel, walk, travel, link, Tab and On me browser tests pass locally, as do all runtime tests;test_an_arrival_region_fits_above_the_floating_panel,test_reply_editing_and_saved_words_have_separate_resolution_lifetimes[panel-user]andtest_one_field_starts_a_thread_takes_its_reply_and_settles_itfail the same way onmain, as dotest_a_thread_walk_starts_one_page_trip_and_reveals_its_nested_passage,test_a_turn_arriving_leaves_a_user_who_scrolled_away_from_their_box_reading[bounded-short]andtest_monitoring_evidence_moves_without_stealing_position_or_the_summaryon this loaded machine. Probed in Chromium and Firefox at 1280×900 and 390×844, including an anchored thread opened through the card's Open in panel.