fix(ui): use theme-specific provider logos - #255
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (6)
📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe change adds light and dark provider logo variants. Workspace chips select logos for the host theme. Open workspace cards update existing logo images when the host theme changes. ChangesTheme-aware provider logos
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change selects provider logos that match the host theme and updates them when the theme changes. No actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant HostContext
participant onhostcontextchanged
participant syncWorkspaceProviderLogos
participant getProviderLogo
participant providerLogos
HostContext->>onhostcontextchanged: provide theme
onhostcontextchanged->>syncWorkspaceProviderLogos: pass light or dark theme
syncWorkspaceProviderLogos->>getProviderLogo: request logo for each data-provider image
getProviderLogo->>providerLogos: select themed provider URL
syncWorkspaceProviderLogos->>syncWorkspaceProviderLogos: update image src when the URL differs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThe PR makes provider logos respond to the MCP host’s light or dark theme and refreshes open-workspace cards when that theme changes.
Confidence Score: 4/5The PR appears safe to merge, with a non-blocking interaction issue where changing themes can reset the open-workspace card’s scroll position. Theme-aware logo selection is internally consistent and all referenced assets exist, but updating an open-workspace card rebuilds its scrollable DOM rather than preserving the user’s current viewport. Files Needing Attention: src/ui/workspace-app.tsx
|
| Filename | Overview |
|---|---|
| src/ui/icons.ts | Converts provider-logo entries into light/dark asset pairs while retaining dark as the default for existing callers. |
| src/ui/workspace-app.tsx | Selects logos from the current host theme and refreshes them on theme changes, but the full refresh resets the workspace-details scroll position. |
| src/ui/assets/provider-logos/opencode-dark.svg | Replaces the prior square OpenCode mark with the current dark-theme artwork. |
| src/ui/assets/provider-logos/opencode-light.svg | Adds the corresponding light-theme OpenCode artwork. |
Reviews (1): Last reviewed commit: "fix(ui): use theme-specific provider log..." | Re-trigger Greptile
Provider logos in the Open Workspace card currently assume dark-theme artwork, which causes several provider marks to lose contrast or look incorrect when the host is using a light theme.
This selects provider artwork from the MCP host theme, updates the card when that theme changes, and adds matching light variants for the affected providers. OpenCode now uses the current official light and dark logo assets from its published brand pack instead of the older dark square mark. Claude keeps its brand-colored mark unchanged.
Summary by CodeRabbit
New Features
Bug Fixes