Skip to content

[Bug]: Desktop context menus do not inherit imported VS Code themes #10997

Open

Description

@gfdelarue

Before submitting

Area

apps/desktop

Summary

Desktop application context menus do not inherit the active imported VS Code theme palette. The main UI adopts the imported colors, but the thread context menu keeps the native menu colors. Importing a theme therefore leaves a visible part of the application unthemed.

Steps to reproduce

  1. Open the T3 Code desktop app.
  2. Import and select a dark VS Code theme with a visibly colored palette, such as a blue background, through the theme settings.
  3. Right-click a thread in the sidebar.
  4. Compare the menu background, text, separators, and selection colors with the selected theme. Open a submenu such as Snooze or Copy as well.
  5. Switch to another imported theme with the same dark appearance but different colors, then reopen the menu.

Expected behavior

Application context menus and their submenus use the active imported theme's corresponding palette colors and update when the selected theme changes.

Actual behavior

With an imported blue theme active, the sidebar uses the imported colors, but the thread context menu remains grey.

Source inspection explains the desktop mismatch: selecting a custom palette updates the web UI, while the desktop menu path receives only a light, dark, or system appearance setting.

Impact

Cosmetic issue. Imported themes render inconsistently across the application's own controls.

Version or commit

Source inspected at 061543e9e5b54ec0048725c37d52fef2962df173. The affected installed build was not independently identified. No fresh interactive reproduction was performed during this investigation.

Environment

Desktop application context-menu path. Exact release and OS version were not captured with the report.

Source evidence

  • localApi.ts routes desktop context menus through desktopBridge.showContextMenu; browser clients use showContextMenuFallback.
  • ElectronMenu.ts builds and opens an Electron menu without the imported palette.
  • DesktopThemeSchema carries only light, dark, or system. ElectronTheme.ts applies that setting to Electron.nativeTheme.themeSource.
  • The existing browser context menu uses application theme variables. This provides a reference for the expected palette integration.

Scope and related issue

This report covers application context menus and their submenus when an imported VS Code theme is active. Native filesystem dialogs and syntax highlighting are outside its scope.

#333 previously requested custom Linux menus and dialogs. It was closed with a comment stating that application context menus had been replaced. This fresh report isolates imported-theme inheritance, which the current desktop menu path still does not provide.

Workaround

The browser client uses a menu that reads the application theme variables, according to source inspection. That workaround has not been verified interactively for this report.

Activity

  1. juliusmarminge commented on Sep 9, 2026

    @juliusmarminge
    Member

    Thanks for isolating this from #333 and for the source pointers. Confirmed on current main: this is a real desktop chrome mismatch, not a duplicate of the closed Linux custom-menu request.

    What happens today

    Selecting an imported VS Code theme updates the web UI palette (applyThemePalette / CSS variables). The desktop shell only receives light | dark | system via DesktopThemeSchema → desktopBridge.setTheme → Electron.nativeTheme.themeSource.

    Application context menus on desktop never see that palette. localApi routes window.desktopBridge to ElectronMenu.showContextMenu, which builds a native Menu and pops it with no colors. The browser path (showContextMenuFallback) already uses application theme variables (dropdown-glass, --contrast-popover-foreground, --contrast-border). Switching between two dark imported themes therefore changes the sidebar and leaves the thread menu (and Snooze/Copy submenus) on native grey.

    Electron has no API to paint native menus with a custom workbench palette, so this is not a missing hex in the current IPC.

    Not the same as

    Prior attempts

    PRs that routed desktop through the themed HTML menu were closed without merge: #280, #6440 (Windows/Linux HTML, macOS native), #7998 (desktop → glass menu). Those were broader than this report and were not taken forward as written. Julius has also preferred keeping native macOS menus.

    Next

    Keep this open for a product call before anyone implements it.

    1. Document native menus as light/dark-only (expected), or
    2. Use the existing HTML fallback on desktop when a custom/imported theme is active, or
    3. HTML fallback on Windows/Linux only, keep macOS native.

    Filesystem dialogs and syntax highlighting stay out of scope, as the report says. Any HTML-menu change should account for #10390 and #10504 so we do not regress native focus or icon work.

  2. TonybynMp4 commented on Oct 3, 2026

    @TonybynMp4
    Contributor

    One more option for the product call: make it a desktop-only Appearance setting, Context menus: Native / App, defaulting to Native.

    I'd really be interested in this because the native menu really sucks compared to the web version.

  3. TonybynMp4 commented on Oct 17, 2026

    @TonybynMp4
    Contributor

    @juliusmarminge could you weigh in on the setting above when you get a chance?

    i made the setting and it's ready for a PR if you want it.

  4. swsammy commented on Nov 14, 2026

    @swsammy
    Contributor

    +1 for the Context menus: Native / App setting @TonybynMp4 proposed above, with Native as the default.

    On KDE Plasma 6.6 (Wayland), the native menu is drawn by Chromium from the GTK theme, so it matches neither the app nor the desktop. It's awful. Setting Breeze as the GTK theme only gets it partway.

    I also tried the App menu on desktop with a local patch, styled with theme Custom CSS (#35247) to copy Breeze. What I found:

    • Colours and spacing can match exactly. Background, frame, highlight, row height and padding measure the same as Dolphin's menu, pixel for pixel.
    • The text can't. Everything in the window, native Electron menus included, is drawn by Chromium's text engine, not Qt. Even at the best size, the letters come out heavier and softer than KDE's. No CSS or Chromium flag changes that on Linux, so a real Breeze menu isn't possible from Electron.

    Side by side, the App menu still looks wrong next to a real KDE menu:

    Native menu today App menu + Custom CSS Dolphin
    Native menu App menu with Custom CSS Dolphin menu

    It's still better than today's native menu, which follows neither T3 Code's theme nor the desktop, so I'd switch to the App option for context menus as soon as it ships.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-juliusvia-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions