Skip to content

fix(integrations): render one brand icon state everywhere - #6872

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/dropbox-icon-states
Aug 20, 2026
Merged

fix(integrations): render one brand icon state everywhere#6872
waleedlatif1 merged 2 commits into
stagingfrom
fix/dropbox-icon-states

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • A service glyph was rendered three different ways depending on the surface: brand-colored via 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.
  • Added BrandIcon (and withBrandIcon for icon prop 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-icon fallback otherwise. Consumers pass sizing only.
  • Migrated every bare call site: connect OAuth modal, the four service-account modals, KB connector chips + add/edit connector modals, in-chat connect rows, suggested actions, resource registry, @-mention chips, chat context chips, tool-call rows, and both credential selectors.
  • Deleted blocks/brand-icon-style.ts — its only remaining consumer was BrandIcon, so folding it in removes the per-caller styling API entirely.
  • Dropped now-dead icon-color chrome the component supersedes (mention-chip [&>svg]:text-*, the KB connector wrapper's text-[var(--text-secondary)]).
  • The tiled treatment (BlockTile / IntegrationTile, white-or-black glyph on the brand bgColor square) is deliberately untouched — it is a separate component, not a fourth state of this one.

Type of Change

  • Bug fix

Testing

  • Added 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 stable withBrandIcon identity. Verified the tests fail when the color is removed.
  • bun run lint, bun run type-check, bun run check:audits (29 audits), and the full blocks/ suite (944 tests) pass.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

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.
@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 19, 2026 11:51pm

Request Review

@cursor

cursor Bot commented Aug 19, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI-only icon styling consolidation with no auth, data, or API changes; broad but mechanical call-site swaps and new unit tests.

Overview
Unifies how bare integration/service glyphs look across workspace UI. The same icon could appear brand-colored, muted, or inherit parent text color depending on the surface; this PR makes one component own that behavior.

Introduces BrandIcon and withBrandIcon in blocks/brand-icon.tsx: registered block brand colors apply when available, otherwise --text-icon; callers only pass sizing/layout. withBrandIcon wraps icons for slots that expect a component (ChipModalHeader, combobox options, etc.) with stable component identity to avoid remounts.

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 getBareIconStyle / ad hoc createElement + color classes.

Removes blocks/brand-icon-style.ts and redundant descendant color rules (e.g. mention-chip [&>svg]:text-*, KB connector wrapper text color). BlockTile / tiled treatments are unchanged.

Adds brand-icon.test.tsx and updates mention-chip.test.tsx so icon color lives on BrandIcon, not chip wrappers.

Reviewed by Cursor Bugbot for commit 2f94aac. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR introduces a shared brand-glyph renderer and migrates workspace integration surfaces to use its consistent registered-color or muted fallback behavior.

  • Adds BrandIcon and stable withBrandIcon adapters.
  • Migrates modal headers, connector views, chat surfaces, mentions, and credential selectors.
  • Adds focused rendering and wrapper-identity tests.
  • Removes the superseded brand-icon styling helper.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

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

Comment thread apps/sim/blocks/brand-icon.tsx
Comment thread apps/sim/blocks/brand-icon.tsx
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.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ 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.

@waleedlatif1
waleedlatif1 merged commit 7b67a2c into staging Aug 20, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/dropbox-icon-states branch August 20, 2026 00:06
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