Skip to content

Fix desktop context menu rendering#280

Open
krishkalaria12 wants to merge 5 commits intopingdotgg:mainfrom
krishkalaria12:fix/context-menu-desktop
Open

Fix desktop context menu rendering#280
krishkalaria12 wants to merge 5 commits intopingdotgg:mainfrom
krishkalaria12:fix/context-menu-desktop

Conversation

@krishkalaria12
Copy link

@krishkalaria12 krishkalaria12 commented Mar 7, 2026

image
  • replace the desktop native context menu path with the in-app renderer menu so thread/project right-click menus no longer show the extra backdrop layer in the frameless window
  • clean up the fallback context menu rendering by resetting native button chrome, keeping a single menu surface, preserving outside-click/escape dismissal, and adding the destructive separator before Delete
  • stop contextmenu propagation on sidebar rows and fix the desktop dev script so bun run dev:desktop reliably starts both the bundle watcher and Electron

Note

Replace native Electron context menus with in-app context menus in the desktop sidebar

  • Removes the desktop:context-menu IPC channel, the showContextMenu bridge method, and contextMenu.show from NativeApi, replacing all native/Electron menu rendering with a React-based implementation.
  • Adds a reusable context-menu.tsx component backed by @base-ui/react/context-menu, used directly in Sidebar.tsx.
  • Thread and project context menus now render in-app with the same actions (rename, mark unread, copy ID, delete), including multi-select variants that display item counts.
  • Deletes the DOM-based contextMenuFallback.ts previously used in non-Electron environments.
  • Behavioral Change: window.desktopBridge.showContextMenu and nativeApi.contextMenu.show no longer exist; any external callers will get undefined.

Macroscope summarized dbe4965.

@vercel
Copy link

vercel bot commented Mar 7, 2026

@krishkalaria12 is attempting to deploy a commit to the Ping Labs Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Mar 7, 2026

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: 59ddd2d5-2175-4715-86a6-a428e21a8e5a

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
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can generate a title for your PR based on the changes.

Add @coderabbitai placeholder anywhere in the title of your PR and CodeRabbit will replace it with a title based on the changes in the PR. You can change the placeholder by changing the reviews.auto_title_placeholder setting.

@vercel
Copy link

vercel bot commented Mar 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
t3code-marketing Ready Ready Preview, Comment Mar 7, 2026 10:16am

Request Review

@t3dotgg
Copy link
Member

t3dotgg commented Mar 7, 2026

Not sure what happened to the diff but github is now convinced you edited a bunch of stuff you didn't. Rebase on main I guess

@krishkalaria12
Copy link
Author

Not sure what happened to the diff but github is now convinced you edited a bunch of stuff you didn't. Rebase on main I guess

Cleaned it up and dropped the unrelated desktop dev-script change. It was already on top of main, so no real rebase was needed i guess

@github-actions github-actions bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Mar 9, 2026
@maria-rcks
Copy link
Collaborator

@krishkalaria12 pls resolve conflicts / rebase

@maria-rcks maria-rcks added enhancement Requested improvement or new capability. needs-julius labels Mar 12, 2026
@krishkalaria12 krishkalaria12 force-pushed the fix/context-menu-desktop branch from 917efbc to 424397e Compare March 12, 2026 03:57
@krishkalaria12
Copy link
Author

@krishkalaria12 pls resolve conflicts / rebase

I have resolved the conflicts,, can you check once ?

@juliusmarminge
Copy link
Member

i don't understand the issue with the native one. can you post some before/after pics that explains it?

CleanShot 2026-03-12 at 10 49 52@2x

@maria-rcks
Copy link
Collaborator

it looks mostly out of place on linux window managers, and keeping the styling of the app on the menu would be nice

121859.mp4

@juliusmarminge
Copy link
Member

maybe it's just that I'm a sucker for keeping things native but the built in macos picker looks a lot better than the current web one imo. if we're going web only we should use the base-ui one: https://base-ui.com/react/components/context-menu

@github-actions github-actions bot added the size:L 100-499 changed lines (additions + deletions). label Mar 13, 2026
@krishkalaria12
Copy link
Author

maybe it's just that I'm a sucker for keeping things native but the built in macos picker looks a lot better than the current web one imo. if we're going web only we should use the base-ui one: https://base-ui.com/react/components/context-menu

Maybe if you want, the changes can be done only for linux and keep the other os as it is ?
What do you prefer ?

@github-actions github-actions bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Mar 13, 2026
@krishkalaria12
Copy link
Author

I have done it using base ui

image

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

Labels

enhancement Requested improvement or new capability. needs-julius size:XL 500-999 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants