Skip to content

fix: contain source scrollbar spacers before widget upgrade - #4365

Merged
leaf-agent merged 2 commits into
mainfrom
fix/issue-4349
Oct 29, 2026
Merged

leaf-agent merged 2 commits into
mainfrom
fix/issue-4349

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

A source <pre> lost its formatting context when the shared source style set overflow: visible, letting its floated scrollbar-clearance spacer escape into later blocks. After #4323 shortened one-file diffs by removing their filter bar, that float pushed the following draft's first line down by 10px in the phone case and 6px after a panel; the draft then shrank at upgrade even though the diff itself kept its box.

The shared source primitive now uses display: flow-root to contain the spacer while preserving its clearance. This keeps #4323's intent and the existing first-paint stability guarantee. On screen, the following draft starts at its presented height; the diff's box and its settled controls stay the same.

Both reported cases fail before the fix and pass after it. All five first-box cases and focused source-widget and text-scroller checks pass, as does pnpm run check. Startup screenshots of both reported cases show the corrected first-line position; leaf-dev stills finds the settled diff-long-lines and release-draft-hover states unchanged. The repair adds no runtime work or requests.

Closes #4349 — automated triage

Source pre blocks release their formatting context when the shared primitive resets overflow to visible. The scrollbar-clearance float can then escape a clipped diff and push the first line of the next paragraph down. Keep the source in its own flow root, preserving the clearance without letting it affect later blocks.

Preserves #4323 removing the filter from one-file diffs. Both reported startup cases fail before the change and pass afterward, along with the other first-box cases and source/scroller checks.

Closes #4349
# Conflicts:
#	browser/shadow.css
@leaf-agent
leaf-agent merged commit 82a6fe3 into main Oct 29, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-4349 branch October 29, 2026 07:58
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 upgrade changes the box of the content that follows it

1 participant