fix(shared): find versioned JetBrains macOS app bundles #16246
main fromrefs/pull/16246/head·merged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHubProblem#
On macOS, resolveEditorCommand only tries exact <name>.app paths. A JetBrains Toolbox bundle carries its version in the name, for example IntelliJ IDEA 2026.1.4.app, so the editor is reported as not installed. The Windows branch already lists the install directories and accepts name or name plus a suffix, so macOS differs (#15933).
Change#
The darwin branch of resolveEditorCommand in packages/shared/src/editor.ts now lists ~/Applications and /Applications and also accepts <name> <version>.app. A bundle matches only when the text between <name> and .app is made of digits and dots (isVersionedBundle). A plain prefix match would let Visual Studio Code resolve to Visual Studio Code - Insiders.app; the version check prevents that, and a test covers it. Exact <name>.app bundles are tried first and the other launch paths are unchanged. The darwin lookup is shared by every editor that has install names, so the versioned match applies to those too; the digits-and-dots rule is what keeps VS Code and Insiders apart.
Disclosed limits:
- Names with a non-numeric suffix, such as
WebStorm EAP.app, no longer match on macOS. - If several versioned bundles exist, the first in directory order is used, with no version sorting.
- The Windows branch keeps its plain prefix match.
- The issue's second half, a Toolbox script that is not named
idea(idea1), is not addressed.
Scope and approval#
Part of #15933, which is triaged. This covers the versioned-bundle half and leaves the Toolbox script half open, so please do not auto-close the issue from this PR. The change is limited to the macOS discovery branch for editors that already resolve there.
Verification#
Windows x64, on main @ 9e5229b4 with a frozen-lockfile install. The macOS branch runs with a mocked platform and filesystem. It was not run on a real Mac.
- New tests in
externalLauncher.test.tscover discovery and launch for WebStorm and IDEA from versioned bundles, and the Insiders case (vscodenot resolved,vscode-insidersresolved and launched). On unmodifiedmainsource the two versioned-bundle tests fail withexpected [] to include 'webstorm'and... 'idea'. With the fix, 20 passed and 26 skipped (46) in that file. tsc --noEmitonpackages/sharedand onapps/server: exit 0, 0 errors each. Lint and format check on both files: clean.
AI disclosure#
Built by a free model through the OpenCode CLI: Space Bunny (free). Reviewed by Claude Sonnet 5.5 through the Claude Code CLI (read and run only, no edits). The first version matched Visual Studio Code to the Insiders bundle; the reviewer caught it and the same model corrected it in a second round. Rebased onto current main, re-verified and published by Claude Sonnet 5.5 through the Hermes harness inside T3 Code, with Sayf Fadil's approval to open this PR. No maintainer has reviewed it. Not exercised in a live T3 Code app.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
Approvability#
Verdict: Approved at
76bbd12Macroscope's review found this PR approvable — This is a narrowly scoped macOS editor-discovery fix that recognizes versioned JetBrains bundles while preserving exact bundle behavior and avoiding stable/Insiders name collisions. The production change is small, non-sensitive, and covered by focused regression tests.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
- Review profile: CHILL
- Plan: Advanced
- Run ID:
99c5f116-f5b6-467d-811e-6499fbc3237e
📥 Commits
Reviewing files that changed from the base of the PR and between 25d5c7cacb99bc50056edc0ea8d201eac31cfdf4 and 76bbd127fa39204aca6b363b8cdfce8c6325170a.
📒 Files selected for processing (2)
apps/server/src/process/externalLauncher.test.tspackages/shared/src/editor.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough#
macOS editor discovery now finds exact and versioned app bundles. Tests cover versioned WebStorm and IntelliJ IDEA launches, bundle-name matching, and VS Code Insiders selection.
Changes#
macOS Editor Discovery
Layer / File(s) Summary Bundle discovery and launch validation
packages/shared/src/editor.ts,apps/server/src/process/externalLauncher.test.tsDiscovery matches exact .appnames and versioned bundles with digit-and-dot versions. Tests verify launch arguments, reject similarly prefixed bundle names, and distinguish VS Code Insiders from stable VS Code.Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
ishaankoMerge Risk: ⚪ Minimal · up to
76bbdNo merge-blocking issue is identified for the macOS editor discovery change; it is ready for normal merge checks.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation Title check ✅ Passed The title clearly and concisely describes the main change: finding versioned JetBrains app bundles on macOS. Description check ✅ Passed The description covers the problem, change, scope and approval context, verification results, and limitations. It follows the required template and gives specific test and tooling results. Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2… Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request. ✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
🧰 Additional context used
📚 Code guidelines (1)
docs/internals/effect-services.md — auto-discovered
Comment `@coderabbitai help` to get the list of available commands.Yash-Singh1(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes