Repository navigation
fix: reserve diff note borders before upgrade - #5019
Merged
Merged
Conversation
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
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.
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-touchfound 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:
The focused Python checks passed (3 cases), Ruff passed, and all 737 runtime tests passed.
Closes #4950 — automated triage