Repository navigation
fix(annotations): clip and scroll multiline line-comment drafts above footer - #2271
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
Fixes #2254
Problem
In the file and diff line-comment editors, the multiline
text_inputhad a fixed or capped height (.h(64.0),.h_full(), or.max_h(160.0)) set directly on the input node without an enclosing scroll viewport. In Rune,text_inputdoes not clip or scroll vertically on its own, so drafts taller than the box painted past its bottom edge directly over the footer buttons (Cancel and Comment / Send comment) and beyond the card border.Fix
Wrap each multiline comment editor field in a
session_view::scroller::scroller(...)viewport so the input grows naturally inside the scroll container, clips cleanly above the footer row, scrolls vertically with Desktop's native scrollbar, and keeps the caret in view:features/annotations/src/line_comments/view.rs(editor_v2, Files and wide Review diffs): 64 pt (4 × 16 pt, matching officialLineCommentEditorrows={4}) scrollable viewport above the footer row.features/annotations/src/line_comments/view.rs(editor_v1, narrow Review diffs): scrollable viewport filling the resizablefield-boxabove the actions row while keeping the vertical resize grip.features/annotations/src/quote/editor.rs(compact quote comment editor): 20–160 pt growing scrollable viewport withstable_gutter(), matchingline-comment.css.apps/desktop/src/surfaces/browser/comment.rs(browser element comment and page note editors): 20–160 pt and 64–160 pt scrollable viewports above the footer.Verification
pwsh scripts/guardrails.ps1locally on Windows (11/11 passed).cargo check -j 1 -p opencode-desktop,cargo clippy -j 1 -p opencode-feature-annotations --no-deps -- -D warnings, andcargo clippy -j 1 -p opencode-desktop --no-depslocally on Windows (clean).