Polish web context menu fallback and sidebar icon actions #3025
main fromrefs/pull/3025/head·merged by juliusmarminge View on GitHubPorts the context-menu/sidebar part of #2451 by @sandersonstabo, rebased onto current main.
- The browser (non-Electron) context menu fallback now opens reliably: dismissal uses capture-phase document listeners instead of a fullscreen overlay (fixing the "opens then immediately disappears" failure), and gets restyled to match app menu density with full-bleed hover, muted inline icons, and destructive rows red at rest
ContextMenuItemgains optionalheader/iconfields (also added to the IPC schema so they survive validation); desktop strips header items since native menus have no equivalent- Project right-click menu actions renamed to Rename / Group into... / Copy Path / Remove, with icons in the web fallback
- Sidebar icon actions (archive, new thread, sort, add project) share a consistent 24px ghost footprint; "new thread in project" rows in the command palette show the
chat.newshortcut
Not ported (per Theo's feedback on #2451): the Shortcut keycap-splitting component — existing Kbd rendering is kept everywhere.
Part of splitting #2451 into reviewable frontend-only pieces.
🤖 Generated with Claude Code
Note
Low Risk UI-only changes to context menu rendering, sidebar styling, and optional IPC fields; desktop strips unsupported fields and existing native menus are unchanged aside from header filtering.
Overview Polishes browser context menus and sidebar chrome without changing Electron’s native menu behavior beyond stripping web-only metadata.
ContextMenuItem gains optional header and icon on the IPC contract/schema. Desktop normalizeContextMenuItems skips header rows; icon is for the web fallback only.
The web context menu fallback is reworked: fullscreen overlay dismissal is replaced with capture-phase pointerdown / contextmenu listeners (with a one-frame delay so the menu doesn’t close immediately), plus scrollable popover styling, section headers, inline Lucide-style SVG icons, and destructive row styling. Sidebar project/thread menus use shorter labels, trash on delete/remove, and a shared SIDEBAR_ICON_ACTION_BUTTON_CLASS for archive, new thread, sort, and add-project controls (with minor positioning and timestamp tabular-nums tweaks).
Command palette “new thread in project” rows can show the chat.new shortcut via an optional shortcutCommand on buildProjectActionItems.
Note
Polish web fallback context menu with icons, headers, and improved dismissal#
- Reworks
showContextMenuFallbackto support section header items, per-item icons (pencil, copy, folder-tree, trash), scrollable content, and refined hover/destructive/disabled styling. - Replaces the full-screen overlay dismissal with capture-phase
pointerdown/contextmenulisteners using amenuStack-aware hit test to avoid false dismissals. - Extends the
ContextMenuItemIPC type inipc.tswith optionalheaderandiconfields; header items are filtered out of Electron's native menu normalization. - Updates sidebar labels and icons in
CommandPalette.tsx(e.g. shorter context menu labels, trash icon on delete, sharedSIDEBAR_ICON_ACTION_BUTTON_CLASSconstant, tabular numeral timestamps).
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
🚀 Expo continuous deployment is ready!
- Project → t3-code
- Platforms → android, ios
- Scheme → t3code-preview
🤖 Android 🍎 iOS Fingerprint ae17d94b35f91f9c608a63dadbc3ddd9f4ba056e 313e506a7f15a9c3f15b01d787d68a12382432bf Build Details Build Permalink Details
Distribution:INTERNAL
Build profile:preview:dev
Runtime version:ae17d94b35f91f9c608a63dadbc3ddd9f4ba056e
App version:0.1.0
Git commit:7a5f7cfdc00b93a02fdb98365704ac0dde5b3dcaBuild Permalink Details
Distribution:INTERNAL
Build profile:preview:dev
Runtime version:313e506a7f15a9c3f15b01d787d68a12382432bf
App version:0.1.0
Git commit:7a5f7cfdc00b93a02fdb98365704ac0dde5b3dcaUpdate Details Update Permalink Details
Branch:pr-3025
Runtime version:ae17d94b35f91f9c608a63dadbc3ddd9f4ba056e
Git commit:7a5f7cfdc00b93a02fdb98365704ac0dde5b3dcaUpdate Permalink Details
Branch:pr-3025
Runtime version:313e506a7f15a9c3f15b01d787d68a12382432bf
Git commit:7a5f7cfdc00b93a02fdb98365704ac0dde5b3dcaUpdate QR Approvability#
Verdict: Approved
UI polish changes to context menus and sidebar styling - CSS adjustments, icon support, improved menu dismiss behavior, and shortened labels. All changes are visual/cosmetic with no impact on core business logic or security-sensitive areas.
You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge merged this3efabdc
juliusmarminge closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
aa73bcee-9061-4a67-ab01-699af0086bf6You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands and usage tips.