Detect unresolved comments on the PR
Add a cheap helper (e.g. on PullRequest or inline in the tab model) that returns whether any linked CodeComment has !isResolved(). Prefer a path that does not add N+1 queries on every PR detail render (reuse already-loaded comments if present, or a targeted exists/count query / denormalized flag if loading the full collection is too heavy). Ensure the ChangeObserver on the tab still refreshes when comment status changes.
Expand tab CSS classes
Replace the single new flag with a small class matrix, for example:
new — unviewed activity (filled)
unresolved — at least one unresolved comment (warning colour; filled or outline depending on new)
Logic in the existing AttributeAppender / LoadableDetachableModel on the Code Comments tab link
CSS for filled vs outline
In pull-request-detail.css:
Filled blue: keep current .code-comments.new .icon with fill: var(--primary) when not unresolved
Outline warning: .code-comments.unresolved:not(.new) .icon → transparent/fill: none, stroke: var(--warning), stroke width tuned so the ring matches the 12×12 footprint of the filled dot
Reuse the existing dot SVG if stroke styling works; otherwise add a dedicated outline-dot symbol of the same size.
Do not change default filter
Leave PullRequestCodeCommentsPage default listing as today (all comments; no auto unresolved-only).
No tooltip
Do not add title / tip content on the indicator.
Acceptance
Unresolved + unviewed → filled orange dot
Unresolved + viewed (no newer activity) → outline orange dot
All resolved + unviewed → filled blue dot
All resolved + viewed → no dot
Visiting Code Comments clears filled/unviewed; outline remains if unresolved comments still exist
Resolving the last open comment removes the outline
Follow-up from issue #2957 (design locked).
Enhance the pull request Code Comments tab indicator so colour and fill reflect unresolved comments vs unviewed activity.
Locked design
Indicator matrix
var(--warning))var(--primary))Other decisions
isCodeCommentsVisitedAfter/visitPullRequestCodeComments). Opening the Code Comments tab clears the “unviewed” (filled) state; outline remains while any unresolved comments exist.Current behaviour (code anchors)
PullRequestDetailPage.html(codeCommentsTabLinkFrag)PullRequestDetailPage.java— addsnewwhengetCodeCommentsUpdateDate()is after the user’s code-comments visitpull-request-detail.css—ul>li>a.code-comments.new .iconfills withvar(--primary)and unhides the iconPullRequestCodeCommentsPagecallsVisitInfoService.visitPullRequestCodeCommentsImplementation plan
Detect unresolved comments on the PR
Add a cheap helper (e.g. on
PullRequestor inline in the tab model) that returns whether any linkedCodeCommenthas!isResolved(). Prefer a path that does not add N+1 queries on every PR detail render (reuse already-loaded comments if present, or a targeted exists/count query / denormalized flag if loading the full collection is too heavy). Ensure theChangeObserveron the tab still refreshes when comment status changes.Expand tab CSS classes
Replace the single
newflag with a small class matrix, for example:new— unviewed activity (filled)unresolved— at least one unresolved comment (warning colour; filled or outline depending onnew)AttributeAppender/LoadableDetachableModelon the Code Comments tab linkCSS for filled vs outline
In
pull-request-detail.css:.code-comments.new .iconwithfill: var(--primary)when not unresolved.code-comments.new.unresolved .icon→fill: var(--warning).code-comments.unresolved:not(.new) .icon→ transparent/fill: none,stroke: var(--warning), stroke width tuned so the ring matches the 12×12 footprint of the filled dotReuse the existing
dotSVG if stroke styling works; otherwise add a dedicated outline-dot symbol of the same size.Do not change default filter
Leave
PullRequestCodeCommentsPagedefault listing as today (all comments; no auto unresolved-only).No tooltip
Do not add
title/ tip content on the indicator.Acceptance