Code Review Bench PR #26556 - feat: limit badges to 2 with hover/click popover in UserListTable#8
Conversation
Code Review
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar
| onMouseEnter={handleMouseEnter} | ||
| onMouseLeave={handleMouseLeave}> | ||
| <div className="flex flex-col gap-1"> | ||
| {hiddenItems.map((item, index) => ( |
There was a problem hiding this comment.
⚠️ Bug: Popover hidden items don't fire onClick handlers
The LimitedBadges component accepts onClick in each BadgeItem, but only the visible badges wire up onClick. The hidden items rendered inside the popover are plain <span> elements with no click handler, despite having cursor-pointer styling that suggests they should be interactive.
This is a functional regression in the teams column of UserListTable, where clicking a team badge triggers table.getColumn("teams")?.setFilterValue([team.name]). If a user has 3+ teams, the overflow teams in the popover won't be clickable to filter — breaking the existing click-to-filter behavior for those items.
Was this helpful? React with 👍 / 👎
| {hiddenItems.map((item, index) => ( | |
| {hiddenItems.map((item, index) => ( | |
| <span | |
| key={item.label} | |
| className="text-default cursor-pointer text-sm hover:text-emphasis" | |
| onClick={item.onClick}> | |
| {item.label} | |
| </span> | |
| ))} |
- Apply suggested fix
| groupIndicator = " (group)"; | ||
| } | ||
| let label = attributeValue.value; | ||
| label = `${label} ${weight}`; |
There was a problem hiding this comment.
⚠️ Bug: Attribute weight label has trailing space when weights disabled
When attribute.isWeightsEnabled is false, weight remains "". The label is then built as:
label = `${label} ${weight}`; // e.g. "Engineering " (trailing space)This unconditionally appends a space + empty weight to every attribute badge label, producing labels like "Engineering " instead of "Engineering". The original code only appended the weight suffix when it existed (it used a separate badge).
This is a visual regression that will be visible on every attribute badge when weights are not enabled.
Was this helpful? React with 👍 / 👎
| label = `${label} ${weight}`; | |
| let label = attributeValue.value; | |
| if (weight) { | |
| label = `${label} ${weight}`; | |
| } | |
| label = `${label}${groupIndicator}`; |
- Apply suggested fix
| return ( | ||
| <div className={classNames(isNumber ? "flex w-full justify-center" : "flex flex-wrap")}> | ||
| {attributeValues?.map((attributeValue) => { | ||
| <LimitedBadges |
There was a problem hiding this comment.
⚠️ Bug: Attribute weight suffix loses its distinct visual styling
The original code rendered the attribute weight as a separate, visually distinct badge with:
- A darker background (
color-mix(in hsl, var(--cal-bg-emphasis), black 5%)) rounded-l-noneon the weight badge androunded-r-noneon the value badge, creating a compound pill effect
The refactored code flattens this into a single text string ("Engineering 75%"), completely losing the compound badge visual treatment. This is a UI regression that removes an intentional design distinction between the attribute value and its weight percentage.
If the compound badge style is intentionally being simplified, this should be called out explicitly in the PR description as a design change rather than a pure refactor.
Was this helpful? React with 👍 / 👎
- Apply suggested fix
There was a problem hiding this comment.
Configure merge blocking · Maintainers can dismiss this review. Gitar never approves changes.
Benchmark Evaluation ResultsGround Truth Bugs (Recall: 4/4 = 100.0%)
Extra Gitar Findings
Summary
|
Benchmark PR for Gitar evaluation
Original PR: agentic-review-benchmarks#8
feat: limit badges to 2 with hover/click popover in UserListTable
Summary by Gitar
LimitedBadgesincomponents/ui/LimitedBadges.tsxconsolidates badge limiting logic with responsive popover (hover on desktop, click on mobile)HoverCardimplementations inUserListTableteams/attributes columns andResponseValueCellwithLimitedBadgesCellContext<UserTableUser, unknown>andHeaderContexttypes throughoutUserListTable.tsxThis will update automatically on new commits.