Skip to content

Give a reading key the page can't take to its largest pane, and keep the page ahead of it - #5456

Merged
max-sixty merged 14 commits into
mainfrom
grind/g-workspace-fallback
Nov 9, 2026
Merged

max-sixty merged 14 commits into
mainfrom
grind/g-workspace-fallback

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

On a fresh workspace load, j, k, d and u move nothing: nothing names a pane yet, and the page they go to has nothing to scroll. With this change, a step the page can't take goes to the page's largest pane, and names it. This is a new policy, taken as a call Max may reverse; the repair it builds on is #5425.

Refs #4062. The focus mark on the active pane and the key that moves from pane to pane stay postponed until a user loses track of the active pane, or tabs through a pane to reach the next one.

The diff against main is +338/−14 across 4 files: browser/runtime/navigation.js, browser/runtime/reading-regions.js, docs/ui.html and tests/browser/navigation/test_panes.py.

The rule

With no region named, the page takes each step it can.

  • A step down the page can't take goes to the largest shown region on the page with room below. Area is counted in whole pixels. Of two the same size the one with the most to scroll goes first, then the first in reading order.
  • A step up chooses a region the same way, but only while the window holds all of main, top and bottom: on a page that doesn't scroll, or on one that scrolls only by a footer after main. On a long page, k at its top moves nothing, as it does today, and so does a short main that a site header pushes past the window's foot.
  • After a step chooses a pane, the page stays ahead of it in both directions until the user acts: a press, a wheel, a touch or an arrival. u gives the page back the height of a header or footer beside main before the pane moves, and j takes it again first. The chosen pane is still named for walks, so m goes on from where the steps reached.
  • A region the user named keeps the keys, even with nothing to scroll.

The code is regionForStep, mainFits and stepReading in navigation.js, and chooseReadingRegion and chosenReadingRegion in reading-regions.js. userReadingRegion doesn't change here, so z and walks answer as they do on #5425 until a step chooses a pane.

How a step finds the largest pane

At the key, regionForStep reads the box each unconcealed region's body shows as (shownBox, the box shownRect clips), clipped to the window, and sorts the regions by that area, largest first. No region shows more of itself than that box within the window, so the walk measures what each region shows only until it reaches a box smaller than the most a region has shown. A pane off screen has a box of 0 there, so only the panes on screen are measured. A key held while the runtime loads reads the same rects when it replays.

Review findings

