feat(desktop): add Resources menu with Cmd+Shift+U shortcut
Summary
- Add a top-level Resources menu (alongside File/Edit/View/Window/Help) with a "Check Resources" item that opens the existing resource usage (CPU/RAM) view — for mouse-driven discoverability of the feature.
- The ⇧⌘U shortcut that already opened this view continues to be owned by the renderer's user-customizable hotkey system (Settings > Keyboard), unchanged by this PR.
Why / Context
Cmd+Shift+U already opened the resource monitor via a renderer useHotkey binding, but "Resources" wasn't discoverable anywhere in the UI (menu or otherwise) for users who don't know the shortcut.
An earlier version of this PR also added the shortcut as a native Electron menu accelerator. Cubic's review correctly flagged that as a regression: CHECK_RESOURCES is rebindable/disable-able via Settings > Keyboard (hotkeyOverridesStore, persisted in renderer localStorage, no main-process access), and a native accelerator is unconditionally live on macOS — it would fire and ignore a user's override or disable. That's been reverted; the renderer's useHotkey remains the sole source of truth for the actual keybinding, matching what the command palette already displays.
How It Works
main/lib/menu.ts: new "Resources" → "Check Resources" menu item, no accelerator. Click emits acheck-resourcesevent via the sharedmenuEmitter.lib/trpc/routers/menu.ts: addedcheck-resourcesto theMenuEventunion and wired it into the existingobservablesubscription.renderer/commandPalette/CommandPaletteHost.tsx:useHotkey("CHECK_RESOURCES", ...)still owns the keyboard shortcut (override-aware); a new subscription to thecheck-resourcesmenu event triggers the same action when the menu item is clicked.
Manual QA Checklist
- "Resources" menu appears in the app menu bar between Window and Help
- Clicking Resources → Check Resources opens the resource usage view in the command palette
- Cmd+Shift+U still opens the same view
- Rebinding or disabling
CHECK_RESOURCESin Settings > Keyboard changes/disables the shortcut, and the command palette hint reflects it (menu click still works regardless) - Behavior verified after app restart (native menu is main-process, not renderer-hot-reloaded)
Testing
bun run lint:fix(clean)bun run typecheck --filter=@superset/desktop(passes)- Not yet verified end-to-end against a running app — no dev instance was running for this worktree, and native OS menu chrome isn't inspectable via CDP. Flagging for reviewer/manual QA per the checklist above.
Known Limitations
- No automated test coverage added; this is a small, mechanical menu/IPC wiring change consistent with existing untested sibling menu items (Settings, Keyboard Shortcuts).
- The menu item doesn't display the shortcut hint text — Electron accelerators are unconditionally live on macOS, so showing one would reintroduce the override-bypass bug above. The shortcut is discoverable via the command palette and Settings > Keyboard instead.
Summary by CodeRabbit
- New Features
- Added a Resources section to the application menu with a Check Resources option.
- Selecting Check Resources opens the resource-checking command palette.
- Native menu actions now use the same resource-checking workflow as the configurable keyboard shortcut.
- Existing keyboard shortcuts for opening resource checks remain available and customizable.