fix(desktop): swap IDE icons to dark variants in dark mode - #455
Conversation
Dark-on-transparent IDE icons (code-server, cursor, bob, plus existing jupyter/none/zed) were difficult to see against the dark theme background. Mirror the LanguageIcon.svelte pattern: resolve icon paths reactively via prefers-color-scheme and load _dark.svg companions when present. Adds hand-tuned dark variants for code-server, cursor, bob, and marimo.
✅ Deploy Preview for devsydev canceled.
|
📝 WalkthroughWalkthroughThe PR adds dark mode theme detection to IDE icon selection in the WorkspaceWizard component. It imports MediaQuery to detect dark mode, introduces IDE-specific dark icon variants, refactors the icon derivation logic to select theme-appropriate paths, and updates both the component state and UI rendering to use the new approach. ChangesDark Mode IDE Icons
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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 |
marimo isn't a selectable IDE in WorkspaceWizard and isn't referenced anywhere else. Remove the orphaned base and dark SVGs and the dead dark-variant Set entry.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
desktop/src/renderer/src/lib/components/workspace/WorkspaceWizard.svelte (1)
55-58: ⚖️ Poor tradeoffReactivity dependency tracking should work—no required refactor
ideIcon()readsdarkMode.currentwhen it’s executed inside reactive contexts (ideIconSrc = $derived(...)at ~line 159 and the template callideIcon(ide.iconName)at ~line 584), so theme changes should still update the rendered icon.LanguageIcon.svelte’s$derived.by()usage is mainly for explicitness/consistency rather than a required reactivity fix here.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@desktop/src/renderer/src/lib/components/workspace/WorkspaceWizard.svelte` around lines 55 - 58, The ideIcon function correctly reads darkMode.current so reactive uses (ideIconSrc = $derived(...) and template calls ideIcon(ide.iconName)) will update on theme changes; do not refactor away from ideIcon/IDE_ICON_DARK_VARIANTS—leave ideIcon, darkMode.current, ideIconSrc and the template call as-is; if you want explicit consistency with LanguageIcon.svelte, optionally mirror its pattern by deriving the variant via $derived.by in that component, but no change to ideIcon is required.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@desktop/src/renderer/src/lib/components/workspace/WorkspaceWizard.svelte`:
- Around line 55-58: The ideIcon function correctly reads darkMode.current so
reactive uses (ideIconSrc = $derived(...) and template calls
ideIcon(ide.iconName)) will update on theme changes; do not refactor away from
ideIcon/IDE_ICON_DARK_VARIANTS—leave ideIcon, darkMode.current, ideIconSrc and
the template call as-is; if you want explicit consistency with
LanguageIcon.svelte, optionally mirror its pattern by deriving the variant via
$derived.by in that component, but no change to ideIcon is required.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 529ba7df-a5ec-4f6e-9e98-4b110b69e335
⛔ Files ignored due to path filters (4)
desktop/src/renderer/public/icons/ides/bob_dark.svgis excluded by!**/*.svgdesktop/src/renderer/public/icons/ides/code-server_dark.svgis excluded by!**/*.svgdesktop/src/renderer/public/icons/ides/cursor_dark.svgis excluded by!**/*.svgdesktop/src/renderer/public/icons/ides/marimo.svgis excluded by!**/*.svg
📒 Files selected for processing (1)
desktop/src/renderer/src/lib/components/workspace/WorkspaceWizard.svelte
Summary
code-server,cursor,bob, plus the existingjupyter/none/zed) were hard to see against the dark theme background in the workspace wizard.WorkspaceWizard.sveltenow resolves IDE icon paths reactively viaMediaQuery("(prefers-color-scheme: dark)")— the same patternLanguageIcon.sveltealready uses — and loads*_dark.svgcompanions for any icon name listed inIDE_ICON_DARK_VARIANTS._darkSVG variants forcode-server,cursor,bob, andmarimo. (marimoisn't a selectable IDE today; included for forward compat since the swap list and asset are cheap.)Notes
WorkspaceDetailPage.svelte's IDE selector renders labels only, so no swap is needed there.code-server: mono path, fill set to#ffffff.marimo: brand teal#1C7361→#5FBFA3.cursor: cube grays lifted (#43413c → #8c8a85,#55544f → #a8a6a1,#72716d → #c2c0bb);#d6d5d2/#fffhighlights preserved.bob: outer stroke#262626 → #888888; eye-socket fills (.st13) kept dark since they sit inside the white face.coder/code-serverships an alternative pattern (inline@media (prefers-color-scheme: dark)inside the SVG itself) that could replace the JS swap for mono icons in a follow-up. Sticking with the_dark+MediaQueryapproach here to match the existingLanguageIconconvention.Summary by CodeRabbit