Repository navigation
Let wt-merge's phone film scroll its pane instead of clipping its stage - #3714
Merged
Merged
Conversation
At 800x720, wt-merge's film pane is narrow enough for the film's phone layout while the workspace still fills the window. The film is a grid in a full-height pane, and its auto rows shrank to fit that height. The stage clips its content (`overflow: hidden`), so its minimum height is zero, and it gave up 335 of its 587px: the drawing lost its foot, and the worktrees, latest command and terminal below it were cut off where no scroll could reach them. The pane itself never overflowed, so it had nothing to scroll. The cause is the example's own layout for its film, so the fix is there: `grid-auto-rows: max-content` keeps each row at its content's height, and the film's pane scrolls to the terminal, which ends above Leaf's panel. At 1280x720 the desktop film fits as before, with identical screenshots. A new browser test reads the 800x720 film scrolled to its end: nothing clipped in the stage, and the terminal above the panel. Without the fix it fails with 335px clipped. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.htmlstyleslf-merge-filmas 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-contentkeeps 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:
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).