Conversation
This branch has not been deployed
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.
What does this PR do?
Resolves #2309 (Linear CAP-814) where clicking "Open File" after an export on Windows flashes a visible console/terminal window.
Root Cause
When spawning
explorer.exeon Windows viastd::process::Command, Windows defaults to allocating a temporary console window for the process unless theCREATE_NO_WINDOWprocess creation flag is explicitly set.Solution
creation_flags(CREATE_NO_WINDOW)(0x0800_0000) usingstd::os::windows::process::CommandExtonCommand::new("explorer")calls in:apps/desktop/src-tauri/src/lib.rs(open_file_path)apps/desktop-gpui/src/library.rs(reveal_in_folder)apps/desktop/src-tauri/src/automation.rs(reveal_path)apps/cli/src/automation.rs(open_path_or_url)Verification
CREATE_NO_WINDOW: u32 = 0x0800_0000matching existing pattern inapps/desktop/src-tauri/src/export.rs.The PR appears safe to merge, with no actionable correctness, security, or repository-rule issues identified.
Summary
This PR suppresses transient Windows console windows when Cap launches Explorer from desktop, GPUI, desktop automation, and CLI automation paths.
CREATE_NO_WINDOWcreation flag to all direct Explorer process launches.Reviews (1) · Last reviewed commit: "fix(desktop): hide terminal window when ..."