Repository navigation
fix(ui): drop button edge around suggestion avatar and show its count as a solid core Badge - #38082
Conversation
… badge legible The suggestion avatar sat in a secondary Button, whose surface background, shadow and outline drew a dark ring around the profile picture. The count badge used the error pill, which is a 16% alpha tint in dark mode, so the avatar showed through it, and max-w-full squeezed it to the 28px avatar. Use a tertiary Button, and put the xs badge on an opaque, content-sized surface.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
The bg-surface backing restyled the core Badge from the call site, against ADR:2026-10-11-migrated-antd-components-adopt-core-styling. The badge keeps its own styling; the wrapper only positions it and sizes it to its content.
The core Badge's dark-mode status tint is translucent, so the avatar showed through the count. Share the inbox launcher's solid count bubble class and use it on the suggestion avatar too.
Revert the shared COUNT_BADGE_CLASS and the InboxIconButton change; the avatar carries only the classes its bubble needs.
…n count The tinted Badge fill is 16% alpha in dark mode, so a badge laid over an avatar lets the image show through. variant="solid" paints the bg-*-solid role with on-solid text for brand, error, warning and success; other colors stay tinted. The suggestion count uses it instead of a styled span.
Colors without a semantic bg-*-solid role use their raw 600 step, which, like those roles, stays the same in both themes; utility-*-600 lightens to the 400 step in dark mode and would wash out the on-solid text.
…f the avatar" This reverts commit 7dfb3e5.
Moving the Ontology Studio UI to Collate (#37823) removed its only importer, so knip's unused-files gate fails every UI PR on it.
This reverts commit c7ab7a4.
UserClassBase gains getBotIcon, empty in OpenMetadata. When it returns an icon, ProfilePicture draws the bot on that icon instead of its logo URL, so Collate can show a core-ui icon for its AI bots.
A bot named constructor or toString got the built-in back from the plain botIcons object, and ProfilePicture handed it to Avatar as a component.
Replace the raw bg-{color}-600 palette classes with bg-utility-{color}-600;
the status colors keep their semantic bg-*-solid roles.
Render the real core Avatar with a visible test icon and check that the icon shows with no logo image and no initials.
shah-harshit
left a comment
There was a problem hiding this comment.
Update visual regressions
🔴 Playwright Results — workflow failedValidated commit ✅ 2248 passed · ❌ 41 failed · 🟡 1 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky ❌ Action needed: test(s) failed on every attempt against this PR’s validated commit — see Genuine Failures below. These are test failures, not CI budget or infrastructure issues. PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 38m 47s ⏱️ Max setup 13m 11s · max shard execution 16m 4s · max shard-job elapsed before upload 28m 2s · reporting 15s 🌐 2.76 requests/attempt · 1.31 app boots/UI scenario · 0.00% common-shard skew
Optimization targets still in progress:
Genuine Failures (failed on all attempts)❌
|
…ggestions header" This reverts commit f8d83a3.
Component files hold only the component; the helper is pure logic and gets its own tests.
…nd selection Screenshot only the suggestions header with no tolerance: the avatar edge and the solid count change about 500 px, far below the default 1% page tolerance.
Code Review ✅ Approved 🟡 Medium risk 3 closed / 3 findingsAdding solid badges and registered bot-icon precedence changes shared UI rendering; incorrect theme colors or icon mappings could make counts or bot identities unclear. Removes the dark ring around the suggestion avatar in the Suggested Descriptions header and switches its count to a solid core ✅ 3 closed✅ Quality: Badge background restyled from call site instead of fixing core Badge
✅ Quality: Hand-rolled count badge works around core Badge, and no ADR records it
✅ Quality: New UserClassBase.getBotIcon hook for Collate has no decision record
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
No linked issue. This is a visual bug reported against the suggestions header.
On an entity page with pending suggestions, the suggester avatar in the Suggested Descriptions header had a dark ring, and its count badge was hard to read. In dark mode the badge was see-through and cramped.
Both problems are in
AvatarCarouselItem.tsx:Button color="secondary", which adds a surface background, a skeuomorphic shadow and an outline around the 28px picture.ProfilePicturealready draws the bot logo without a border. The button is nowcolor="tertiary": no background, shadow or outline, and the focus ring still works.Badgetinted fill is opaque pale pink in light mode but 16% alpha in dark mode (a status-chip choice from fix(ui): align AI dark-mode brand + status-chip + filter-border tokens with palette guideline (#6491) #33751), so the avatar showed through it. Core had no solid option, so this PR addsvariant?: 'tinted' | 'solid'to coreBadge.solidpaints an opaque fill withtext-primary_on-brandand no outline, for every Badge colour.brand,error,warningandsuccessuse their semanticbg-*-solidroles. The other colours use the theme-awarebg-utility-{color}-600token, which switches to the 400 shade in dark mode. The default istinted, so existing badges don't change. The count uses<Badge color="error" size="xs" variant="solid">with layout-only classes (position,max-w-noneso the 28px avatar box doesn't squeeze it).utility-*-600solid fills, and aSolidstory inBadge.stories.tsxshows all 13 colours and anxscount over anAvatar, to check in both themes.UserClassBasegainsgetBotIcon(botName), which returns nothing in OpenMetadata. When a distribution registers an icon component for a bot,ProfilePicturedraws the bot on that icon (no initials, no logo URL). Collate uses it to showAppCollateAiChatColoredfor its AI bots in a companion PR. With no icons registered, OpenMetadata renders exactly as before.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Badgein both light and dark.Unit tests
badges.test.tsx(Vitest): new tests forvariant="solid", covering the opaque fill with no outline, and theutility-*-600fill for a colour without a semantic solid role. 12/12 pass.AvatarCarouselItemJest suite passes (4/4).ProfilePicture.test.tsx: new test checks that a registered bot icon replaces the logo and initials (13/13 pass).Visual regression baselines
playwright/e2e/VisualRegression/entitySuggestions.spec.tswith four new baselines under__snapshots__/entitySuggestions.spec.ts-snapshots/:table-suggestions(header with avatar and solid count) andtable-suggestions-selected(after clicking the avatar), each in light and dark.data-testid="suggestions-slider", plus a margin for the badge) withmaxDiffPixelRatio: 0, asglossaryInteractionsandexploreInteractionsdo for small regions. Suggestion tasks are served only in this spec, so no other baseline changes.Screenshots
Before and after on
dim_customerwith 10 seeded suggestion tasks. In order: before (light), before (dark), after (light), after (dark). The dark captures add thedark-modeclass on the root element.Checklist:
yarn tw-auditpass (0 errors).🤖 Generated with Claude Code
Summary by Gitar
UserClassBase.getBotIconso distributions can register an icon component for a bot avatarProfilePicturedraws the registered bot icon ahead of the logo URLdocs/decisionsThis will update automatically on new commits.


Confidence Score: 5/5
This update appears safe to merge; no new blocking issues were found.Summary
This PR removes the suggestion avatar’s button edge, adds solid count badges, and lets distributions supply bot icons.
The latest update only reorders imports. No new issues found.
Reviews (25) · Last reviewed commit: "test(playwright): sort imports in the su..." · Reviewed by Greptile