fix(server): strip positions from file manager targets - #5854
Conversation
|
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 |
e2dc2a4 to
89513fd
Compare
ApprovabilityVerdict: Approved 89513fd Straightforward bug fix that strips line/column position suffixes from paths when launching file managers (which don't support position syntax unlike editors). Limited scope, comprehensive test coverage, and safe fallback behavior. You can customize Macroscope's approvability policy. Learn more. |
What Changed
:line[:column]positions before launching a target with the file manager when the parsed base path exists.:digits.Why
Markdown file links encode editor positions in the launch target. Command editors understand that syntax, but the file-manager path currently passes it unchanged to
open,explorer, orxdg-open. The operating system then receives a nonexistent path such as/Users/tester/.claude/CLAUDE.md:4, so the click can appear to do nothing.The normalization is in the server launcher because that is where the selected launch integration is known. It keeps an exact existing path. It removes a parsed position only when the exact target is missing and the parsed base path exists. If neither path exists, it keeps the original target. This avoids changing valid POSIX filenames such as
report:2024.This is narrower than #681, which combined suffix stripping with editor fallback behavior. It is also separate from #5366, which adds a new Open in folder action. This PR fixes the existing primary Open in editor action when File Manager is the preferred integration.
Verification
vp test run apps/server/src/process/externalLauncher.test.tsvp fmt --check apps/server/src/process/externalLauncher.ts apps/server/src/process/externalLauncher.test.tsvp lint apps/server/src/process/externalLauncher.ts apps/server/src/process/externalLauncher.test.tsvp run --filter t3 typecheckChecklist