diff view: hide the Review Comments section while it is empty - #559
Open
thiblahute wants to merge 1 commit into
Open
diff view: hide the Review Comments section while it is empty#559thiblahute wants to merge 1 commit into
thiblahute wants to merge 1 commit into
Conversation
Owner
|
I'm happy making this the default with no configuraiton for it, no need to add an extra config when I think everyone would want this! |
thiblahute
force-pushed
the
pr/hide-empty-review
branch
from
August 6, 2026 13:48
6017568 to
918dcb1
Compare
The "═══ Review Comments ═══" section always rendered, even before any review comment existed. Hide the header until the section has content — a remote review summary, a local review comment, or a visible review-level remote thread. The gate goes through a shared App::show_review_comments_header() used by the unified and side-by-side renderers, the annotation builder, and the scroll height model (review_comments_section_height), so the display, the cursor/click model, and scrolling stay in sync.
thiblahute
force-pushed
the
pr/hide-empty-review
branch
from
August 6, 2026 14:11
918dcb1 to
253f341
Compare
Contributor
Author
|
Indeed, makes sense, done :-) |
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.
The
═══ Review Comments ═══section always rendered, even before anyreview comment existed. Hide the header until the section has content — a
remote review summary, a local review comment, or a visible review-level
remote thread. Per review feedback this is now simply the behavior — no
config option.
The gate goes through a shared
App::show_review_comments_header()usedby the unified and side-by-side renderers, the annotation builder, and the
scroll height model (
review_comments_section_height), so the display,the cursor/click model, and scrolling stay in sync.
Covered by a unit test (
review_comments_header_hidden_while_empty);cargo fmt,check,clippy -D warnings, andcargo testall passlocally.