Skip to content

fix: restore overflow in diff scrolling fixtures - #4978

Merged
max-sixty merged 2 commits into
mainfrom
fix/issue-4918
Nov 2, 2026
Merged

max-sixty merged 2 commits into
mainfrom
fix/issue-4918

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Restore the outer-reader overflow in the diff wheel and hunk-navigation fixtures. Both explicitly opt their wide diff out of the native layout's container-width cap, and the wheel fixture gives its enclosing reader native scrolling. This preserves production layout while restoring the boundaries the tests claim to exercise.

The hunk fixture reproduced assert 0 == 150 before its correction. The focused hunk test and the wheel test now pass on this branch (3 tests and 3 subtests), covering hunk navigation from both initial reading positions and horizontal wheel routing in Chromium and WebKit. Only test setup changes.

Closes #4918
Closes #4919

The native layout change in #4724 caps widget widths at their container. Explicitly allow the wide fixture to exceed its reader and declare the reader scrollable, preserving the wheel-routing boundary without changing product layout.

Closes #4918
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

The active review can also settle #4919: its adjacent hunk-navigation fixture has the same container-width cap failure. On current main, uv run pytest tests/browser/widgets/test_diffs.py::test_a_diff_hunk_landing_preserves_sideways_reading_outside_its_shadow_tree -q -n0 fails at assert before == left with 0 == 150. Changing that fixture's CSS to #patch { width: 1000px; max-inline-size: none; } makes the test pass (1 passed), including navigation from both 0 and 150 pixels.

This is the same setup repair already made here for the wheel test, with no production change. The hunk fixture already declares overflow: auto on its reader. Please include that adjacent fixture correction and Closes #4919 in this repair; the issue remains open until it lands. I left this branch untouched because its dedicated review is in progress.

Keep the hunk navigation assertion on a genuinely sideways-scrollable outer reader after the native layout width cap. The fixture opts out of that cap; production layout and navigation remain unchanged.
@leaf-agent leaf-agent changed the title fix: restore horizontal overflow in the diff wheel fixture fix: restore overflow in diff scrolling fixtures Nov 2, 2026
@max-sixty
max-sixty merged commit 92803d5 into main Nov 2, 2026
5 checks passed
@max-sixty
max-sixty deleted the fix/issue-4918 branch November 2, 2026 08:07
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.

Diff hunk fixture cannot establish its initial sideways reading position Horizontal-wheel diff fixture has no sideways overflow

2 participants