Skip to content

diff view: hide the Review Comments section while it is empty - #559

Open
thiblahute wants to merge 1 commit into
agavra:mainfrom
thiblahute:pr/hide-empty-review
Open

diff view: hide the Review Comments section while it is empty#559
thiblahute wants to merge 1 commit into
agavra:mainfrom
thiblahute:pr/hide-empty-review

Conversation

@thiblahute

@thiblahute thiblahute commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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. Per review feedback this is now simply the behavior — no
config option.

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.

Covered by a unit test (review_comments_header_hidden_while_empty);
cargo fmt, check, clippy -D warnings, and cargo test all pass
locally.

@agavra

agavra commented Aug 5, 2026

Copy link
Copy Markdown
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
thiblahute force-pushed the pr/hide-empty-review branch from 6017568 to 918dcb1 Compare August 6, 2026 13:48
@thiblahute thiblahute changed the title diff view: add show_empty_review_comments to hide the empty section diff view: hide the Review Comments section while it is empty Aug 6, 2026
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
thiblahute force-pushed the pr/hide-empty-review branch from 918dcb1 to 253f341 Compare August 6, 2026 14:11
@thiblahute

Copy link
Copy Markdown
Contributor Author

Indeed, makes sense, done :-)

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.

2 participants