Windows Reveal in File Explorer returns success as soon as PowerShell starts, hiding later launch failures from the existing error toast. Capturing those failures also exposes PowerShell's raw CLIXML output. This change makes those errors detectable and readable: wait for the short-lived helper, check its exit status, reject missing targets, and return the exception message as plain text while preserving Explorer's selection quoting.
Fixes #11172, which tracks error reporting. The originally reported Explorer no-op was not reproduced, and this PR does not claim to diagnose or fix its unknown cause.
Validation:
- Focused Windows launcher suite: 12 passed, 13 platform-specific tests skipped. Regression tests failed before the fixes and cover failed helpers, missing targets, missing launchers, and readable stderr. Real PowerShell checks preserve selection quoting.
- Two source links with line numbers opened their expected Explorer folders through the context menu in an isolated web client running this PR. The real launcher also opened a valid filename containing spaces and an apostrophe, and returned readable
Path does not exist: ... text for a missing file. Native Electron context-menu interaction was not independently verified.
- Targeted lint/format checks pass. Server/contracts typechecks passed for the initial implementation; the follow-up changes only the generated PowerShell string and assertions.
Implemented by GPT-6 using Codex.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
a1608be8-6b63-420b-82ee-f83d84439ede📥 Commits
Reviewing files that changed from the base of the PR and between c52b8d96e4b34201f19b5e5bb12c6b2a77bfaa9a and 16b691ee538a5e45229eaeeb4d8b45ac947ef495.
📒 Files selected for processing (3)
apps/server/src/process/externalLauncher.test.tsapps/server/src/process/externalLauncher.tspackages/contracts/src/editor.tsIncluded review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
📝 Walkthrough
Walkthrough#
The change makes Windows Explorer reveal launches wait for helper completion, capture stderr, validate target paths in PowerShell, and return detailed errors. Tests cover failed helpers, missing targets, missing launchers, and valid temporary files.
Changes#
Explorer reveal error handling
packages/contracts/src/editor.tsExternalLauncherEditorSpawnErroraccepts optional detail text and includes it in the error message.apps/server/src/process/externalLauncher.tswaitForExit. The launcher captures stderr and exit status, applies a timeout, and reports failed helper processes. PowerShell validates the target beforeStart-Process.apps/server/src/process/externalLauncher.test.tsPriority: ➖ Normal
Estimated code review effort: 3 (Moderate) | ~25 minutes
Severity of issue fixed: Medium
Sequence Diagram(s)#
Suggested reviewers:
juliusmarminge,t3dotggMerge Risk: ⚪ Minimal · up to
16b69Windows reveal failures are handled with actionable errors and focused coverage.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 passed)
#11172by waiting for the Windows reveal helper, capturing stderr and exit status, reporting actionable failures, rejecting missing targets, preserving quoting, and adding fo…✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands.