Skip to content

Reserve the panel's room only in panes that can reach the window's foot - #3711

Merged
max-sixty merged 1 commit into
mainfrom
agent-a7175a0bf3da2f85e
Oct 23, 2026
Merged

max-sixty merged 1 commit into
mainfrom
agent-a7175a0bf3da2f85e

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

In a bounded root workspace, only a pane that can reach the window's foot now reserves room for Leaf's floating panel at the end of its reader. Before, every pane at any depth padded its end with the panel's 72px row (--lf-foot-room). A pane that a body widget places deeper already stands inside that body's own end room, so it reserved the room twice, even at the top of the window. This follows #3703, where the visual-review gallery's case strip gave 68px of an 800×720 window to a panel it never reaches.

The rule. browser/layouts.css now pads the reader of the body when it is a pane, and of each pane of the body's own grid. Deeper panes keep their 12px inset. The change is plain CSS with no measurement. One gap remains: CSS cannot tell a grid's last row from the others, so every pane of a page's own grid still keeps the reserve, as before.

Before and after. I probed every pane at 800×720 and 1280×720. "Bottom" is where the pane ends in the window, and "pad" is its reader's end padding.

Page Pane 800×720 bottom, pad 1280×720 bottom, pad
visual-review-gallery case strip (lf-vr-queue) 219→151, 84→16 648, 84→0
visual-review-gallery evidence 550→622, 84→12 550→622, 84→12
visual-review-gallery discussion 648, 84→12 648, 84→12
data-explorer playground controls 305→373, 84→16 378→446, 84→16
data-explorer preview and instruction 648, 84→0/16 648, 84→0/16
rust-sort, wt-merge each pane 719, 84 (unchanged) 719, 84 (unchanged)

At 800×720, the gallery's evidence pane gains 72px, and data-explorer's controls region drops its empty band, so its instruction region shows the whole instruction.

Nothing under the panel. I scrolled each pane's reader to its end and compared its last content with the top of the panel's row (y = 662). In visual-review-gallery, data-explorer and rust-sort, no pane's last content reaches the panel, at either size in Chromium, and at 800×720 in Firefox for the gallery and rust-sort. alert-review and code-comparison have no panes. The deeper panes end at y = 648, inside their body's own end room. The one pane whose content runs past y = 662 is wt-merge's film pane at 800×720. Its content overflows the pane itself, which doesn't scroll. That pane reaches the foot and keeps the same 84px reserve as before, so this change doesn't touch it.

Test. test_a_pane_inside_a_plain_section_of_a_workspace_flows now also checks the reserve. The pane inside a section reserves nothing beyond its inset, and a pane that is the body reserves the panel's room. Without this change, the first assertion fails with 72 == 0. The other workspace layout tests pass, except test_workspace_root_scrollbar_appears_only_when_page_overflows, which fails the same way without this change.

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

In a bounded root workspace, every pane's reader padded its end with the
floating panel's room (`--lf-foot-room`, 72px), at any depth. A pane that a
body widget places deeper already stands inside that body's own end room,
so it reserved the room twice, even at the top of the window. In
visual-review-gallery at 800x720, the stacked case strip at the top gave
68px of a 720px window to a panel it never reaches, and every pane of
data-explorer's playground reserved room under the playground's own.

The reserve now applies only to a pane that can reach the foot: the body
when it is a pane, and each pane of the body's own grid. Deeper panes keep
their inset alone. This is plain CSS with no measurement; CSS cannot tell a
grid's last row from the others, so every pane of a page's own grid keeps
the reserve.

The sectioned-pane workspace test now checks both sides: the pane inside a
section reserves nothing beyond its inset, and a pane that is the body
reserves the panel's room.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 11c1b42 into main Oct 23, 2026
3 checks passed
@max-sixty
max-sixty deleted the agent-a7175a0bf3da2f85e branch October 23, 2026 07:21
max-sixty added a commit that referenced this pull request Oct 23, 2026
…ge (#3714)

At 800×720, wt-merge's film now shows its whole phone layout. Its pane
scrolls down to the terminal, which ends above Leaf's panel. Before, the
drawing was cut off at "+3 files", and the worktrees, latest command and
terminal below it were clipped where no scroll could reach them. This
follows #3711, whose pane survey turned it up.

**Cause.** The cause is the example's own layout for its film, not the
film widget's sizing or the workspace's pane rules. At 800×720, the
film's pane (two thirds of the window) is narrow enough for the film's
phone layout, while the workspace still fills the window.
`examples/wt-merge.html` styles `lf-merge-film` as a grid with auto rows
in that full-height pane. When the rows don't fit, CSS grid shrinks them
toward their minimum. The stage clips its content (`overflow: hidden`),
so its minimum height is zero: it got 252px of its 587px, and the rest
was hidden. The pane's scroller (the film element, `overflow: auto`)
never overflowed, so it had nothing to scroll.

**Fix.** `grid-auto-rows: max-content` keeps each row at its content's
height, so the film overflows its pane and the pane scrolls.

**Checks.** I measured before in Chrome, and after in Chrome and
Firefox:

| | 800×720 before | 800×720 after | 1280×720 |
| --- | --- | --- | --- |
| stage height / content | 252 / 587px | 587 / 587px | 335 / 335px,
unchanged |
| film pane scroll height / view | 680 / 680 (no scroll) | 1015 / 680 |
680 / 680, unchanged |
| terminal bottom, film scrolled to end | 959 (clipped) | 624 | n/a |
| top of the panel's row | 662 | 662 | 662 |

After the fix, Firefox matches Chrome to within 2px. The 1280×720
screenshots before and after are byte-identical. The render check on
wt-merge passes with the same two pieces of drawing advice as before.

A new test,
`test_merge_film_shows_its_whole_phone_stage_in_a_laptop_height_pane`,
reads the 800×720 film scrolled to its end. It checks that nothing is
clipped in the stage and that the terminal ends above the panel. Without
the fix it fails with 335px clipped. The merge-film tests pass (7, the
new one included).

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

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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