Skip to content

fix: reserve diff note borders before upgrade - #5019

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-4950
Nov 1, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-4950

Conversation

@leaf-agent

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

Copy link
Copy Markdown
Collaborator

Authored diff notes now reserve the one-pixel inline borders of the file they enter during upgrade, preventing the reported two-pixel width loss. This preserves #4759's final note layout and wrapping; only the initial authored note is inset.

The package quality check reproduced both reported findings on current main and passes with the fix. The existing desktop/touch first-paint test now compares note width across upgrade; its new assertion fails on the original CSS and both cases pass with the correction.

Visual comparison with leaf-dev stills HEAD^ --state diff-author-notes --state diff-author-notes-dark --state diff-author-notes-touch found all three presented states unchanged. A served base/candidate startup comparison kept 42 code requests and 39 JavaScript requests through upgrade and presentation, with JavaScript bytes unchanged and 150 additional CSS bytes to reserve the inset before rendering.

First-paint comparison

In the same gallery, with the runtime entry held, the old note measured 907.609375px before upgrade and 905.609375px afterward. The corrected note measured 905.609375px on both sides. The initial border and text inset move inward by one pixel on each edge:

Before After
Original first paint Corrected first paint

The focused Python checks passed (3 cases), Ruff passed, and all 737 runtime tests passed.

Closes #4950 — automated triage

Authored notes now reserve the inline inset of the file border they enter when the diff renders. Their final width and placement stay unchanged. Extend the existing desktop and touch first-paint check to compare note width across upgrade.

Closes #4950
@leaf-agent
leaf-agent merged commit 66a0d3a into main Nov 1, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-4950 branch November 1, 2026 23:12
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 note loses two pixels of width during first presentation

1 participant