Each finding was measured in Chromium and Firefox, except the cost, which was measured in Chromium.

  • A header or footer beside main gives the page a little scroll: 53 and 125 px on my test pages, 89 and 125 px in the review's. The first version gave the page the keys whenever it could scroll at all, so j moved the page twice and then nothing. Now the page takes what it can and the pane takes the rest.
  • Ranking: the first version ranked by box area alone, so of two equal panes it took the first, and on current-proposed-comparison that one is the shorter. The second ranked by scroll range alone, and at 900x600 on alert-review it moved the side list rather than the item beside it. Area, then range, picks the item panel there and Proposed on current-proposed-comparison.
  • The stray k: the second version let k at a long page's top choose a following log in view. With lines arriving, the log was left short of its newest entry and stopped following, and later keys moved the log rather than the page. A step up now chooses only while the window holds all of main. That still lets a fresh k move a workspace's following log back from its newest entry, which choosing only on a step down would not.
  • k after a hand-off never returned the page, so 89 or 125 px stayed scrolled. A chosen pane now stays behind the page.
  • Per-keystroke cost (Tend's review): choosing measured every region's shown box and scroll range on the keystroke, so the first j at 801 panes spent 23 to 31 ms in its keydown handlers, against the 8 ms root AGENTS.md gives a keystroke. It now spends 2.1 to 2.3 ms there (see "Cost").
  • Equal panes measured whole (independent review of an intermediate version, which ranked by areas a size observer recorded): equal boxes tie at the stopping edge, so with 801 panes in 300 px rows, the workspace body at its end and the page's title clicked, the first j still measured every pane, 12.1 ms. Clipping each box to the window gives the panes off screen a box of 0; that state now takes 2.8 to 3.0 ms.
  • k beside a footer (Tend's review, below its bar): the step up asked whether the page scrolls, so on a fresh workspace with a footer after main, k moved nothing, where the same workspace without the footer moved its log. It now asks whether the window holds all of main.
  • main's height is not containment (independent review): the intermediate version compared main's height with the window's, so a fresh k moved a following log on a column page whose 825 px main starts about 330 px down a 900 px window. mainFits now asks whether main's top and bottom both stand inside the window.
  • Tab into a pane the keys chose (Tend's review, below its bar): not reproduced. On the footer and header test pages in Chromium, after the keys chose the detail pane, Tab into it and then j and u moved the pane and left the page where it stood, as on main for a pane the user tabbed into. Tab itself scrolled the page by 41 or 53 px to show the focused pane, which Tab on main does too.

Evidence

From a fresh load at 1440x900 unless stated, by real key presses. In the "here" column Chromium and Firefox moved the same amounts on every row.

Page First j on main First j here
rust-sort nothing Source pane, 60 px
review-queue nothing detail pane, 60 px; the queue stays
alert-review nothing queue list, 60 px, its only region
alert-review at 900x600 not run item panel (586 px wide), 60 px; the list (288 px) stays
current-proposed-comparison nothing Proposed pane, 60 px; Current stays
code-comparison nothing preview, 22 px, its whole range

The "on main" column is Chromium on every row, and Firefox on rust-sort and review-queue, the two pages I ran there.

Down and back, j j d d u u u u, with the rail beside the detail pane staying at 0 throughout:

  • Footer beside main (page range 125 px): the page moves to 60, 120 and 125, then the detail pane to 421. The first u returns the page to 0 with the pane still at 421, and the next returns the pane to 0.
  • Header beside main (page range 53 px): the page moves to 53, then the pane to 60, 524 and 732. The first u returns the page to 0, then the pane goes to 268 and 0.

At a long page's end with a log in view, j j moves the log to 60 and 120, and k k then moves the page up by 60 and 60 while the log stays at 120. These probes gave the same output on this version as before the cost change, in both engines.

k j j k k from a fresh load on pages with a log at its newest entry, the same in both engines:

Page First k Then
Workspace log back 60 px j returns the log; k k move it back
Workspace with a footer after main log back 60 px j j move the page; k k return it
Workspace with a header above main nothing j moves the page 53 px; k returns it
Column page, log at the top of a long main nothing the page takes every step
Column page, short main below a 330 px site header nothing the page takes every step
Column page, short main above a tall site footer log back 60 px the page takes every step

Cost

The PR's pages are workspaces of 801 panes in a ten-column grid, each pane holding a 400 px paragraph; the panes are too short for their own headers, so the workspace body overflows and, as the largest region, takes a fresh j. The review's page sets the same panes in 300 px rows; its state scrolls the workspace body to its end and clicks the page's title, which names the page, so the first j chooses among the panes. Each journey reads, for each keydown:

  • handlers: from a window capture listener, which runs before Leaf's document capture listener, to a document capture listener added after Leaf's;
  • dispatch: from the keydown to a MessageChannel message posted at it, the reading the earlier versions of this PR reported. It also counts any frame the browser runs before that message, here the first frame of the glide the step starts;
  • main-thread time: Chromium's TaskDuration over the 450 ms after the key.

Three rounds of uv run leaf-dev probe <page> --journey <journey> --viewport macbook --base 567c1e78b, alternating the two pages, at load 5 to 10. 567c1e7 is this PR before the cost change, and each probe runs it and this version back to back. Times in ms, at 801 panes:

Reading Before Here
Fresh load, first j, handlers 23.5, 31.4, 23.6 2.1, 2.3, 2.1
Fresh load, first j, dispatch 24.6, 32.5, 41.9 11.3, 13.1, 3.6
Fresh load, k with no pane to move, handlers 2.0, 2.6, 2.1 1.6, 1.7, 1.5
300 px rows at the body's end, first j, handlers 20.8, 12.0, 11.7 2.9, 3.0, 2.8
300 px rows at the body's end, first j, main-thread time 73.8, 62.7, 59.7 52.4, 51.5, 52.5

The key's own work fits the budget in both states. Each region still costs one rect read and its concealment checks at the key. The dispatch reading mostly measures the glide's first frame whenever the browser runs it before the message, and a j in the named workspace body on main read 28 to 29 ms there on an earlier run. The main-thread time after a j is mostly that glide's frames: in a profile, most of it was the reading-place recorder (recordPlaces in version.js, through blocksOnScreen in reading-place.js), which a j in the named body on main pays as well.

What I ran

  • tests/browser/navigation/test_panes.py, tests/browser/projection/test_reading_position.py, tests/browser/widgets/test_workspaces_and_bounds.py, and the 21 tests elsewhere that press a reading key or read a workspace walk, by node id, at two workers: 120 passed.
  • pnpm run test:runtime (898) and pnpm run check:browser.
  • Each new part reverted alone, reading which test catches it:
    • the walk stopping at a box equal to the most shown, which skips the second of two equal panes: both cases of test_of_two_panes_the_same_size_on_screen_the_one_with_more_to_scroll_takes_the_step time out. test_the_page_hands_a_step_it_cannot_take_to_its_largest_pane_and_takes_it_back passes with it, since its footer clips both panes as the page scrolls, which is why the new test exists;
    • mainFits by main's height: test_a_step_up_goes_to_a_log_only_where_the_window_holds_main[site-header] fails;
    • a step up choosing only on a page that doesn't scroll: the same test's [workspace-footer] case times out.
  • Each part of the earlier versions removed alone, run before this change and reported in the earlier description, with the step-up test under its earlier name: no fallback, the old page-can't-scroll-at-all guard, ranking by area alone or by range alone, and the chosen pane treated as named fail test_the_page_hands_a_step_it_cannot_take_to_its_largest_pane_and_takes_it_back; a region before the page fails that test and test_a_step_up_goes_to_a_log_only_where_the_window_holds_main[long-page]; no name on the chosen pane fails the first, where m doesn't reach #second; a step up choosing on any page fails [long-page], where the log moves 60 px off its newest entry.

I did not run WebKit, or leaf page check --render over the corpus. leaf-dev bench generates no page of panes, so the cost readings come from the probes above, not from the bench. This adds no work on the startup path, so I made no base and head startup comparison.

Calls Max may reverse

  • The rule at all. Leaving the keys dead until the user acts in a pane is the alternative, and it needs no code. Record no page place for a key pressed with nothing focused, and give focusInPage one home #5425 stands either way.
  • The page ahead of a chosen pane in both directions, rather than the pane first and then the page, as native scroll chaining orders an inner box and its outer one. The page carries the pane, so the reader sees the text move by each step either way. This order also leaves a k to the page after a j at a long page's end has moved a log. The cost is that the log stays where that j left it.
  • Area before range. A long narrow rail never wins over a wider pane with less to scroll. That matches what the review found on alert-review, and the range tie-break keeps Proposed on current-proposed-comparison.
  • Whether the window holds all of main as the test for a step up. A workspace with a header above main fails it, so a fresh k there moves nothing, as before this PR. A short page with a tall site footer passes it, so k at its top moves a log in view there.

Still failing

Space, PageDown and the arrow keys on a fresh workspace move nothing in Chromium or Firefox (rust-sort), since they stay the browser's own keys and focus stands on the body.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 6 commits November 4, 2026 23:25
…press in it

In a workspace, j, k, d and u moved nothing from a fresh load, and since #5228 they also
moved nothing after a click on a pane's words or a wheel in it. The first press now moves
the page's largest pane with more to show, and a press or wheel in a pane gives that pane
the keys.

#5228 widened pageDocument() to body, so inPage(document.body) became true, and focus on
the body, which stands on nothing, read as standing in the page. focusInPage answers that
question once for userReadingRegion, pageReadingRegion and version.js's place recorder,
whose page place outranked the one the reader made in a pane. With nothing named,
mainReadingRegion answers where the page has nothing to scroll, and a step the keys take
names its region as a wheel does, so a walk goes on from where it reached.

Closes #4062. The focus mark and the pane-to-pane key stay postponed until a user loses
track of the active pane.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Takes mainReadingRegion, actedIn and their tests and docs off this branch, for a separate
proposal, and returns #4062's reference to Refs. What stays is focusInPage, which the three
readers #5228 changed ask: userReadingRegion, pageReadingRegion and version.js's place
recorder. A new test holds the wheel and the walk from a pane, with the rail holding the
most to scroll so that a pane chosen for the user can't pass it.

Refs #4062

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…croll

On a fresh workspace load, j, k, d and u moved nothing: nothing names a pane yet, and the
page has nothing to scroll, or only the height of a header or footer beside main. With no
region named the page now takes the step while it can, and a step it can't take goes to the
shown region with the most to scroll in that direction, the first in reading order of two
that tie. That step names the region, so later keys and a walk go on from there.

Choosing reads every region, and only a step with no region named that the page can't take
pays for it. This is a new policy for Max to decide; it sits on the repair in #5425.

Refs #4062

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…first

Review of the fallback found three faults, each measured in Chromium and Firefox:

- `k` at a long page's top chose a following log in view, which then stopped following,
  and later keys moved the log rather than the page. A step up now chooses only on a page
  that doesn't scroll, which still lets a fresh `k` move a workspace's following log.
- Ranking by scroll range alone moved alert-review's side list at 900x600 rather than the
  item beside it. Panes now rank by area in whole pixels, then range, then reading order,
  which still picks Proposed on current-proposed-comparison.
- After a hand-off `k` never returned the page the height of a header or footer beside
  main. A chosen pane now stays behind the page in both directions until the user acts
  (`chooseReadingRegion`, `chosenReadingRegion`).

Refs #4062

Co-Authored-By: Claude Opus 5.5 <[email protected]>
test_motion_preference_changes_are_heard_without_reloading stubs requestAnimationFrame
and reads a frame request after `d` as the glide starting. rendering.js asks for a frame
only when none is pending, so a frame already queued takes the glide's first tick without
a new request, and the count read 0. On main the keydown recorder, which focusInPage now
stops for focus on the body, happened to make the request, so the test failed alone on this
branch and passed in a batch. It now lets the page render what it queued before stubbing.
With the tick's own reduced-motion check removed it fails, "an active glide kept moving".

Refs #4062

Co-Authored-By: Claude Opus 5.5 <[email protected]>
test_motion_preference_changes_are_heard_without_reloading stubs requestAnimationFrame
and reads a frame request after `d` as the glide starting. rendering.js asks for a frame
only when none is pending, so a frame already queued takes the glide's first tick without
a new request, and the count read 0. On main the keydown recorder, which focusInPage now
stops for focus on the body, happened to make the request, so the test failed alone on this
branch and passed in a batch. It now lets the page render what it queued before stubbing.
With the tick's own reduced-motion check removed it fails, "an active glide kept moving".

Refs #4062

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@max-sixty max-sixty changed the title Give a reading key the page can't take to the pane with the most to scroll Give a reading key the page can't take to its largest pane, and keep the page ahead of it Nov 5, 2026
#5468 landed the same body-focus predicate for userReadingRegion and pageReadingRegion,
as a local focusInPage in reading-regions.js, and its own fix to the motion test. This
keeps main's motion test, and keeps one focusInPage, in passages.js with main's wording,
since version.js's place recorder, which main left on inPage, reads it too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e-fallback

Carries #5425's merge with main: one focusInPage in passages.js, and main's motion test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The choice scans every region on each press, and the description's own numbers put it outside AGENTS.md's Responsiveness budget: the first j at 801 panes takes 26 to 33 ms against the 8 ms a keystroke gets on the largest scaling page, and a key that finds no pane (k on a fresh workspace) pays the scan on every press. That section also asks that an input's work not grow with how much the page holds, so a ranking redone for the whole page on a keystroke is the shape it rules out. Inline note below on one way to keep the rule without the scan.

Comment thread browser/runtime/navigation.js Resolved
max-sixty added a commit that referenced this pull request Nov 5, 2026
… focusInPage one home (#5425)

A key pressed with focus on the body, which is where focus stands after
a click on words or a wheel, no longer records a place for the page.
That place outranked the one the reader made in a pane, so a window
narrowed afterwards left them at the top of the page rather than on the
paragraph they had read. Recording it on every keydown also cost 303.8
ms per key on a workspace of 801 panes.

Refs #4062. That issue's fresh-load gap, where the keys move nothing
before the user acts in any pane, stays open here; choosing a pane for
the user is proposed separately in #5456.

## Cause

#5228 widened `pageDocument()` from `main` to `body`, so
`inPage(document.body)` became true. The browser gives the body focus
whenever focus stands on nothing. Three readers asked whether focus
stands in the page, and each then answered yes. #5468 fixed two of them,
`userReadingRegion` and `pageReadingRegion`, with a local `focusInPage`
in `reading-regions.js`, and fixed
`test_motion_preference_changes_are_heard_without_reloading` too. The
third, `recordCurrentLocation` in `version.js`, still reads `inPage` on
`main`.

## Change

`focusInPage` moves to `passages.js`, beside `inPage`, and all three
readers import it: one home for the question, with #5468's wording.
`browser/AGENTS.md`, "One answer for each question", names it.

## Evidence

A wheel in a pane, a key, then a window narrowed to 520 px, in Chromium:
on the parent of #5228 and on this branch the page returns to the
paragraph the reader had reached (`scrollTop` 941). With `inPage` back
in the recorder it stays at 0.

Keydown dispatch for a key pressed with focus on the body, on a
workspace of N panes, in ms. The `main` figures are one run at
22accdd, and this branch's the range over three rounds before the
merge:

| Panes | `main` | This branch | Only the recorder back on `inPage` |
| ----- | ------ | ----------- | ---------------------------------- |
| 51    | 2.7    | 0.4 to 0.8  | 2.6                                |
| 201   | 21.6   | 1.0 to 1.3  | 23.8                               |
| 801   | 303.8  | 1.4 to 1.9  | 310.1                              |

On `main`, four times the panes cost 8 to 14 times as much per key,
which root `AGENTS.md`, "Responsiveness", rules out. The last column
shows that the recorder alone holds that cost. I measured `k` and `j`;
the recorder runs on every keydown, so I expect the same of other keys,
but did not measure them.

## What I ran

On the merge with b5f5c5d:

-
`test_a_key_pressed_with_nothing_focused_keeps_the_place_read_in_a_pane`
passes here, and fails on `main`'s runtime with `assert 0 > 0`.
-
`test_a_wheel_or_a_press_on_words_gives_a_pane_the_reading_keys_and_the_walk`
passes here and on `main`'s runtime. #5468 fixed the readers it holds,
so it now guards them.
- `test_motion_preference_changes_are_heard_without_reloading` passes.
Before the merge, the 46 tests by node id that press a reading key, read
the region answer or restore a place all passed at two workers.
- `pnpm run test:runtime` (815 passed) and `pnpm run check:browser`.


`test_a_click_on_a_panes_words_makes_it_the_subject_of_every_scroll_key`
fails here and on `main`'s runtime alike: the resting "Comment on pane ·
Left reading" button that #5428 added covers `#right-start`, so the
click never lands.

I did not run WebKit, or `leaf page check --render` over the corpus. The
change adds no work on the startup path.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
#5425 landed the repair this branch sat on, so its focusInPage move and its
wheel test are main's now. passages.js takes main's focusInPage, which #5511
extended to Leaf surfaces seated in the page. reading-regions.js keeps this
branch's chosen region beside main's removal of the local focusInPage.
test_panes.py keeps #5512's resting-box test, the wheel test once, then this
branch's two tests.

Refs #4062
@max-sixty
max-sixty marked this pull request as ready for review November 9, 2026 08:18
max-sixty and others added 2 commits November 9, 2026 01:15
…every region

A step the page can't take, with no region named, goes to the region that shows the
most. Finding it measured every region's shown box and scroll range on the keystroke, so
on a workspace of 801 panes the first `j`'s keydown handlers took 23 to 24 ms, against
the 8 ms root AGENTS.md, "Responsiveness", gives a keystroke.

The size observer reading-regions.js keeps on every region's host now watches each body
too and records its border-box area as it changes. `readingRegionsBySize` lists the
regions largest box first, sorted again only after an area or the registry changes, and
`regionForStep` walks that list and stops at the first box smaller than the most a
region has shown, since no region shows more than its box. The ranking is unchanged:
shown area, then scroll range, then reading order. The step reads scroll positions
before computed style, so a `k` that finds no pane with room above reads less of each.

A body the observer has yet to deliver could be any size, so it comes first and is
measured. A `j` held while the runtime loads replays before the first delivery, and
counted as no box it moved nothing.

Two panes the same size and wholly on screen tie at the stopping edge, and the second
must still be read. A new test holds that on a workspace with nothing beside `main`,
for a `j` pressed after load and one held through it: the existing test's footer clips
both panes as the page scrolls, and it passed with a walk that stopped at the tie.

At 801 panes the first `j`'s handlers now take 0.9 to 1.2 ms, beside 1.3 to 1.4 ms for a
`j` in a named workspace body on main, which chooses nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…page some scroll

A step up chose a pane only on a page that doesn't scroll, so that `k` at a long page's
top leaves a following log in view alone. A header or footer beside a full-height
workspace's `main` gives the page 53 to 125 px of scroll, which put that workspace among
the long pages: on a fresh load `k` moved nothing, where the same workspace without the
footer moved its log back from its newest entry.

A step up now chooses where the window holds all of `main` (`mainFits`), or of the page
where it has none. That answers as before on every page except one whose only scroll
stands outside `main`. On a footer workspace whose pane is a log at its newest entry,
`k k` now moves the log 60 px each in Chromium and Firefox, and `j j` then moves the
page; on a long page with a following log at its top, `k` still moves nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found nothing in the code to change. The step now reads the regions in the order the size observer records, so the per-keystroke scan the earlier review raised is gone. The new tests in test_panes.py and pnpm run test:runtime pass on this head.

I'm leaving this as a comment, not an approval, because the description says the rule "is a new policy, for Max to decide" and lists the calls under Calls Max may reverse. Marking the PR ready for review doesn't settle that question. Once you've decided to keep the rule, say so on the PR and it can land.

max-sixty and others added 3 commits November 9, 2026 02:24
Ranking by each body's recorded area still measured every pane of a set the same size,
since equal boxes tie at the stopping edge. An independent review put 801 panes in fixed
300 px rows, scrolled the workspace body to its end and clicked the page's title: the
first `j`'s handlers took 12.1 ms, as before the size order.

`regionForStep` now reads each unconcealed region's rect at the key, clipped to the
window, and walks them largest first with the same stop rule. A pane off screen has a box
of 0 there, so the walk measures what a region shows only for the panes on screen. The
size observer no longer watches bodies, and `readingRegionsBySize`, the recorded areas
and the rule putting an undelivered body first go with it: a key held through startup
now reads its rects when it replays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`mainFits` compared `main`'s height with the window's, so a short `main` that a site
header pushes below the window's foot passed it. An independent review found a fresh `k`
moving a following log on such a page, a column page whose 825 px `main` starts about
330 px down a 900 px window. `mainFits` now asks whether `main`'s top and bottom both
stand inside the window, as its name says.

A workspace with a footer after `main` still passes at the page's top, so `k` there
still moves its log. A workspace with a header above `main` no longer passes, since that
header pushes `main`'s foot past the window, and `k` on a fresh load there moves nothing,
as it did before this PR. A site-header case in the step-up test holds the new answer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…is clipped from

`areaWithin` read each body's own rect, where `shownRect` clips the box `shownBox` gives,
which for a `display: contents` element is the box its contents paint. The two differ
there: the `code-comparison` playground's rail body has a 0x0 rect but shows 82,128 px²
at 1440x900, so its window box was smaller than what it shows, against the premise of
the walk's stop rule. That body doesn't scroll, so no choice changed. Reading
`shownBox` makes the window box an upper bound on the shown area by construction; on
`code-comparison` no region now shows more than its window box.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@max-sixty

Copy link
Copy Markdown
Owner Author

@leaf-agent The rule stays. It is taken as a call Max may reverse, as #4039's was on #5550, and the description now says so. The head, 9b66ff2, also has the independent review's last fix: areaWithin measures each body through shownBox, the box shownRect clips, so a display: contents body's window box can't fall below what it shows.

On the per-region pass: it stays for now. At 801 panes the first j takes 2.7 ms on a fresh load and 3.0 ms with equal rows, and k 2.2 ms. leaf-dev bench has no page of panes, so the pass can't show up there yet; adding one is the follow-up that would measure it, and the IntersectionObserver waits on what that shows.

This was written by Claude Code on behalf of max-sixty

@max-sixty
max-sixty merged commit db6bdb4 into main Nov 9, 2026
5 checks passed
@max-sixty
max-sixty deleted the grind/g-workspace-fallback branch November 9, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants