Skip to content
Source
Sign inSign up
pingdotgg/t3code

Polish web context menu fallback and sidebar icon actions #3025

Mergedjuliusmarmingemerged 4 commits intomain fromrefs/pull/3025/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

Ports 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
  • ContextMenuItem gains optional header/icon fields (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.new shortcut

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.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit e695574635de2b70fa08afc5544a0c7f6d5d481c. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Polish web fallback context menu with icons, headers, and improved dismissal

  • Reworks showContextMenuFallback to 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/contextmenu listeners using a menuStack-aware hit test to avoid false dismissals.
  • Extends the ContextMenuItem IPC type in ipc.ts with optional header and icon fields; 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, shared SIDEBAR_ICON_ACTION_BUTTON_CLASS constant, tabular numeral timestamps).
Macroscope summarized e695574.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro

      Run ID: aa73bcee-9061-4a67-ab01-699af0086bf6

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Commit unit tests in branch `ui/web-context-menu`

      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. github-actions[bot](GitHub profile, opens in a new tab)commented

      🚀 Expo continuous deployment is ready!

      • Project → t3-code
      • Platforms → android, ios
      • Scheme → t3code-preview
       🤖 Android🍎 iOS
      Fingerprintae17d94b35f91f9c608a63dadbc3ddd9f4ba056e313e506a7f15a9c3f15b01d787d68a12382432bf
      Build DetailsBuild Permalink
      DetailsDistribution: INTERNAL
      Build profile: preview:dev
      Runtime version: ae17d94b35f91f9c608a63dadbc3ddd9f4ba056e
      App version: 0.1.0
      Git commit: 7a5f7cfdc00b93a02fdb98365704ac0dde5b3dca
      Build Permalink
      DetailsDistribution: INTERNAL
      Build profile: preview:dev
      Runtime version: 313e506a7f15a9c3f15b01d787d68a12382432bf
      App version: 0.1.0
      Git commit: 7a5f7cfdc00b93a02fdb98365704ac0dde5b3dca
      Update DetailsUpdate Permalink
      DetailsBranch: pr-3025
      Runtime version: ae17d94b35f91f9c608a63dadbc3ddd9f4ba056e
      Git commit: 7a5f7cfdc00b93a02fdb98365704ac0dde5b3dca
      Update Permalink
      DetailsBranch: pr-3025
      Runtime version: 313e506a7f15a9c3f15b01d787d68a12382432bf
      Git commit: 7a5f7cfdc00b93a02fdb98365704ac0dde5b3dca
      Update QR
    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      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).
    5. juliusmarminge merged this3efabdc

    6. juliusmarminge closed this

Sign in to join this conversation.