Skip to content

fix(process): hide console windows for spawned git/cmd subprocesses - #2460

Merged
wsp1911 merged 1 commit into
GCWing:mainfrom
1688mengdie:fix/proc-hide-cmd-window
Aug 24, 2026
Merged

fix(process): hide console windows for spawned git/cmd subprocesses#2460
wsp1911 merged 1 commit into
GCWing:mainfrom
1688mengdie:fix/proc-hide-cmd-window

Conversation

@1688mengdie

Copy link
Copy Markdown

Summary

Spawned git/cmd subprocesses (repository probing, workspace dispatch, external editor launch, commit verification, auto-indexing) could show a transient empty console (cmd) window on Windows because they were launched without CREATE_NO_WINDOW. This PR reuses the existing upstream process_manager module (bitfun_core::util::process_manager, bitfun_services_core::process_manager), which applies CREATE_NO_WINDOW on Windows, and rewires the affected call sites to create_command(...) / create_tokio_command(...).

Fixes #2458

Type and Areas

Type: bug fix

Areas: Rust core, desktop/Tauri, CLI

Motivation / Impact

The transient empty console window is disruptive in detached / background / worker contexts where no interactive console is expected. This change only suppresses the transient console window on Windows; no user-visible UI is altered.

Verification

  • Test degree: 已测 (tested).
    • A compiled Windows probe (Win32 GetConsoleWindow() FFI) confirms subprocesses spawned via process_manager::create_command report no console, while a control Command::new reports a console — i.e. CREATE_NO_WINDOW takes effect at runtime.
    • Full build / check matrix (cargo check --workspace, cargo check -p bitfun-desktop, cargo clippy, CLI tests) is enforced by the repository CI on this pull request.
  • This is an AI-assisted change; it reuses the existing process_manager primitive and only rewires the affected call sites.

Reviewer Notes

No UI change, so no before/after screenshots are attached. Manual verification on Windows: launch the application and confirm no empty cmd window flashes during background git/cmd subprocess operations (the change is confined to suppressing the console window).

Commits:

  • 6721825d6 fix(process): hide console windows for spawned git/cmd subprocesses — reuse process_manager (create_command/create_tokio_command) with CREATE_NO_WINDOW for spawned git/cmd subprocesses.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable. (No user-facing string change; not applicable.)

Route git/cmd/editor/bitfun.exe subprocess spawns through the upstream
native process_manager helper (create_command / create_tokio_command),
which applies CREATE_NO_WINDOW on Windows, preventing the flash of a
console window that previously accompanied spawned git/cmd subprocesses
from the CLI dispatch runner, desktop dispatch host, and workspace
auto-index.

Reuses bitfun_services_core::process_manager and the
bitfun_core::util::process_manager re-export (TUI boundary compliant);
zero new dependencies, zero Cargo.toml changes.

Test: cargo check --jobs 4 -p bitfun-services-integrations --features workspace-search --all-targets && cargo check --jobs 4 -p bitfun-cli --all-targets && cargo check --jobs 4 -p bitfun-desktop --all-targets (expected green)
AI: lightly tested
@wsp1911
wsp1911 merged commit 134a20c into GCWing:main Aug 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Spawned git/cmd subprocesses pop empty console windows on Windows

2 participants