Skip to content

pr detail: visually distinguish inline review comments from diff lines #197

@ooloth

Description

@ooloth

Why

Inline review comments appear in the diff stream with only an @author · age label as the visual boundary, making it easy to mistake reviewer prose for context lines or miss where a comment ends and the diff resumes — especially when scrolling quickly through a busy review thread.

Current state

render_thread_comments() (line 476 in ui/tui/src/render/mod.rs) and comment_lines() (line 461) render inline comments as yellow-styled lines inserted directly after the diff line they annotate. There is no indentation, border, or visual container distinguishing comments from surrounding diff content. The only cue is the yellow color and the @author · age header line.

Ideal state

  • Each inline comment block is visually boxed: a left-border gutter character ( or ) and a consistent indent prefix appear on every line of the comment (author, body lines)
  • The boundary between the last comment line and the resuming diff line is visually clear
  • The same treatment applies to top-level comments in the ── top-level comments ── section
  • The existing yellow color is preserved (or adjusted for contrast against the border)

Out of scope

  • Changing which comments are shown or their order
  • Collapsing or hiding comments (tracked separately)

Starting points

  • ui/tui/src/render/mod.rscomment_lines() (line 461) and render_thread_comments() (line 476)
  • ui/tui/src/render/mod.rs — top-level comment rendering loop (lines 713–729)

QA plan

  1. Open a PR with inline review comments (e.g. hub PR workflows/implement: filter claude stderr before forwarding to caller #159 has copilot inline comments) — expect each comment block to have a visible left-border glyph and indent on every line
  2. Scroll through a diff hunk that has an inline comment mid-hunk — expect to immediately see where the diff pauses and the comment begins, and where the comment ends and the diff resumes
  3. Open a PR with top-level comments — expect the same left-border treatment in the top-level comments section
  4. Open a PR with no comments — expect no visual change to the diff rendering

Done when

Inline and top-level review comments are visually contained with a left-border gutter, clearly distinguishing them from surrounding diff lines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions