Skip to content

fix(desktop): stop git.exe console flashes from workspace probes#3930

Merged
esengine merged 1 commit into
main-v2from
fix/3906-git-console-flash
Jun 11, 2026
Merged

fix(desktop): stop git.exe console flashes from workspace probes#3930
esengine merged 1 commit into
main-v2from
fix/3906-git-console-flash

Conversation

@esengine

Copy link
Copy Markdown
Owner

Root cause

#2935 switched the desktop's workspace git probes to DETACHED_PROCESS to stop the probe's own console from flashing. That worked for git itself — but a detached process has no console at all, so any console child that git spawns (most commonly the fsmonitor--daemon on repos with core.fsmonitor enabled, or a credential helper) allocates a new visible console. With probes firing on app startup and on every file-change refresh, that's the stream of black git.exe windows reported in #3906 — including the focus steal that interrupts typing.

Fix

  • All nine workspace probes now go through one workspaceGit helper:
    • CREATE_NO_WINDOW instead of DETACHED_PROCESS — the probe gets an invisible console that its children inherit, so nothing down the tree can pop a window.
    • -c core.fsmonitor=false -c maintenance.auto=false — a read-only probe should never spawn a background daemon in the first place, regardless of console flags.
  • HideWindowDetached has no callers left and is removed (both build variants + its test).
  • Regression test pins the daemon-suppressing argv shape and the hidden-console attribute on Windows.

Verified: internal/proc tests pass, root and desktop modules build clean.

Closes #3906

DETACHED_PROCESS gave the probe git no console at all, so any console
child git spawned (fsmonitor daemon, credential helper) allocated a
new visible one - the repeated black windows in #3906. Route all
workspace probes through workspaceGit: CREATE_NO_WINDOW so children
inherit the invisible console, with fsmonitor and auto-maintenance
disabled so probes never spawn background daemons. HideWindowDetached
has no callers left and is removed.
@esengine esengine requested a review from SivanCola as a code owner June 11, 2026 03:51
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 11, 2026
@esengine esengine merged commit f73f04f into main-v2 Jun 11, 2026
14 checks passed
@esengine esengine deleted the fix/3906-git-console-flash branch June 11, 2026 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 不停的掉git.exe ,弹出黑窗口

1 participant