Skip to content

fix(server): restore Windows file-manager actions - #12393

Open
MatthewFeroz wants to merge 1 commit into
pingdotgg:mainfrom
MatthewFeroz:t3code/fix-windows-markdown-context-menu
Open

MatthewFeroz wants to merge 1 commit into
pingdotgg:mainfrom
MatthewFeroz:t3code/fix-windows-markdown-context-menu

Conversation

@MatthewFeroz

@MatthewFeroz MatthewFeroz commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

On Windows, selecting Reveal in File Explorer from a chat file link closes the menu but does not reveal the file. The PowerShell helper can exit with code 0 without executing its command when launched detached with ignored stdio.

Start that Windows helper with detached: false and retain the existing unref behavior. Normalize Windows paths for the ordinary File Explorer fallback as well, so forward-slash paths are not misinterpreted by Explorer.

Why

Fixes #11780. The helper introduced in #7140 retained detached spawning after #9551 fixed reveal path separators. #12281 refactors frontend actions but does not fix this server launch behavior.

The new regression test runs the real Windows PowerShell process with the launcher's options, substituting an argument recorder for Explorer. It failed before the fix because no output was produced despite exit code 0, and passes afterward. It waits for process completion without sleeps or polling.

UI Changes

Before: selecting Reveal closes the menu without revealing the file. Short reproduction video.

Before: Reveal in File Explorer in the failing context menu

After: Explorer opens the intended diagnose directory and selects SKILL.md (Windows hides the extension in this view).

After: the correct directory with SKILL.md selected

The after image comes from an isolated Windows Electron Dev instance using the real Markdown component, server request, and patched launcher. The native menu was observed, but menu selection was supplied by a renderer test harness because native pointer automation could not obtain window geometry. A fully automated native click pass and Obsidian's handling of the ordinary Open action have not been verified.

Verification

  • vp test run apps/server/src/process/externalLauncher.test.ts: 11 passed, 15 platform-specific skips on Windows. Includes real-process coverage with spaces and an apostrophe, plus ordinary Windows path normalization.
  • Targeted lint and format checks pass; vp run --filter t3 typecheck passes.
  • The change applies to native Windows server launch behavior. macOS/Linux/WSL options, provider adapters, wire contracts, and client action visibility are unchanged. It adds no persistent state or reverse operation. Existing user instructions remain accurate, so no documentation change is needed.
  • Reproduction state and evidence are outside tracked source; the live T3 database was not modified.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for the user-visible behavior
  • I included a video for the interaction failure

Implemented with GPT-6 Astra via the Codex harness in T3 Code.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 18, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 375b839

Macroscope's review found this PR approvable — This is a small, well-contained Windows file-manager bug fix with explicit platform scoping and regression coverage. Existing non-Windows and non-file-manager launch behavior remains unchanged, and no product defaults or static-analysis policies are modified.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

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: fb66ea5a-8672-4257-9a55-816edbec4483

📥 Commits

Reviewing files that changed from the base of the PR and between 9946541 and 375b839.

📒 Files selected for processing (2)
  • apps/server/src/process/externalLauncher.test.ts
  • apps/server/src/process/externalLauncher.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The Windows external launcher now normalizes native file-manager paths, supports per-launch process detachment, and runs Explorer reveal helpers without detachment. Tests verify plain launches and actual reveal-helper arguments.

Changes

Windows file-manager launch handling

Layer / File(s) Summary
Launch path and detachment behavior
apps/server/src/process/externalLauncher.ts
EditorLaunch accepts an optional detached flag. Native Windows file-manager launches use backslash-normalized paths. Explorer reveal launches set detached: false, while other launches remain detached by default.
Windows launch validation
apps/server/src/process/externalLauncher.test.ts
Tests verify the normalized plain-launch path and run the reveal PowerShell helper with a recorder to verify its /select argument.

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 375b8

The Windows reveal helper can complete its Explorer selection action after the request returns, with no actionable merge risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR addresses #11780. Windows reveal launches now run PowerShell without detached mode while the process handle remains unreferenced. Windows file-manager paths use backslashes. Tests cover the rea…
Out of Scope Changes check ✅ Passed The changes stay within the issue scope. They modify native Windows server launch behavior and add focused regression coverage. The ordinary Windows file-manager path normalization supports the same a…
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…
Title check ✅ Passed The title clearly and concisely describes the primary change: restoring Windows file-manager actions.
Description check ✅ Passed The description covers what changed, why it changed, UI evidence, verification results, scope, and the checklist. It is focused and provides sufficient implementation and testing context.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Reveal in File Explorer does not reveal chat-linked files on Windows (desktop 0.0.40)

1 participant