fix(server): Reveal in File Explorer and browser launches work on Windows again #19656
main fromrefs/pull/19656/head·merged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubProblem#
On native Windows, Reveal in File Explorer does nothing, and npx t3 / t3 start don't auto-open the pairing URL. The server starts powershell.exe with detached: true. Windows PowerShell started that way exits 0 without running its command, so nothing opens and the server reports success.
Fixes #11780.
Fix#
Native Windows PowerShell launches (reveal and browser) now start attached. Stdio is still ignored and the child is still unref()'d, so nothing waits on it. WSL, macOS, Linux, and editor launches keep detached: true.
The detach choice is made where each launch is built, not by matching the command name at spawn time.
Credit#
This takes over #10387 by @doubletwisted, with their commits kept. Their PR has the root cause, live Windows tests, and before/after recordings from the desktop app. @ChristianStrunk1984 independently confirmed the root cause on a clean Windows 11 VM. Takeover changes: rebased on main, moved the detach decision to the launch builders, and made the live test cleanup tolerate a short Windows file lock.
Proof#
Windows runner (windows-tests.yml), externalLauncher.test.ts:
- Old launcher + new tests (run): both live PowerShell launches never run their command and time out.
- This branch (run): all 27 Windows tests pass, including both live launches. The reveal stub receives
/select,"C:\workspace with spaces\media\author's clip.mp4".
Linux: the same file passes (54 passed, 2 Windows-only skips). Targeted lint and server typecheck pass.
Not checked by me: a real Explorer window or browser opening. @doubletwisted's recordings in #10387 cover that.
Co-authored-by: doubletwisted <118005273+doubletwisted@users.noreply.github.com>
Made with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
juliusmarminge added labelsmacroscope-review
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Team
- Run ID:
3c089d33-0207-4505-b813-791accace1f4
📥 Commits
-
Reviewing files that changed from the base of the PR and between 5a4e9980533705774dc3f45b35cacf76c3d78dbc and 216bab1fc773418cf92e0ec279195287cdca4911.
📒 Files selected for processing: 2
-
apps/server/src/process/externalLauncher.test.tsapps/server/src/process/externalLauncher.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
📝 Walkthrough
-
External launch handling now supports an optional detached setting. Native Windows PowerShell browser and file-manager launches are not detached, while WSL browser launches remain detached. Tests cover mocked launch options and live Windows PowerShell browser and reveal launches.
Changes: Platform-specific external launch behavior
Layer / File(s) Summary Platform-specific detached launch behavior
apps/server/src/process/externalLauncher.ts,apps/server/src/process/externalLauncher.test.tsThe launcher accepts a detached override and defaults editor launches to detached. Native Windows browser and file-manager launches are not detached; WSL browser launches remain detached. Tests check launch options and use real PowerShell for browser and reveal smoke tests. Priority: ➖ Normal
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers:
juliusmarminge
Merge Risk: ⚪ Minimal · up to
216ba-
The launch changes are ready to merge after normal checks; no actionable issue was established.
Pre-merge checks:
3 · 1-
Failed checks: 1 inconclusiveCheck name Status Explanation Resolution Linked Issues check Issue #11780requires Windows Explorer to open the containing folder and select the linked file. The PR sets native Windows PowerShell launches to attached and preserves the/select,"<path>"argumen…Provide reviewable Windows evidence or automated coverage for real Explorer selection and for the required actionable error when the reveal operation fails. Passed checks: 3 passed-
Check name Status Explanation Title check The title clearly and concisely describes the primary Windows fix for File Explorer and browser launches. Description check The description explains the problem, fix, scope, linked issue, test results, limitations, and agent usage. It uses "Fix" and "Proof" instead of the template headings "Change" and "Verification," and … Out of Scope Changes check The browser-launch changes address the same native Windows PowerShell detached: truefailure described in the PR. The changes keep WSL, macOS, Linux, and editor launch behavior scoped to their exist…
Full details: Linked Issues check
-
Explanation
Issue
#11780requires Windows Explorer to open the containing folder and select the linked file. The PR sets native Windows PowerShell launches to attached and preserves the/select,"<path>"argument. The live Windows test verifies the PowerShell-to-stub argument chain, but it replaces Explorer and does not verify a real Explorer result or an actionable failure path. The available evidence cannot establish full compliance.
-
✨ Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
-
t3dotgg(GitHub profile, opens in a new tab) closed this
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Provider Metric Main baseline This PR Impact PR ceiling Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅ Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅ Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅ Codex Live turn WebSocket decoded 20.9 KiB 20.9 KiB 0 B (0.0%) 29.3 KiB ✅ Codex Live turn messages 2 2 0 (0.0%) 8 ✅ Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅ Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅ Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅ Claude Live turn WebSocket decoded 21.2 KiB 21.2 KiB 0 B (0.0%) 29.3 KiB ✅ Claude Live turn messages 2 2 0 (0.0%) 8 ✅ Baseline:
5a4e998· PR result:216bab1· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
- Codex decoded thread snapshot: 108.5 KiB
- Claude decoded thread snapshot: 108.8 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
Sign in to join this conversation.
Approvability#
Verdict: Not approved
Macroscope's review found this PR not approvable — This targeted fix changes the default process-launch mode for native Windows browser and File Explorer actions, while adding coverage for the affected Windows and preserved WSL paths. Because that default behavior changes for users, the change warrants explicit review.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).