Skip to content

style(mark): redesign code review subtitle with badges and type-specific icons#370

Merged
matt2e merged 7 commits intomainfrom
code-review-subtitle
Mar 11, 2026
Merged

style(mark): redesign code review subtitle with badges and type-specific icons#370
matt2e merged 7 commits intomainfrom
code-review-subtitle

Conversation

@matt2e
Copy link
Contributor

@matt2e matt2e commented Mar 11, 2026

Summary

  • Redesign code review timeline rows to show warning and comment counts as outline badges instead of text
  • Add warning-specific icons (AlertTriangle) in the diff file tree and comments sidebar, with distinct coloring
  • Track warning counts separately through the review details pipeline (BranchCard → BranchTimeline → TimelineRow)
  • Show Bot icon alongside comment-type icon for agent-authored comments in the diff sidebar

Test plan

  • Verify timeline rows show badge pills with correct warning/comment counts
  • Verify diff file tree shows warning icon for files containing warning comments
  • Verify diff comments sidebar shows both bot and comment-type icons for agent comments
  • Verify non-warning comments still show the MessageSquare icon

🤖 Generated with Claude Code

matt2e and others added 6 commits March 11, 2026 13:40
…ic icons

Show time first in the timeline, then comment counts as round-rect
badges with icons instead of text. Annotations are only shown when
there are no comments. Use comment-type-specific icons (warning,
suggestion, issue, info) consistently across the timeline, diff
sidepanel comment list, and file tree indicators.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show comment and annotation counts as separate badges instead of
either/or. Switch badges to outline style (border instead of fill),
add more padding, and use align-items: center for proper vertical
alignment with the time label.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…diff UI

Show per-type badges (warning, suggestion, issue, comment, annotation)
in the branch timeline instead of generic comment/annotation badges.
Each badge uses the same icon and color as the diff sidepanel and file
tree: AlertTriangle for warnings, Lightbulb for suggestions, CircleAlert
for issues, MessageSquare for plain comments, and Info for annotations.

Also fix CSS specificity bug in DiffFileTreeSection where the rule order
(warning → suggestion → issue → info) didn't match the icon priority
(issue > warning > suggestion > info), causing a color/icon mismatch
when multiple comment types were present on the same file. Reorder rules
so the highest-priority type's color wins.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…s all views

Unify icons between the branch timeline badges and the diff UI to use
only two types: MessageSquare for normal comments and AlertTriangle for
warnings. Previously the diff UI used four different type-specific icons
(warning, suggestion, issue, information) while the timeline only had
generic comment/annotation badges.

Now both places use the same two-icon system:
- MessageSquare (comment) for all non-warning comments
- AlertTriangle (warning) for warnings

Remove unused icon imports (CircleAlert, Lightbulb, Info) and their
associated CSS classes from DiffCommentsSection, DiffFileTreeSection,
and TimelineRow.
Show both the agent icon (Bot) and the comment type icon in the diff
sidebar comment list. Agent-authored comments display a Bot icon in
--status-modified color followed by the type icon (AlertTriangle for
warnings, MessageSquare otherwise). User-authored comments show only
the type icon.

Wrap both icons in a flex container (.comment-icons) and increase
the comment item left padding to accommodate the extra icon width.
Use the same muted color and border for warning badges as regular
comment badges in the branch timeline, instead of highlighting
warnings in --status-modified color.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners March 11, 2026 04:42
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b90bf13b62

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


// Build badges: warnings get their own badge, everything else is a comment
const warningCount = breakdown?.warnings ?? 0;
const nonWarningCount = totalCount - warningCount;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exclude annotations from non-warning comment badge math

nonWarningCount is derived from totalCount - warningCount, but totalCount includes annotationCount, so hold-to-reveal annotations are being counted as regular comments in the badge. In reviews that contain annotations, this inflates the comment badge (for example, 1 warning + 2 annotations shows a comment badge of 2 even though there are no non-warning visible comments), which makes the timeline counts misleading; this should be based on commentCount (non-annotation comments) rather than totalCount.

Useful? React with 👍 / 👎.

Use commentCount instead of totalCount when computing nonWarningCount
so that hold-to-reveal annotations are not inflated into the comment
badge on the branch timeline.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@matt2e matt2e merged commit aa65046 into main Mar 11, 2026
4 checks passed
@matt2e matt2e deleted the code-review-subtitle branch March 11, 2026 04:59
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.

1 participant