Skip to content

Keep no room for the floating panel: the page lays out in the whole window - #6688

Merged
max-sixty merged 44 commits into
mainfrom
page-ignores-panel
Nov 23, 2026
Merged

max-sixty merged 44 commits into
mainfrom
page-ignores-panel

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

The page keeps no room for the floating panel: it lays out in the whole window, the panel stands over it, and the user folds the panel with . where it covers something. Until now the page kept a 72px band (--lf-foot-room) across the window's whole width at the end of every scroller and below every window-sized box, through about eleven rules (body and part padding, --lf-end-room threaded through workspace regions, tabs, panes and the file editor, sticky tracks, the trace stage, a landing trim, the under-panel render refusal), and it kept needing patches (#3394, #3619, #5969, #6555, #6671). Max asked whether the page could know nothing about the panel; this is that change, which he picked over keeping the band, on the decision page in his session.

What still counts the panel is Leaf's own placement: the root's landing band still ends above the panel's band, and an inner scroller the page can't carry, held in a full-window workspace or stuck, now ends its band there too wherever the panel stands across the destination's columns (landingBand(scroller, across)), in place of the band each pane kept in its padding. The panel no longer writes the root's scroll-padding-bottom, since a band across the whole window made a Tab onto a stuck sidebar link beside the panel scroll the page 340px. A Layout's end padding adds the safe area at the window's foot. Landings also stop scrolling the page past how far it can still carry a scroller (pageCarry, geometry.js), so a stuck tab side list's open item stays in the window. Four faults the missing band exposed are fixed where they live: an empty visual-review discussion now lays out where its comment box would stand, so the box takes that seat only where the panel leaves it in sight, rather than opening under the panel's row and jumping between its two seats every 70ms; a comment box the user sees no longer moves to a seat outside the window, which took the draft out of sight when a review's window widened from a phone's width; and a file tree no longer reveals a row the user pressed, which moved the row from under the pointer before mouseup so the click opened nothing (main does this too with a real mouse); and a Tab's landing above the panel, which waits for the next frame, now runs first when a key comes before that frame, so Enter on a link Tab left under the panel follows the link rather than letting go of focus (landing-scroll.js).

To weigh: where content ends flush with the window's foot under the panel's 540px, the row covers its last 44px until folded (4 of 27 examples at 1728×999, 1 on a phone; 1 on main), and Tab onto a control there, as at the end of a long tab side list, leaves focus out of sight; the browser's own reveals (find, a page field's caret) no longer stop above the panel; and in a visual review that fills the window, the comment box opens over the case's head, covering its help button, rather than in its discussion.

Tests: the runs of every tier before last, on this branch (https://github.com/max-sixty/leaf/actions/runs/45015279476) and on main (https://github.com/max-sixty/leaf/actions/runs/45015281683), failed four tests on the branch alone, each only some of the time, and each now has a fix here: the Tab landing above; the aim sweep lets the page's scroll carry a margin marker Leaf anchors to the page (carriersOf, now on the check API); the stale-keys sweep shows a sample frame below the window before reading, as a check does; and the file-pick test waits for the page's scroll to start, which fails on main too. All four passed in the last runs (https://github.com/max-sixty/leaf/actions/runs/45044731101, branch; https://github.com/max-sixty/leaf/actions/runs/45044712114, main). Those failed two others on the branch alone on Linux: the drawing test, which #6718 fixes and this branch now holds, and the trace journey, whose hover scrolled the page 9px now that the root keeps no scroll padding, which the shift watch misread (#6763, now on main, fixes the watch); the journey now points without scrolling and passes 8 of 8 copies at 4× CPU throttle. Seven more failed once each on the branch's macOS job alone, as eight did on main's; rerun locally at 4× throttle, four fail on main as well and three on neither. The latest runs, with #6718 in (https://github.com/max-sixty/leaf/actions/runs/45073644131, branch; https://github.com/max-sixty/leaf/actions/runs/45073646401, main), failed nothing on Linux that main didn't. Six tests failed on the branch's macOS job alone:

Since those runs started, main gained #6720, #6739, #6756 and #6763, which this branch now holds; in seatFab it keeps #6739's rule that a seat is judged only as the box moves in, judged by this branch's rules. Their new tests, with this branch's visual-review, card-growth and trace tests, pass on that merge here. Locally the changed tests, the drawing tests, pnpm run test:runtime and pnpm run check:browser pass on the merge of today's main; the focus-ring sweep fails on review-a-fix on main and here alike.

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

…indow

The page kept a 72px band, `--lf-foot-room`, across the window's whole width at
the end of every scroller and below every box sized to the window, for a panel
row 540px wide in the window's middle. Each place that kept it needed its own
rule (the body, a page of parts' open part, every workspace region and footer
through `--lf-end-room`, tab panels and side lists, the file editor, sticky
tracks and the contents map through `--lf-view-height`, the trace stage, a
landing trim), and it kept needing patches where the band stood away from the
panel: #3394, #3619, #5969, #6057, #6555, and #6671's runtime reading of where
the panel stands.

Now the panel stands over the page, as every other control of Leaf's does, and
the user folds it to its leaf (`.`) where it covers what they read. Only Leaf's
own placement counts the panel's box. A landing keeps clear of it only where it
stands across the destination's columns (`landingBand`, with `shownWindow` read
the same way in `roomAround`): the root's band ends at the foot band the panel
states, and a scroller the page can't carry, in a workspace that fills the
window or stuck in it, ends there too, which replaces the band each pane kept in
its padding. The panel no longer writes the root's `scroll-padding-bottom`: a
band across the whole window held the browser's reveals above it, so a Tab onto
the last link of a sidebar's stuck list, which now reaches beside the panel,
scrolled the page 340px. Read receipts, thread cards and key badges still read
the panel through `declareCover`. A block sample's frame keeps the row's room
below the sample, since the frame is its window and is sized from its body.
A Layout's end padding now adds the window's safe area at its foot, so a
phone's home indicator doesn't hold a page's last line under the row.

Behavior that changes:
- Column and sidebar pages end with their own 96px (72px on a phone), which
  already clears the row; they scroll 72px less.
- A held workspace's frame reaches the window's foot less an 8px gap matching
  its head, and the row stands over whatever it crosses there, a footer
  included. A flowing workspace ends as a document does.
- The last 44px of a scroller that ends flush with the window's foot, where the
  row crosses it, shows only once the panel is folded. Of the 27 examples, 4 end
  with words under the row at 1728x999 and 1 on a phone; on main, 1 did.
- Keyboard focus on a control there counts as out of sight, so the next key lets
  go of it; Tab moves on once the panel is folded.
- A link to a held workspace region, or a file opened in an editor filling one,
  scrolls the page to the region's start where something after `main` gives the
  page room to scroll; no real page writes after a workspace's `main`.
- The browser's own reveals, such as find in page or a caret in a page's field,
  no longer stop above the panel.
- A held root workspace keeps an 8px gap at its foot, matching its head.
- The render gate's `under-panel` refusal is gone, with the scroll-to-end
  reading it alone used.

Tests: the assertions that a scroller's end clears the row, or that a region
reserves the band, go, with the tests of a link to a held region and of a file
opened in a held editor; tests that read the band from the root's
`scroll-padding-bottom` read it from `landingInsets`; a short
playground's actions are reached with the panel folded; the document keeps no
room on screen as on paper; the panel's band at the foot is still the row's
height and gaps.
# Conflicts:
#	browser/layouts.css
#	tests/journeys/test_render_widgets.py

@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.

One contract comment contradicts the change; otherwise nothing to raise ahead of the design decision.

Comment thread browser/styles/tokens.css Resolved

@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.

Since 17f264a, landingBand gives the root its full foot band whatever across says. Only a scroller inside the page that the page can't carry still reads the panel's columns. The prose still describes the column test for the root: the --lf-foot-band comment in base.css, the followBox comment in floating-panel.js ("keep clear of where the box stands across what they land"), the tokens.css comment that 2973d87 rewrote, and the description's "a landing stops above the panel only where it stands across the destination". So m, Go-to or Show for a destination beside the panel now scrolls the page to clear a band across the whole window. The comments and the description say it lands in place. The description becomes main's commit message. If the whole band is the intent, the suggestions below fix the two CSS comments. followBox's comment and the description need the same change. If the column test was meant to stay for the root, the code is what needs the change.

Comment thread browser/styles/tokens.css Resolved
Comment thread browser/base.css Resolved
@max-sixty
max-sixty marked this pull request as ready for review November 22, 2026 00:52
leaf-agent
leaf-agent previously approved these changes Nov 22, 2026
The tests page and wheel a margin thread past its edges onto the page, so
the page must be able to scroll both ways. They reached the paragraph with
Playwright's reveal, which the root's `scroll-padding-bottom` held above
the panel's band, so the reveal scrolled the page down and left room above.
The page now keeps no band and the paragraph showed where it stood, so the
page sat at its top and `u` and the wheel up had nowhere to go. The tests
now scroll the paragraph to the window's middle themselves; what the thread
does at its edges is unchanged.
The test clamps a long preview name in a 180px window and expects the
clamp to go once the window grows to 800px. That holds only where the
preview stands below its target, where the grown window adds room; a
preview above it keeps its place and its room while the room holds a line
(`fit`, preview.js). The browser's Tab reveal, held above the panel's band
by the root's `scroll-padding-bottom`, used to scroll Aim up the short
window, so the preview stood below it. With no band the reveal moves
nothing, the preview stood above Aim, and its clamp stayed. The test now
scrolls the buttons to the window's top itself, on a page long enough to
do so; how a preview clamps and unclamps is unchanged.
The test scrolls the last words of a long paragraph to a third of the
way down the window and hit-tests the row's marker there. The paragraph
ended the page, so on a 390x844 phone the scroll stopped at the page's
end with the words at 748px and the marker under the floating panel's
row, which took the hit. The page's end padding used to include the
panel's band, which let the words scroll clear of the row; the page now
keeps no room for the panel. The page now goes on past the passage, so
the scroll reaches its aim; how a row follows the page's scroll is
unchanged.
The test comments into a screenshot and has the answer grow the card
beside it past the window's foot, where it rises. It reached the shot with
Playwright's reveal, which the root's `scroll-padding-bottom` held above
the panel's band: the shot's foot at 816px of 900, the card opening at
508px and rising 81px for the answer. With no band the reveal left the
shot's foot at the window's foot, the card opened at 592px and rose 165px,
and in one frame of that rise the shift watch saw the card's empty reply
box move 67px without input. The test now scrolls the shot's foot to the
root's landing band (`landingInsets`), where Leaf's own landing brings it
and where the old reveal did, so it measures the same growth as before.

The shift at the lower position is not this branch's: main's runtime
shows the same 67px move with the shot scrolled there (scrollY 231).
…ght, so it stops jumping between seats

With no room kept for the floating panel, a visual review that fills the
window ends its case at the window's foot, under the panel's row. Pressing
c or Add feedback there seated the comment box in the case's discussion:
the empty discussion was display: none, so seatFab judged the whole case,
which the user mostly sees. Seated, the discussion laid out under the row,
the next judgment of the outlet's own box refused it and sent the box home,
the emptied discussion vanished, and the case took the box back. The box
moved between the two about every 70 ms, the page's rendering never
settled, and the comment field left the case under the user's typing.

An empty discussion now lays out with no height, hidden, so its outlet is
judged where the box will stand, and a boxless outlet is judged by the same
rule as one with a box: refused wherever a cover crosses it. This drops
#5669's lenient reading of a boxless outlet, whose only user was this
discussion; the phone case it fixed now passes on the outlet's own box,
which stands below the window there.

Behaviour that changes: in a review that fills the window, the comment box
stands beside the case, over its head, rather than in its discussion. Where
the review flows with the page, as on a phone or in a window narrower than
the review's 58rem, the box still opens in the case's discussion.

Tests: the keyboard-locality and On Me tests find the box on the page
rather than in the case. The reorder, case-goes and phone-resize tests run
in a 700x768 window, where the review flows, so they still hold a box
seated in its case.
The archetype test scrolled its control into view if needed and then held
its neighbours' positions. The playground's Send stood in view at the
window's foot (y 834-866), under the floating panel's row (842-886), which
the page no longer keeps room for. Playwright's click found the row over
it and scrolled the page 395 px to reach it, and the test read that scroll
as the press moving Reset and the menu.

The control now stands in the window's middle before the baseline is
read, as a user scrolls a control into sight before pressing it, so the
test again measures only what the press itself moves. No product
behaviour changes.
…in it

The live-samples test scrolled the second sample's foot to the window's
foot with the browser's scrollIntoView, then clicked the field of the
sample's own panel, which stands at that foot. The host's root no longer
pads its scroll by the floating panel's band, so the sample's panel now
lands under the host's panel row, which took the click.

The test now lands the sample with Leaf's own scrollIntoView, whose band
ends above the host's panel, so the child's field stands where the user
can press it. No product behaviour changes: a reader scrolling by hand
brings the sample's foot clear of the row the same way.
The comparison fixture ends its held workspace with a footer holding the
settled decision, which now reaches the window's foot under the floating
panel's row: the accepted cost of keeping no room for the panel. The
sweep clicked the row's middle, which the panel covers, and Playwright
waited on it until the test timed out.

The sweep now presses the row's words at its start, which the panel leaves
clear, as a user would. No product behaviour changes.
The aim sweeps press a control only inside the view of each scroller
that holds it, less what stands over an edge the scroller can still
scroll toward. For the page's foot they read the root's
`scroll-padding-bottom`, which held the floating panel's band. The page
no longer writes that padding; it states the band for Leaf's landings
in `landingInsets` (geometry.js). So the corpus's phone sweep pressed
the alert-ask pin on corpus-alert-thresholds where the panel's row
stood over it at the window's foot, on a page with 5616px still to
scroll, and counted it 0x0 under the row's Comment press. The sweeps now
read the root's foot from `landingInsets`, so a control the user can
scroll clear of the panel is judged where they would press it, and one
the page can't carry past the panel is still pressed where it stands.
Walking a side list longer than the window with the arrows scrolled the open
item's start out of the window from the eleventh tab on, and the list's own row
moved by a pixel or not at all. The list now reaches the window's foot beside
the floating panel, so its landing band asks for a tab the root's band leaves
under the panel's foot band. The landing counted on the page to carry the list
the rest of the way, but a sticky list a pixel short of the line it sticks at
rides the page for that pixel alone: the page scrolled 16px, the list stuck,
and the item went with the page. At the list's end, where the list can scroll
no further, and with the panel folded, where the list's band isn't clipped
while the root's still is, the page scrolled the item 37px and more away for
nothing.

`pageCarry` (geometry.js) now reads how far scrolling the page on can carry a
scroller up: to the page's end, and only until a sticky box around it sticks;
nothing for one stuck or fixed in the window. A scroller's landing band ends
that far below the root's foot where the panel stands across the destination,
replacing the yes-or-no reading (`stuckBox`, or a page that doesn't scroll),
and the root's move for a destination in an inner region goes no further than
the page carries that region (landing-scroll.js, `readingBandMoves`).

The test walks the list with the panel open as far as its rows land clear of
the panel, then folds it with `.` for the last two rows: the list ends at the
window's foot, where the panel covers them and focus there counts as out of
sight, the cost the branch accepted.
…above the panel

At 800x720 the film's pane scrolled to its end put the stage's foot at 701px,
under the floating panel's row at 662: the pane now reaches the window's foot
less the workspace's 8px gap, where it kept the panel's 72px band before. The
row covering the pane's last 44px until the user folds it is the cost the
branch accepted. The test still holds what the user relies on, the fix it was
written for: the stage keeps its content's height, and the pane scrolled to its
end shows the terminal whole in the window.
…, as 600 did

The workspace's regions now reach the window's foot less its 8px gap rather than
stopping the floating panel's band short of it, so the playground's controls
region is 66px taller at 1100x600: its list of controls fits there (415 of 415px)
where it ran 53px past the region before. The test is about a region too short
for its controls showing that more is below, so it opens the page at 530px,
where the list runs about as far past the region as it did at 600.
The trace stage now reaches the window's foot rather than keeping the floating
panel's 72px band under it, so at 1440x900 the capture fits its canvas by width
(958 of 960px) and the test's premise, a fitted capture narrower than its
canvas, failed before playback began. At 1440x828 the stage is the 804px it was
at 900, and the capture 851px of 960, so the test again checks a played frame
over a capture that centering rules could reach.
The test stands in for find-in-page opening the closed tree onto its match and
asserted the row ended inside the root's landing band, which stops above the
floating panel. The browser's own reveals no longer stop there (the root keeps
no `scroll-padding-bottom` for the panel, as the branch decided), so the row
stood at 377-432px under a band ending at 416 and the test failed with nothing
moved. What the test protects is that the shift the opening announces a frame
later doesn't return the tree to where the reader left it, so it now reads the
row in the task that reveals it and asserts that, once every scroller is still,
the row stands where the browser put it.
On a 480x520 phone, Playwright's reveal of the image tools now stops with them
at the window's foot rather than above the floating panel's band (the root
keeps no `scroll-padding-bottom` for the panel, as the branch decided). Chromium
scrolls by whole pixels, so the tools stood at 466.1-520.3px and showed 99.4% in
the viewport where the test asked for all of it. The test is about a short
window keeping a usable capture while the document scrolls to the rest, so the
reader now scrolls the tools to the window's middle, as a person scrolling to
them would, and they show whole there.
A press on a file tree row standing with its last pixel under the floating
panel opened nothing. Focus arrives on the press's mousedown, and the tree
revealed every row focus reached, so the root's landing band, which ends above
the panel, scrolled the page 37px before the mouseup. The mouseup fell on the
row below, the click went to the tree around both, and neither file opened, so
a navigator under a worktree list left its worktree closed.

The tree now leaves a row the user pressed where they aimed it, as a pressed
control stays put elsewhere (off-flow.js skips a press the same way), and
reveals only a row the keyboard or a placement reaches. On main the same press
lost its click for a pointer; the tests passed there only because Playwright's
own reveal before its click honoured the root's `scroll-padding-bottom`, which
lifted the row clear first.
… scroller

`pageCarry` counted every box `stuckBox` names as one the page can't carry, so
a landing left a destination where the page would have carried it clear: in a
region sticking at its foot and standing in its own place (`stuckBox` counts a
box on its foot line as stuck), the last row stayed at 473-493px under the
panel's band where the page used to scroll 77px to land it at 396-416; and in a
region stuck at its top inside a holder that clips, the page didn't move at
all, though its scroll carries the holder and all it holds.

The page's carry is now limited only by what its own scroll can't move: a box
fixed in the window, and a box sticking at its top in the page, for the
distance it still travels before it sticks. A box its holder's end pushes past
its line rides the page with the holder. The page's remaining travel is read
from `scrollLimit` (scrolling.js), which owns it.

Both cases land where they did before 8b40689b30, in Chromium; the side list's
walk keeps its item in view as that commit made it.
leaf-agent
leaf-agent previously approved these changes Nov 22, 2026
…ot by hover

test_trace_comments_restore_an_exact_image_and_duplicate_named_element put
the pointer on `.lf-trace-body` with `hover()` before its wheel. Playwright's
hover first scrolls the element by Chromium's reveal rule. Since the root
stopped keeping `scroll-padding-bottom` (#6688), that rule scrolls the page up
9px after the Escape landing; with only that padding restored it scrolls
nothing. A margin pass in the same task rewrote the carrier of the trace
tree's margin row to the same place in window coordinates. Chromium applies an
anchored box's scroll compensation after animation callbacks, so the next
`requestAnimationFrame` read found the anchor moved and the row not yet, and the
shift watch read the row's catch-up a frame later as a 9px move without input.
It failed 2 of 2 instrumented copies and 1 of 4 plain ones at
`--cpu-throttle 4`.

The test now moves the mouse to the middle of the body's shown part, which
scrolls nothing, as a user's pointer does; the journey is otherwise unchanged.
8 of 8 copies pass at `--cpu-throttle 4`.

The watch misreads the same way on main wherever a scroll no input makes is
followed by a margin pass while a carried row shows; this change doesn't
address that.
leaf-agent
leaf-agent previously approved these changes Nov 22, 2026
# Conflicts:
#	tests/browser/test_render_files.py
leaf-agent
leaf-agent previously approved these changes Nov 22, 2026
max-sixty added a commit that referenced this pull request Nov 22, 2026
…m over it (#6718)

After a stroke on a figure that fills the window, the comment box opens
over the figure, held at the window's top. Its drawing's picture hung
above the field, so the picture and its Undo last stroke and Remove
drawing controls stood above the window: in a 1200×1000 window, Remove
sat at −83 to −63px. An image pasted into such a box did the same. The
CSS chose the pictures' side from `data-lf-placement`, which names the
side the placement chose for the box, but Floating UI's shift had
already slid the box down onto its figure, and the placement's bounds
never include the pictures.

`floating-response.js` now picks the pictures' side each time the
placement stands the box (`mediaSide`) and writes it as
`data-lf-media-side`, which `annotation-chrome.css` reads. The pictures
hang over the field only when the box stands above its passage and the
space above the field holds them all. Otherwise they hang under it,
where their corner controls sit inside the box's own bottom row and stay
in the window with the box. In the case above, Remove moves from −83px
to 89px. Attaching still moves neither the box nor its words.

To weigh: when the box already sits on its passage, the pictures under
the field now cover more of the figure, until the draft is sent or the
box is dragged aside. Making room above instead would move the field
when a picture attaches, which the design in `annotation-chrome.css`
rules out. The before/after pair is on the decision page for #6688 (the
page keeps no room for the floating panel), where this came up:
`test_a_missing_native_frame_cannot_retarget_another_svg[insert]` fails
on #6688 with Remove above the window. It passes on main, where the
test's scroll back to the page's title brings Remove into the window,
and it passes on #6688 with this change merged in. Nobody has reviewed
it yet.

Tests: the new
`test_a_box_held_at_the_window_s_top_hangs_its_pictures_inside_the_window`
(by a stroke and by a paste) fails on main and passes here.
`test_a_missing_native_frame_cannot_retarget_another_svg` drops the
scroll it needed to reach Remove, and passes in both cases. The
neighbouring drawing, media, layout and composer tests, `pnpm run
test:runtime` and `pnpm run check:browser` pass.

> _This was written by Claude Code on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Nov 22, 2026
…arrived (#6756)

After Reset or a new selection, `lf-sample` made Reset available again,
and cleared "Loading sample…", only after one more `window` round trip
to the sample's page. The host stops counting that page's arrival once
the page reports it (`sample.js`), so where the page answered the round
trip late, the containing page read arrived while the sample still drew
loading and Reset still read `aria-disabled`. The sample now draws its
page ready in the turn the host learns the page is ready, from the
height and posture the page's ready message already carries, and sends
`window` only where the page's posture differs from the sample's, as
when Full view changed while the host was mounting. Reset comes back a
round trip sooner.

To weigh: unheld, the round trip finished first in 48 presses of 48, so
the gap showed only when the sample's page answered late. The new test
makes it answer late by holding the containing page's commands through
the `lfDocumentPort` seam on the entry script.

Found while fixing tests on #6688 (the page keeping no room for the
floating panel). The stale-keys failure there had another cause, a
sample frame below the window that readiness doesn't count by design,
which #6688 handles in the sweep.

Tests: the new hosting test fails on `main` (`['true', 'Loading
sample…']`) and passes here, also under an 8× CPU throttle; the sample,
hosting, delivery and playground browser tests, the journey tests for
samples, and `pnpm run check:browser` pass.

> _This was written by Claude Code on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Nov 22, 2026
… it (#6720)

A thread card held at an edge of its room now stands in the plane of the
box the clip walk says supplied that edge, instead of a box `holderOf`
(floating.js) found afterwards by looking for an edge within a pixel of
that line. `cutBy` (geometry.js) records which box cut each edge,
`shownRectHeld` returns `shownRect` with those boxes, `commentBoundary`
names the box holding each room's top and foot (or none, for the
window), and `plane` returns it. `holderOf` and its coordinate search
are deleted; the runtime change is +90/−85.

The coordinate search got two cases wrong, both on main:

- **A box that shares the line but bounds nothing.** With a screenshot's
foot at the window's foot (`release-notes` at 1440×900, scrolled 231px),
the shot's frame matched the window's foot, so the card rising beside it
was anchored to the frame. The first wheel step after the answer arrived
carried the card 40px with the frame for one painted frame, and the next
placement put it back. The 67px reply-box move a test reported there is
Chromium laying out a fixed box whose anchor changed off by the page's
scroll until its next rendering update; it paints right.
`notes/browser-support.md` records that, with a reproduction.
- **A box that bounds the room but isn't an overflow ancestor.** A
`contain: paint` box cutting a pane short bounds the room in Leaf's clip
walk, but Floating UI's overflow ancestors leave it out, so a card held
at its foot stood in the window's plane and every page scroll rewrote
it.

To weigh: where a real clip edge lies exactly on the window's edge, the
window wins the tie, so such a card stands in the window's plane and
lags a frame on a scroll in one direction. Either choice at a tie has
that cost. This came up while sorting the test failures on #6688 (the
page keeps no room for the floating panel).

Tests:
`test_a_card_grows_past_a_region_that_does_not_scroll_its_subject` gains
`shot-fit-at-foot`, and each shot case now scrolls after the rise and
requires nothing written to the card;
`test_a_card_a_panes_edge_holds_stays_put_as_the_pane_scrolls` gains the
`contain: paint` pane. Both new cases fail on main and pass here, as do
the neighbouring card-placement and plane tests, the shift watch's
floating-plane test, `pnpm run test:runtime` and `pnpm run
check:browser`.

> _This was written by Claude Code on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Nov 22, 2026
…der the panel's row (#6739)

A comment box the user is typing in, seated in a widget's outlet such as
a visual case's discussion, no longer leaves that seat when news, a
scroll or a resize carries the outlet partly under the floating panel's
row. `seatFab` judged the outlet's geometry at every thread-surface
commit, including for the outlet the editor already stood in, so a
commit that found it crossing the row floated the box beside its subject
and a later one seated it again. On `main` at 390×760, an agent's data
update floated the box and re-seated it about 20 ms later, with the
field itself clear of the row; after a resize from 1366×768 it bounced
between floating and seated with each update. Now an outlet is judged
only as the editor moves into it, as `showFab` judges a floating bar's
room only as it opens; only admission (the outlet still draws the
editor) refuses the seat the editor holds.

To weigh: a seated box can now stay partly or wholly under the panel's
row until something moves it. The user's next keystroke lands the field
clear of the row (`editor-view.js`); probed with the field scrolled
wholly under the row, the first keystroke landed it clear.

Found while fixing tests on #6688 (the page keeping no room for the
panel), which changes the same function; whichever lands second takes a
small conflict in `seatFab`.

Tests: a new browser test that fails on `main` (the box left its seat
once) and passes here, also under a 12× CPU throttle; 13 neighbouring
seat tests, `pnpm run test:runtime` and `pnpm run check:browser` pass.

> _This was written by Claude Code on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Nov 22, 2026
…he shift watch (#6763)

The shift watch, the tests' check that nothing on the page moves without
input, reported a margin row's catch-up after a scroll no input makes as
a move. Chrome applies an anchor's scroll to the boxes it carries after
the frame's callbacks, where the watch reads, so one reading finds the
anchor scrolled and the carried row a frame behind. The watch credited
that lag only while the row's carrier kept its pose, and the margin's
pass rewrites a carrier's inset on every pass after a scroll, so the
catch-up went uncredited. Every frame of a smooth `scrollBy` no input
makes failed the same way. The painted row never moved. This is on
`main`; #6688's trace journey hit it when Playwright's `hover` scrolled
the page 9px, and #6688 now points the pointer without scrolling
instead.

The watch's anchor credit now first looks for scroll travel of the
anchor over which the row kept its offset from it, allowing each end of
the move to read the anchor as it stood one reading earlier
(`laggedTravel`, +37 lines), and otherwise credits as before. A second
commit corrects `margin-layout.js`'s header, which said a pass after a
scroll writes the same insets: a carrier's are measured from the window,
and `placeCarriedRows` relies on the new value to make WebKit and
Firefox resolve an anchor again after a scroll inside a scaled box.
Anchor-relative insets would end the rewrite but broke the scaled-slide
test in WebKit.

To weigh: the lag credit allows one reading's lag at each end and no
more, since on a smooth scroll a longer window matched a slowing frame
against a speeding one and credited a real move.

Tests: the new `test_a_carried_row_keeps_its_anchor_s_lagging_scroll`
covers a step scroll and a smooth scroll, each with a rewrite during the
lag; both failed on the old watch and pass now, at CPU throttle 0, 4 and
8, and a row placed 5px off is still reported. The watch's 82 existing
anchor and scroll cases pass, and #6688's trace journey passes 4 of 4
with `hover` restored at throttle 4.

> _This was written by Claude Code on behalf of max-sixty_
# Conflicts:
#	browser/runtime/composing/surface.js
#	tests/browser/test_render_send_placement.py
@max-sixty
max-sixty merged commit ce9b19b into main Nov 23, 2026
6 checks passed
@max-sixty
max-sixty deleted the page-ignores-panel branch November 23, 2026 02:14
max-sixty added a commit that referenced this pull request Nov 23, 2026
Where keyboard focus lands on a place the floating panel alone would
hide, the panel now folds to its leaf, as `.` folds it. Since #6688 the
page keeps no room for the panel, so an action at the foot of a
workspace that fills the window, or a tab low in a stuck side list, can
sit under the panel's row where no scroll brings it out. Focus there was
out of sight, and Leaf's let-go rule made the next key leave the
control. In a 900×500 workspace, a Tab onto a playground's Reset
followed by another Tab left focus on Reset, Shift+Tab went to the
slider, and Enter pressed nothing. Now the first Tab folds the panel,
the next reaches Show instruction, Shift+Tab returns to Reset, and Enter
presses it.

`giveWay` (floating-panel.js) sits beside the rule that already closes
an open view for a step or travel it would stand over. It asks
`hiddenByCovers` (geometry.js), which cuts by the same rule as
`seenRect`, so the panel folds exactly where the let-go would otherwise
fire. It asks once the script that moved focus has run, so focus passing
through a place folds nothing. `seenAhead` and `focusPlace` now read the
panel where its motion comes to rest, as a key pressed during a glide
reads where the glide lands. Without that, a second Tab pressed during
the fold's animation still let go.

To weigh:
- The fold persists across pages, like `.`'s, until the user unfolds the
panel or starts writing. A fold that came back once focus left would
need a second way of resting.
- A cover takes every column of a box it reaches into, so the panel also
folds for a control mostly beside the row, where the let-go would
otherwise have fired on a control the user sees. For the same reason, a
control the folded leaf overlaps still reads as out of sight, as "Use
these settings" does at that workspace's bottom-right corner, and Enter
there lets go. Both need a change to that cutting rule.
- On Me stays open over an item it lists, as travel already leaves it.

Max took this up from his session's decision page. Codex reviewed it.

Tests: the playground and side-list tests now rely on the fold rather
than pressing `.`. The panel, walk, Tab and focus tests near the change
pass, as do `pnpm run test:runtime` and `check:browser`.

> _This was written by Claude Code on behalf of max-sixty_
leaf-agent added a commit that referenced this pull request Nov 24, 2026
…tep (#6843)

`test_a_shared_passage_steps_between_single_thread_cards` pressed
**Previous thread** as soon as **Next thread** had focused the second
thread's reply. But a step lands on its thread the way every opening
does. In the same task that focuses the reply, it glides the passage
into the reading band (394 px on this page), and the card moves with the
page. When Playwright aimed the press before the glide ended, the press
fell on `<body>` where the button had stood. That moved the user's place
off the passage, and the card closed. This matches the call log in [run
45104895190](https://github.com/max-sixty/leaf/actions/runs/45104895190):
`not stable`, then `<body> intercepts pointer events`, then `element is
inert`, then `not visible` until the timeout. The test now calls
`scroll_settled` after each step, once the reply's focus shows the glide
has started, and presses the next step only then. It still asserts the
same behavior.

The glide predates the run's candidate PRs (#6810, #6688). A frame trace
at `017ddeccf` shows the same 394 px glide after Next, and the same
failure hit Linux on Nov 15 (#6048). So no change in
`017ddeccf..10ac9da` caused it.

<details><summary>Evidence</summary>

- A probe that presses where Previous stood before the step, once
`scrollY > 300`, closes the card every time. That is the failure's
mechanism.
- Without the change, the unmodified test passed 12 of 12 copies at
`--cpu-throttle 8` and 18 of 18 at `--cpu-throttle 16 --load 4`, so load
alone didn't reproduce the timing here. With the change, it passed 12 of
12 at `--cpu-throttle 8` and once unthrottled.
- The glide comes from `anchor-travel.js` `place` → `placeScroll` →
`landing-scroll.js` `scrollIntoView` → `glideTo`, in the same handoff
that calls `focusForNavigation` on the reply.

</details>

One product question remains open, and this PR doesn't decide it.
Opening this card from the margin marker leaves the page still. Stepping
to another thread **at the same passage**, which is already in view,
glides the page 394 px. The card moves with the page, so a pointer that
presses Next and then Previous misses Previous.

The stills below are from the test's page at 1440×900, with two threads
on the bracket question. In both alternatives the second thread is open
and its reply has focus.

| Before the step: thread 1/2, page at `scrollY` 0 | After Next,
**current**: the page glides to `scrollY` 394 | After Next,
**alternative**: the page stays at `scrollY` 0 |
|---|---|---|
| ![Before the
step](https://github.com/user-attachments/assets/1d8515e5-deed-44a3-b0b3-e308d801eb27)
| ![Current: the page
glides](https://github.com/user-attachments/assets/44465c21-a6a8-4683-abbf-9247a50d3e5d)
| ![Alternative: the page
stays](https://github.com/user-attachments/assets/8c7cfc5a-f29a-4f07-a1eb-02803ce3d4c1)
|
| Previous stands at y = 689 | Previous moves to y = 295. The passage
sits in the reading band | Previous stays at y = 689, under the pointer.
The passage and card stay low in the window, where they already were |

The alternative is a mock-up. It runs the current step and then scrolls
the page back to where it stood. It is not a built behaviour. Captured
with `leaf-dev probe` and a journey that presses Next and records
`scrollY` and Previous's box.

Closes #6838 — automated triage

Co-authored-by: leaf-agent <[email protected]>
Co-authored-by: leaf-agent <[email protected]>
max-sixty added a commit that referenced this pull request Nov 25, 2026
…ips, and hold the deck's height so m lands each card alike (#7150)

Fixes three faults in `lf-deck` that Max hit on leaf.page's catch-up
example.

**An answered card stayed put.** The deck moved a card on only if the
window had focus, and focus was on the card, when the server's reading
of the answer arrived. On leaf.page a new visitor's first answer reads
back after about 12 s, so turning to another window meanwhile left the
card open with the count already down. The deck now moves on when the
answer that closed the card, its latest, was sent from this page,
whatever route recorded it, and moves the page or focus with it only
while the user's latest press or key toward the card still stands, read
as each move lands.

**Two sets of arrows.** Back and forward asked for corner key chips
(since #4331), so a keycap ← / → stood beside each chevron. They no
longer ask; the chevron's preview still names the key.

**`m` jumped by each card's height.** Since #6688 took away the page's
foot room, a shorter card at the page's end shrank the deck and the
browser pulled the page down: the bar landed at 12px, then 49px, then
12px as `m` cycled two cards, and Back or Next by pointer moved the bar
under the pointer. The deck now holds the tallest height it has stood
at, and the open card fills it; the end of the pass keeps its own height
inside it.

To weigh:

- **A new package-API name, `sentHere(event)`**, which reads the event's
`attempt` against the attempts this page posted; the served
`EventReference` now carries `attempt`. No existing name says whether an
event came from this page, and every recording route (`lf-action`,
`widgetController.dispatch`, `record.property`) meets at the dispatcher
that keeps those attempts.
- **A short card after a taller one now stands as tall as the taller**,
its frame round empty room. A change of the deck's width lets the height
go. A first pass by `m` at the page's end, in a window taller than the
deck, can still land a newly tallest card lower than the last; page tabs
avoid that by standing at least a window tall, which on a deck would
push what follows a short deck a window down.

Max reported all three and hasn't read the diff. Codex reviewed the
first two commits; its findings and Tend's are folded in. Tests: the
page-end hold is a new `deck-back` row of the hold-still journey (fails
on main in both engines); the late-answer test checks the card moves and
the page doesn't; deck tests, model tier and runtime tests pass.

> _This was written by Claude Code on behalf of max-sixty_
max-sixty added a commit that referenced this pull request Nov 26, 2026
…deck's held height (#7188)

Gives a served column or sidebar page room below its body for its last
line to rise to the window's top, as an editor does, and drops
`lf-deck`'s held height (#7150), which handled one widget's case of the
same fault. At a page's end the browser can't scroll past the last
pixel, so a block there that shrinks makes it pull the page down; since
#6688 took away the panel's 72 px, a deck ending the page moved its bar
under the pointer and `m` landed each card at its own height. The hold
fixed that by keeping the deck tall, which left empty room inside a
short card's frame and ran in the deck's own code.

To weigh: every such page, the website's included, can now scroll until
its last line stands at the window's top, blank below it. A workspace, a
block sample and a nested Layout keep their ends. The obligation mark's
landing margin moves to the theme's tier at no weight, so a deck card's
own margin keeps the bar in view when `m` lands it; with the extra
scroll, Chromium otherwise cut the bar off above the window.

Max asked on his review page for a fix with no runtime code and no empty
space under the card; this is the option recommended there, and he chose
it. He hasn't read the diff. Codex reviewed an earlier version; its
findings (room applied to nested Layouts, one-line summaries still
moving, the cut-off bar, interactive exports, four tests) are folded in.

Tests: the hold-still journey's deck-back rows pass in both engines and
fail without the room; deck, obligation-walk landing, sample and model
tests pass; three tests that need a page with no scroll range now strip
the room from it.

> _This was written by Claude Code on behalf of max-sixty_
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