Open diff files in editor from clickable diff headers#127
Merged
juliusmarminge merged 1 commit intomainfrom Mar 1, 2026
Merged
Open diff files in editor from clickable diff headers#127juliusmarminge merged 1 commit intomainfrom
juliusmarminge merged 1 commit intomainfrom
Conversation
- Add click handling on diff file headers (`data-title`) to open files via native `openInEditor` - Resolve file paths against active thread/project cwd before launching editor - Add header hover affordance and tighten diff panel spacing
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openInEditor.Testing
Note
Medium Risk
Adds a new click-to-open behavior that invokes the native
shell.openInEditorbridge and resolves paths against thread/project working directories, which could affect Electron/desktop integrations and path handling.Overview
Makes diff file headers clickable in
DiffPanelso selecting a header opens that file in the user’s preferred terminal editor via the native API.Paths are resolved relative to the active thread worktree or project
cwd, failures are handled with a warning, and the diff UI gets small spacing/hover-style tweaks (header underline/hover, tighter padding, per-file margins).Written by Cursor Bugbot for commit 9a30a50. This will update automatically on new commits. Configure here.
Note
Add clickable diff file headers that open the file in the preferred terminal editor from DiffPanel.tsx
Add
onClickCaptureto detect clicks on[data-title]elements and callreadNativeApi().shell.openInEditorwith a path fromresolvePathLinkTargetusingpreferredTerminalEditor; update styles viaDIFF_PANEL_UNSAFE_CSSand adjust container padding/margins.📍Where to Start
Start with the
openDiffFileInEditorcallback and theonClickCapturehandler in DiffPanel.tsx.Macroscope summarized 9a30a50.