Skip to content

Comments

Added Context Menu for Search Results (Right-Click Feature)#1183

Closed
Harmanpawar15 wants to merge 3 commits intoHeyPuter:mainfrom
Harmanpawar15:feature/search-context-menu
Closed

Added Context Menu for Search Results (Right-Click Feature)#1183
Harmanpawar15 wants to merge 3 commits intoHeyPuter:mainfrom
Harmanpawar15:feature/search-context-menu

Conversation

@Harmanpawar15
Copy link

📝 Summary

This PR adds a right-click context menu to search results using UIContextMenu. Users can now:

  • Right-click on a search result to see a menu.
  • Choose "Open File" to open the file (same as left-click).
  • Choose "Open Containing Folder" to navigate to the file’s location in File Explorer.

✅ Changes

  • Integrated UIContextMenu for search results.
  • Preserved existing left-click behavior.
  • Used UIWindow to open the containing folder.

🔍 How to Test

  1. Search for a file.
  2. Right-click on a result → A context menu should appear.
  3. Click "Open File" → The file should open.
  4. Click "Open Containing Folder" → File Explorer should open at the file’s location.

📌 Notes

  • No existing functionality was altered.
  • This aligns with the contributing guidelines and maintains UI consistency.

@KernelDeimos
Copy link
Contributor

Manually tested - looks good. Concerning the UX, I had two thoughts that are in conflict:

  • It's convenient that the search window doesn't close when you open something, because you might want to open another result as well
  • The fact that it doesn't close looks kind of like a bug because of the nature of this type of dialog (dialogs with an overlay typically disappear when you take an action)

This a solution I think will keep the convenience of the window not closing and make it seem more natural: if you click an item normally the search window goes away like it usually does, if you right-click an item and open it that way the dialog turns into a regular window. (i.e. no overlay, so it won't go away if you click outside of it; has a titlebar shown so there's an X button). Let me know if this makes sense or if you have any questions. I'm also going to tag @jelveh in case he wants to weigh in.

I recorded a manual test (1.6x speed)

pr-1183_1.6x.mp4

@KernelDeimos
Copy link
Contributor

Also I think the use of emojis in comments is something we should do more often. I makes separate sections of the code quicker to identify (really important because I think a developer's brain has to perform that task unconsciously a lot more frequently than we think about) and it's super on-point with Puter's brand/personality. (+ everything should support UTF-8 nowadays)

@KernelDeimos
Copy link
Contributor

Hi, are you still working on this? If not, we can merge it into a feature branch and see if someone else picks it up. Otherwise we just need left-click to close the dialogue - that's the most important change because it's a UX regression, and I can merge this after that. We can sort out the nuance of right-click behavior later.

@Harmanpawar15
Copy link
Author

Hey @KernelDeimos, thanks for the detailed feedback! 😊

Apologies for the delay—had some technical issues with my laptop, but I just got it back today. I’ll work on the left-click behavior fix ASAP and push an update soon.

I agree with your suggestion regarding right-click behavior, and I’ll keep that in mind while making the changes. Will follow up once the fix is ready! 🚀

Thanks again for the patience!

@jelveh jelveh closed this Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants