Skip to content

fix(server): strip positions from file manager targets - #5854

Open
davisonio wants to merge 1 commit into
pingdotgg:mainfrom
davisonio:fix/file-manager-positioned-paths
Open

fix(server): strip positions from file manager targets#5854
davisonio wants to merge 1 commit into
pingdotgg:mainfrom
davisonio:fix/file-manager-positioned-paths

Conversation

@davisonio

@davisonio davisonio commented Aug 9, 2026

Copy link
Copy Markdown

What Changed

  • Strip parsed :line[:column] positions before launching a target with the file manager when the parsed base path exists.
  • Preserve exact existing paths and unresolved targets, including valid POSIX filenames that end in :digits.
  • Add regression coverage for plain paths, positioned paths, and colon-number filenames on macOS.

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, or xdg-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.ts
  • vp fmt --check apps/server/src/process/externalLauncher.ts apps/server/src/process/externalLauncher.test.ts
  • vp lint apps/server/src/process/externalLauncher.ts apps/server/src/process/externalLauncher.test.ts
  • vp run --filter t3 typecheck

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • No UI code changed
  • No animation or interaction recording is required

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e9e735ca-f664-497f-8db2-ad13e2d1c482

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Aug 9, 2026
@davisonio
davisonio marked this pull request as ready for review August 9, 2026 16:16
Comment thread apps/server/src/process/externalLauncher.ts Outdated
@davisonio
davisonio force-pushed the fix/file-manager-positioned-paths branch from e2dc2a4 to 89513fd Compare August 9, 2026 16:19
@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Aug 9, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant