feat(web): open diff files in external editor - #9670
Open
ipanasenko wants to merge 3 commits into
Open
Conversation
ipanasenko
force-pushed
the
feat/diff-header-open-in-editor
branch
from
September 4, 2026 14:48
0019684 to
5729ffb
Compare
ipanasenko
force-pushed
the
feat/diff-header-open-in-editor
branch
from
September 4, 2026 14:52
5729ffb to
0e98aa1
Compare
ipanasenko
marked this pull request as ready for review
September 4, 2026 16:37
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0e98aa1. Configure here.
Contributor
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds a new diff-header action that launches local or remote external editors and introduces associated path and editor-resolution behavior. The capability is localized and explicitly user-triggered, but its external side effects and shared DiffPanel integration warrant human review. You can add or adjust custom eligibility rules. Learn more. |
…-in-editor # Conflicts: # apps/web/src/components/DiffPanel.tsx
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.

The diff header filename opens the file in T3 Code’s internal viewer, but the header has no explicit way to open that file in the configured external editor.
This adds an external-editor button beside the copy-path action from #2403. The filename keeps its internal-viewer behavior, while the new action resolves the workspace-relative path and routes through the same preferred-editor setting used by the top Open control.
Built with GPT-5.6 Sol in the T3 Code harness.
Note
Add open-in-external-editor action to diff file headers in web UI
openDiffFileInEditorutility in diffFileActions.ts that resolves a diff path to a workspace-relative target before invoking the editor launcher; returns without action when path resolution failsDiffFileHeaderActionButtonandDiffFileOpenInEditorButtoncomponents in DiffFileHeaderActionButton.tsx and DiffFileOpenInEditorButton.tsx to render a labeled micro button with tooltip in each diff file headerDiffPanelin DiffPanel.tsx with a centralized launch callback that opens a remote editor URL or falls back to the existing local editor flow; the new button is disabled until the relevant environment and editor are availableDiffFilePathCopyButtonin DiffFilePathCopyButton.tsx to use the sharedDiffFileHeaderActionButtonprimitive instead of its own button compositionMacroscope summarized 9c10b1c.
Note
Low Risk
Scoped UI and path-resolution changes reusing existing editor and workspace helpers; no auth or data-handling changes.
Overview
Adds an Open in editor control next to the copy-path button on each diff file header, while filename clicks still open the in-app file viewer.
A shared
DiffFileHeaderActionButtonbacks both header actions.openDiffFileInEditorresolves workspace paths (same rules as the primary diff action) and invokes the editor launcher without opening the right-panel viewer.DiffPanelcentralizes launching inlaunchDiffFileInEditor, which uses remote editor URLs when available and otherwise the existing preferred local editor flow; the new button stays disabled until an editor can be resolved.Reviewed by Cursor Bugbot for commit 9c10b1c. Bugbot is set up for automated code reviews on this repo. Configure here.