fix(integrations): render one brand icon state everywhere - #6872
Conversation
A service glyph was drawn three different ways depending on the surface: brand-colored via getBareIconStyle, muted through --text-icon, or left to inherit the surrounding text color. The same Dropbox icon therefore read blue in suggested actions and grey in the connect modal. Replace the loose helper with a single BrandIcon component (plus withBrandIcon for component-shaped icon slots) that owns the color, and migrate every bare call site to it. The tiled treatment (BlockTile / IntegrationTile) is unchanged.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Introduces Migrates connect OAuth, service-account modals, KB connector chips and add/edit modals, chat connect rows, suggested actions, resource registry, mention chips, chat context chips, tool-call rows, and credential selectors from Removes Adds Reviewed by Cursor Bugbot for commit 2f94aac. Configure here. |
Greptile SummaryThe PR introduces a shared brand-glyph renderer and migrates workspace integration surfaces to use its consistent registered-color or muted fallback behavior.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/blocks/brand-icon.tsx | Introduces the shared registry-backed bare brand-icon renderer and stable component-slot adapter. |
| apps/sim/blocks/brand-icon.test.tsx | Covers registered colors, fallback coloring, OAuth parity, and stable wrapper identity. |
| apps/sim/app/workspace/[workspaceId]/components/connect-oauth-modal/connect-oauth-modal.tsx | Adapts the resolved OAuth provider icon for the modal header while preserving missing-icon handling. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/mention/mention-chip.tsx | Delegates mention glyph coloring to the shared BrandIcon component. |
| apps/sim/blocks/brand-icon-style.ts | Removes the superseded per-caller bare-icon styling helper. |
Reviews (2): Last reviewed commit: "fix(integrations): update the mention ch..." | Re-trigger Greptile
The chip test asserted the wrapper still carried the descendant `[&>svg]:text-*` rule that BrandIcon now owns. Assert the absence of a competing descendant rule and check the glyph itself instead. Also give BrandIconSlot and the test's PlainIcon dedicated props interfaces.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 2f94aac. Configure here.
Summary
getBareIconStyle, muted through--text-icon, or uncolored and inheriting the surrounding text color. The same Dropbox icon read blue in suggested actions and grey in the connect modal.BrandIcon(andwithBrandIconforiconprop slots that take a component —ChipModalHeader, combobox options) as the single bare brand glyph. It owns the color: registered brand color when the block has one,--text-iconfallback otherwise. Consumers pass sizing only.@-mention chips, chat context chips, tool-call rows, and both credential selectors.blocks/brand-icon-style.ts— its only remaining consumer wasBrandIcon, so folding it in removes the per-caller styling API entirely.mention-chip[&>svg]:text-*, the KB connector wrapper'stext-[var(--text-secondary)]).BlockTile/IntegrationTile, white-or-black glyph on the brandbgColorsquare) is deliberately untouched — it is a separate component, not a fourth state of this one.Type of Change
Testing
blocks/brand-icon.test.tsx(4 tests) covering the brand-color path, the muted fallback, parity between an OAuth connect surface and the chat surfaces, and stablewithBrandIconidentity. Verified the tests fail when the color is removed.bun run lint,bun run type-check,bun run check:audits(29 audits), and the fullblocks/suite (944 tests) pass.Checklist