Repository navigation
fix(server): pass project root to JetBrains editor launches - #7194
maslinedwin wants to merge 1 commit into
Conversation
JetBrains CLIs were started as `idea --line 168 --column 4 /file`, so IntelliJ could reuse the wrong project window. Carry the thread's known workspace root on the launch request and emit `idea /project --line 168 --column 4 /file` when that root is present. Made with Grok (T3 Code).
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
ApprovabilityVerdict: Approved 5325a42 Straightforward bug fix that adds an optional You can customize Macroscope's approvability policy. Learn more. |
|
Note: GPT-6 on behalf of shivam (@shivamhwp). Please rebase this onto current main. The |
|
Note This comment is posted by Julius' dot Closing for missing verification results. The PR adds launcher regression tests but reports no executed checks or results for this branch. The command examples in #5885 establish the intended arguments, but do not verify that the changed entry points pass the correct worktree root. Run the focused launcher tests, report their results, and document a positioned file launch into worktree B while worktree A is already open before requesting reconsideration. |
JetBrains CLIs were launched as
idea --line 168 --column 4 /abs/worktree-b/src/File.java. Without the project/worktree root, IntelliJ can reuse the wrong window, open LightEdit, or fail when another checkout of the same repo is already open.LaunchEditorInputnow carries an optionalprojectRootfrom the thread's known workspace cwd (chat links, diffs, git file actions, terminal links, file preview). Line-column launches become:If the root is missing, the previous arg shape is unchanged.
--columnis still omitted when no column is present. VS Code--gotoand Zed direct-path launches are unchanged. The root is never inferred from the file path.Fixes #5885
Made with Grok (T3 Code).
Note
Low Risk
Scoped to optional editor launch args and UI plumbing; backward-compatible when projectRoot is omitted, with regression tests for JetBrains CLI shapes.
Overview
Fixes JetBrains line-column launches opening the wrong project window when multiple checkouts exist by threading an optional
projectRootthroughLaunchEditorInputand the web “open in editor” paths.When
projectRootis set,externalLauncherprepends it before--line/--columnand the file path (e.g.idea /abs/worktree-b --line 168 --column 4 …). Without it, JetBrains args stay the old shape. VS Code (--goto) and Zed direct-path launches are unchanged.The UI passes the thread/workspace
cwdasprojectRootfrom chat markdown links, diff panel, git file actions, terminal links, file preview, andOpenInPicker/useOpenInPreferredEditor. New server tests lock in the arg shapes.Reviewed by Cursor Bugbot for commit 5325a42. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Pass project root to JetBrains editor launches
projectRootfield toLaunchEditorInputin editor.ts and threads it throughresolveCommandEditorArgsin externalLauncher.tsline-columnlaunch style (e.g. JetBrains CLIs),projectRootis prepended to the args before--linewhen a file position is presentChatMarkdown,DiffPanel,GitActionsControl,OpenInPicker, etc.) now pass their localcwdor equivalent asprojectRootMacroscope summarized 5325a42.