Repository navigation
fix(windows): don't launch Explorer with SW_HIDE — folder windows opened invisible - #2
Merged
Merged
Conversation
…ned invisible runExplorer set HideWindow on the SysProcAttr, which puts SW_HIDE into Explorer's STARTUPINFO. Explorer honors the hint for the folder window it opens, so every /open request succeeded but the window never appeared. The flag guarded against a console flash that can't happen: release builds use -H windowsgui. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Windows, clicking an open-folder link did nothing visible, even though
POST /openreturned 200 and the server loggedopened. Testing live revealed the opens were actually succeeding — Explorer windows were being created for every request, just invisible (19 hidden windows piled up during testing, confirmed viaShell.Application.Windows()showingVisible=False).Cause
runExplorersetHideWindow: trueon theSysProcAttr, which putsSTARTF_USESHOWWINDOW+SW_HIDEinto Explorer'sSTARTUPINFO. Explorer honors that hint for the folder window it opens, so the window exists but never shows.The flag was guarding against a console flash that can't happen anyway — release builds use
-H windowsgui.Fix
Drop
HideWindowand leave a comment warning against re-adding it. Verified live on Windows 11 ARM64 (Parallels):POST /openwith a UNC path (\storage\...) now opens a visible Explorer window.🤖 Generated with Claude Code