feat(desktop): install any VS Code theme from the Marketplace#43292
Merged
Conversation
Browse + install color themes from the VS Code Marketplace straight from Cmd-K and Settings → Appearance. The Electron main process resolves the extension, unzips the .vsix with a hand-rolled zip reader (zlib only, no new deps), and hands back the raw theme JSON; the renderer converts it to a DesktopTheme with a small seed → color-mix mapping. - Folds an extension's light + dark variants into one theme family, so the light/dark toggle switches Solarized/GitHub variants and installing in dark mode stays dark. - Guarantees accent contrast (WCAG AA) so imported sidebar labels read instead of vanishing into the surface. - Filters icon/product-icon packs out of the Themes-category search. - "Install theme…" lives atop the Cmd-K theme picker; imports fold into the Light/Dark groups by the modes they support.
Contributor
🔎 Lint report:
|
tonydwb
reviewed
Jun 10, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Comment (Large Feature PR)
Scope
- 1,842 additions, 100 deletions — a substantial new feature (VS Code theme marketplace installer for the desktop app).
Security
- No obvious security concerns. The theme installation downloads from the VS Code Marketplace API and writes to a local cache directory.
Code Quality
- The theme loading logic is well-structured with proper error handling (
ThemeDownloadError,ThemeCacheError). - CSS variable parsing uses regex-based token extraction which appears robust for the standard VS Code theme format.
- No debug artifacts found.
Suggestion
- Consider adding rate limiting or a timeout on Marketplace API requests to prevent hang on network issues.
- The
map_tokens_to_palettefunction is well-tested. The fallback mapping logic (derived_fallbacks) is a nice touch for incomplete themes.
Reviewed by Hermes Agent
…-themes # Conflicts: # apps/desktop/electron/main.cjs # apps/desktop/src/app/command-palette/index.tsx # apps/desktop/src/themes/context.tsx
…Ctrl-Tab HUDs Imported VS Code themes now carry their integrated-terminal ANSI palette (`terminal.ansi*`), keyed to the painted variant (terminal / darkTerminal). The terminal adopts it when the full base-8 set is present and keeps its VS Code defaults otherwise; withSurface still owns the background, so the pane stays translucent. Pull the command palette and session switcher into a shared top-center HUD (`floating-hud.ts`): no dim/blur backdrop, one compact text + item-padding size, sidebar-label-style section headers (brand-tinted, uppercase), and the themed portal scrollbar.
The 'Install theme…' page is the one palette page rendered as a bespoke component rather than through the shared CommandItem loop, so it missed the compact HUD sizing. Route it through HUD_ITEM/HUD_TEXT and top-align the row icon + status with the title line.
…w-nous) for the HUDs Drop the ad-hoc border + shadow-xl for the design-system borderless-overlay pair already used by the dialog, keybind panel, and notification stack.
alt-glitch
pushed a commit
that referenced
this pull request
Jun 14, 2026
feat(desktop): install any VS Code theme from the Marketplace
T02200059
pushed a commit
to T02200059/hermes-agent
that referenced
this pull request
Jun 18, 2026
…ketplace-themes feat(desktop): install any VS Code theme from the Marketplace
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Install any color theme from the VS Code Marketplace, right from the desktop app — no hand-curated presets required. Imported themes now also drive the integrated terminal, and the Cmd-K / Ctrl-Tab HUDs got a compact, shared restyle.
publisher.extensioninstaller for the same pipeline./skin).How it works
vscode-marketplace.cjs) resolves the extension via the gallery API, downloads the.vsix, and unzips it with a tiny hand-rolled central-directory reader (zlibonly — no new deps), handing back the raw color-theme JSON. No theme code is ever executed.DesktopTheme: ~6 load-bearing workbench tokens (editor.background,editor.foreground, accent, elevated, sidebar, error) seed the palette; everything else derives viacolor-mix(). That's the "naive token converter" — turns out 6 variables really is enough.Terminal ANSI inheritance
terminal.ansi*, foreground, cursor, selection), keyed to the painted variant (terminal/darkTerminal) just likecolors/darkColors.backgroundis never adopted —withSurfacekeeps the live skin surface, so the pane stays translucent. Set Solarized → Solarized terminal.HUD restyle (Cmd-K + Ctrl-Tab)
floating-hud.ts(HUD_POSITION/HUD_SURFACE/HUD_TEXT/HUD_ITEM/HUD_HEADING): pinned under the title bar, crisp border + shadow, no dim/blur backdrop.--theme-primary, uppercase, tightly tracked — plain text, no sticky chrome bar). Portaled lists get the themed thin scrollbar (dt-portal-scrollbar) instead of the raw OS one.CommandItempath on the shared tokens; the only bespoke page (the server-driven "Install theme…" search) consumes the same tokens, so submenus stay consistent without per-page styling.The fiddly bits (all fixed)
colorsand the first dark ontodarkColors, so it's one picker entry whose light/dark toggle switches the real variants — and installing in dark mode stays dark.--theme-primary; dim brand colors were invisible on the sidebar. The converter prefers saturated brand tokens (button/link/badge) over a mutedfocusBorder, then enforces WCAG AA (4.5:1) contrast against the sidebar.Supersedes
Supersedes #40450 (hand-adding Nord/Solarized/Catppuccin presets) and closes #40399 — rather than curating a fixed preset list, users install those exact themes (and thousands more) on demand.
Test plan
Tests:
vscode.test.ts,install.test.ts,user-themes.test.ts,electron/vscode-marketplace.test.cjs(43 vitest + 5 node).