Extras icon indicating copy to clipboard operation
Extras copied to clipboard

[email protected]: Add context menu

Open nagromc opened this issue 1 month ago β€’ 4 comments

Closes #16522

  • [x] Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • [x] I have read the Contributing Guide

Summary by CodeRabbit

  • New Features
    • Adds Windows context menu integration so users can right-click files, folders, or folder backgrounds to open them with Zed.
    • Includes installation and uninstallation scripts to manage the context menu.
    • Installer manifest enhanced with install/uninstall hooks and user-facing notes to support post-install and pre-uninstall actions.

nagromc avatar Nov 03 '25 12:11 nagromc

Walkthrough

Adds Windows Registry install/uninstall scripts that create/remove "Open with Zed" context menu entries for files, directories, and directory backgrounds, and extends the installer manifest with notes, post_install, and pre_uninstall fields.

Changes

Cohort / File(s) Summary
Windows context menu scripts
scripts/zed/install-context.reg, scripts/zed/uninstall-context.reg
Adds an install .reg that registers "Open with Zed" handlers under HKEY_CURRENT_USER\Software\Classes for *, Directory, and Directory\Background (sets display name, icon, and command using %1/%V). Adds an uninstall .reg that deletes the three keys.
Installer manifest
bucket/zed.json
Adds notes (array), post_install (array), and pre_uninstall (string) fields to the manifest. No other behavioral changes.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Explorer
  participant Registry as Windows Registry
  participant ZedApp as Zed.exe

  rect rgb(240,248,255)
    User->>Explorer: Right-click file/dir/background
    Explorer->>Registry: Read context menu handler for clicked item
    Registry-->>Explorer: Return "Open with Zed" command (with %1/%V)
    Explorer->>ZedApp: Launch "Zed.exe" with argument (%1 or %V)
    ZedApp-->>User: Open item in editor
  end

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify registry paths and key names under HKEY_CURRENT_USER\Software\Classes.
  • Confirm command-line argument placeholders (%1 for files, %V for directories/background) are correct for intended behavior.
  • Review bucket/zed.json additions for schema/validation compatibility and correct intended scripting semantics.
  • Ensure uninstall .reg removes exactly the keys created by install .reg.

Suggested labels

review-needed

Suggested reviewers

  • chawyehsu

Poem

🐰 Frolic in the shell, a click and Zed hops near,

Files and folders open wide β€” the editor appears,
A tiny rabbit cheers, "Context menu, you’re the key!" πŸ₯•βœ¨

Pre-merge checks and finishing touches

βœ… Passed checks (4 passed)
Check name Status Explanation
Title check βœ… Passed The pull request title '[email protected]: Add context menu' clearly and directly summarizes the main change. It follows the conventional format specified in the template (<manifest-name[@version]>: <general summary>), identifying the package and version being updated along with the specific feature being added.
Description check βœ… Passed The pull request description is mostly complete and follows the required template structure. It includes the issue reference (Closes #16522) and has both required checkboxes marked as complete, indicating the author has used the conventional PR title format and read the contributing guide. However, the description could benefit from more detail about the specific changes being made.
Linked Issues check βœ… Passed The pull request successfully addresses the linked issue #16522 by adding Windows Explorer context menu support to Zed. The changes include install-context.reg registering the 'Open with Zed' context menu entries for files, directories, and directory backgrounds, and uninstall-context.reg removing these entries. The manifest updates in bucket/zed.json add post_install and pre_uninstall hooks to execute the registry scripts during installation and uninstallation.
Out of Scope Changes check βœ… Passed All changes in the pull request are directly related to implementing Windows Explorer context menu support as outlined in issue #16522. The three files modified (install-context.reg, uninstall-context.reg, and bucket/zed.json) are all necessary for adding and managing the context menu feature, with no extraneous modifications.
✨ Finishing touches
πŸ§ͺ Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

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.

coderabbitai[bot] avatar Nov 03 '25 12:11 coderabbitai[bot]

@coderabbitai review

nagromc avatar Nov 03 '25 13:11 nagromc

βœ… Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot] avatar Nov 03 '25 13:11 coderabbitai[bot]

This PR has been in draft status for over a month. Is it ready for review now? Or would it be better if I close it for now and you reopen it once it's ready?

z-Fng avatar Dec 09 '25 21:12 z-Fng

I will come back to this soon.

nagromc avatar Dec 15 '25 09:12 nagromc