Context
Theme is cycleable from two surfaces (TitleBar/Toolbar) but not from the menu bar — and macOS uses the menu bar as the primary UI surface.
Problem
src/components/layout/MenuBar.tsx:11-89 defines 5 menus (File, Edit, Connection, Database, Help) plus a Tools menu with format-sql and conditional ai-assistant. There is no theme-cycle menu item. The Help menu has check-for-updates but not theme.
As a result, the only way to change theme from inside the menu bar (relevant for macOS where the OS menu bar is the primary surface) is to drop down to the Toolbar — but macOS uses Toolbar (not TitleBar), which sits inline at the top of the window. The user has no menu shortcut for theme.
Compared to other IDE conventions (VS Code: Preferences > Theme > Color Theme; DataGrip: View > Quick Switch Scheme; IntelliJ: View > Quick Switch Scheme), this is a missing affordance.
AppLayout.tsx's handleAction switch (lines 94-167) also has no cycle-theme / set-theme case — even if a menu item existed, the dispatcher wouldn't handle it.
The cross-cutting audit (docs/audits/cross-cutting.md F8) flagged this as P1.
Files
- src/components/layout/MenuBar.tsx:11-89 — menu items, no theme
- src/components/layout/AppLayout.tsx:94-167 —
handleAction switch, no theme case
- src-tauri/src/menu.rs — native macOS menu (no theme entry either)
Repro
On macOS, open SQLPilot → look at the top of the screen → no menu item changes theme.
Expected
A Theme (or View > Theme) submenu listing the 3 modes (Dark / Light / System), or a single Cycle Theme item. AppLayout.handleAction handles cycle-theme and set-theme actions. The native macOS menu (built in src-tauri/src/menu.rs) also gains the same entry for View > Theme.
Proposed fix
Scope S. Add a Theme submenu under the existing menus in MenuBar.tsx:
{ label: "Theme", submenu: [
{ type: "item", id: "set-theme-dark", label: "Dark" },
{ type: "item", id: "set-theme-light", label: "Light" },
{ type: "item", id: "set-theme-system", label: "System" },
{ type: "separator" },
{ type: "item", id: "cycle-theme", label: "Cycle Theme", shortcut: "Cmd+Shift+T" },
]}
Wire 4 new actions in AppLayout.handleAction (set-theme-dark, set-theme-light, set-theme-system, cycle-theme). Update src-tauri/src/menu.rs for the native macOS menu parity.
Acceptance
macOS users can change theme via the menu bar (View > Theme or wherever placed). MenuBar.tsx has 4 new theme actions wired through AppLayout.tsx's handleAction switch. src-tauri/src/menu.rs is updated for native parity.
Needs human verify
Yes (macOS-native menu rendering not testable on Linux).
Labels: audit, area/cross-cutting, severity/p1, kind/bug
Context
Theme is cycleable from two surfaces (TitleBar/Toolbar) but not from the menu bar — and macOS uses the menu bar as the primary UI surface.
Problem
src/components/layout/MenuBar.tsx:11-89defines 5 menus (File, Edit, Connection, Database, Help) plus a Tools menu withformat-sqland conditionalai-assistant. There is no theme-cycle menu item. The Help menu hascheck-for-updatesbut not theme.As a result, the only way to change theme from inside the menu bar (relevant for macOS where the OS menu bar is the primary surface) is to drop down to the Toolbar — but macOS uses
Toolbar(not TitleBar), which sits inline at the top of the window. The user has no menu shortcut for theme.Compared to other IDE conventions (VS Code:
Preferences > Theme > Color Theme; DataGrip:View > Quick Switch Scheme; IntelliJ:View > Quick Switch Scheme), this is a missing affordance.AppLayout.tsx'shandleActionswitch (lines 94-167) also has nocycle-theme/set-themecase — even if a menu item existed, the dispatcher wouldn't handle it.The cross-cutting audit (docs/audits/cross-cutting.md F8) flagged this as P1.
Files
handleActionswitch, no theme caseRepro
On macOS, open SQLPilot → look at the top of the screen → no menu item changes theme.
Expected
A
Theme(orView > Theme) submenu listing the 3 modes (Dark / Light / System), or a singleCycle Themeitem.AppLayout.handleActionhandlescycle-themeandset-themeactions. The native macOS menu (built insrc-tauri/src/menu.rs) also gains the same entry forView > Theme.Proposed fix
Scope S. Add a
Themesubmenu under the existing menus inMenuBar.tsx:Wire 4 new actions in
AppLayout.handleAction(set-theme-dark,set-theme-light,set-theme-system,cycle-theme). Updatesrc-tauri/src/menu.rsfor the native macOS menu parity.Acceptance
macOS users can change theme via the menu bar (
View > Themeor wherever placed).MenuBar.tsxhas 4 new theme actions wired throughAppLayout.tsx'shandleActionswitch.src-tauri/src/menu.rsis updated for native parity.Needs human verify
Yes (macOS-native menu rendering not testable on Linux).
Labels: audit, area/cross-cutting, severity/p1, kind/bug