Repository navigation
Conversation
Add windowsHide to the remaining console-subsystem child launches so Windows cannot flash a console or steal focus during SSH and browser workflows. Preserve the original argv, stdio, environment, timeout, and output behavior. Co-authored-by: Wooseong Kim <innocarpe@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThe change sets Merge Risk: ⚪ Minimal · up to The PR limits Windows console creation for six existing SSH and browser helper launches without changing command arguments or process behavior; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Rebased this onto current The only conflict is
Scope and authorship are unchanged — still 8 files, +83/−5, still authored by @OrcaWin with @innocarpe's co-authorship trailer intact. Branch: https://github.com/dcieslak19973/orca/tree/dcieslak19973/rebase-14589-win-console-hide Verified on the rebased tree — all six spawn sites guarded:
Happy to drop this if you'd rather rebase it yourself — just didn't want the conflict to be the thing holding it up, since all five original spawn sites are still unguarded on |
|
Closing — adopted, and it conflicts now for a reason worth explaining. The diagnosis is right: a GUI Electron process spawning a console-subsystem binary without Of the sites here:
This PR now conflicts because #15887 also adds a ratchet: every file importing Thanks. |
|
Adopted in #15887 with credit; the SSH and cookie-import sites are already fixed on main by the W1 migration. |
…#15887) * fix(win32): hide the console window for agent-browser and git helpers W1 routed most child processes through `runProcess`, which always sets `windowsHide`. Six call sites still spawn directly, so each one opens a real console window on Windows: it flashes and steals foreground. For the git status poll, that is once per poll (#10488). A ratchet now scans every file that imports `child_process` and fails on a call without the flag. Its allowlist starts at the 76 files that still offend and can only shrink — it doubles as the worklist for routing them through the chokepoint, which is where the flag stops being a per-call-site decision at all. Diagnosed in #14589; the SSH and cookie-import sites it also covered are already fixed on main by the W1 migration. Co-authored-by: OrcaWin <orcawin@users.noreply.github.com> * test(wsl): stop the exec-mode guard scanning historical release checkouts The cross-version e2e lane checks whole past releases out under `tests/e2e/.cross-version-checkouts/`. The guard walked into them, so on any machine that had run that lane it reported 21 offenders -- every one a copy of shipped code we cannot edit -- and failed. Skip dot-directories; the >500-file vacuity assertion still holds. --------- Co-authored-by: OrcaWin <orcawin@users.noreply.github.com>
|
Landed: #15887 is merged ( |
…stablyai#15887) * fix(win32): hide the console window for agent-browser and git helpers W1 routed most child processes through `runProcess`, which always sets `windowsHide`. Six call sites still spawn directly, so each one opens a real console window on Windows: it flashes and steals foreground. For the git status poll, that is once per poll (stablyai#10488). A ratchet now scans every file that imports `child_process` and fails on a call without the flag. Its allowlist starts at the 76 files that still offend and can only shrink — it doubles as the worklist for routing them through the chokepoint, which is where the flag stops being a per-call-site decision at all. Diagnosed in stablyai#14589; the SSH and cookie-import sites it also covered are already fixed on main by the W1 migration. Co-authored-by: OrcaWin <orcawin@users.noreply.github.com> * test(wsl): stop the exec-mode guard scanning historical release checkouts The cross-version e2e lane checks whole past releases out under `tests/e2e/.cross-version-checkouts/`. The guard walked into them, so on any machine that had run that lane it reported 21 offenders -- every one a copy of shipped code we cannot edit -- and failed. Skip dot-directories; the >500-file vacuity assertion still holds. --------- Co-authored-by: OrcaWin <orcawin@users.noreply.github.com> (cherry picked from commit 98c03fe)
…stablyai#15887) * fix(win32): hide the console window for agent-browser and git helpers W1 routed most child processes through `runProcess`, which always sets `windowsHide`. Six call sites still spawn directly, so each one opens a real console window on Windows: it flashes and steals foreground. For the git status poll, that is once per poll (stablyai#10488). A ratchet now scans every file that imports `child_process` and fails on a call without the flag. Its allowlist starts at the 76 files that still offend and can only shrink — it doubles as the worklist for routing them through the chokepoint, which is where the flag stops being a per-call-site decision at all. Diagnosed in stablyai#14589; the SSH and cookie-import sites it also covered are already fixed on main by the W1 migration. Co-authored-by: OrcaWin <orcawin@users.noreply.github.com> * test(wsl): stop the exec-mode guard scanning historical release checkouts The cross-version e2e lane checks whole past releases out under `tests/e2e/.cross-version-checkouts/`. The guard walked into them, so on any machine that had run that lane it reported 21 offenders -- every one a copy of shipped code we cannot edit -- and failed. Skip dot-directories; the >500-file vacuity assertion still holds. --------- Co-authored-by: OrcaWin <orcawin@users.noreply.github.com>
…stablyai#15887) * fix(win32): hide the console window for agent-browser and git helpers W1 routed most child processes through `runProcess`, which always sets `windowsHide`. Six call sites still spawn directly, so each one opens a real console window on Windows: it flashes and steals foreground. For the git status poll, that is once per poll (stablyai#10488). A ratchet now scans every file that imports `child_process` and fails on a call without the flag. Its allowlist starts at the 76 files that still offend and can only shrink — it doubles as the worklist for routing them through the chokepoint, which is where the flag stops being a per-call-site decision at all. Diagnosed in stablyai#14589; the SSH and cookie-import sites it also covered are already fixed on main by the W1 migration. Co-authored-by: OrcaWin <orcawin@users.noreply.github.com> * test(wsl): stop the exec-mode guard scanning historical release checkouts The cross-version e2e lane checks whole past releases out under `tests/e2e/.cross-version-checkouts/`. The guard walked into them, so on any machine that had run that lane it reported 21 offenders -- every one a copy of shipped code we cannot edit -- and failed. Skip dot-directories; the >500-file vacuity assertion still holds. --------- Co-authored-by: OrcaWin <orcawin@users.noreply.github.com>
ELI5
On Windows, some background helper tasks — checking SSH connection settings, routing SSH traffic through jump hosts or proxies, closing stale browser-automation sessions, and reading encrypted browser cookies — could briefly flash a black command-prompt window over whatever you were doing, sometimes stealing keyboard focus from the app you were typing in. This change makes sure every such helper window stays hidden. Nothing else changes: the helpers run exactly as before, just invisibly. If you never noticed the flashes, this PR simply guarantees you won't.
Summary
On Windows, console-subsystem helpers launched by Orca's console-less Electron main process can create a visible console host that flashes over the user's work and steals keyboard focus. This combines the current-main versions of the SSH and browser hypotheses from #10497 and #10636 into one fresh patch for STA-4337 / #14543 / #10488.
The fix passes
windowsHide: trueat all six currently uncovered relevant call sites:-Gconfiguration resolutioncmd.exewrapperNo argv, stdio, env, timeout, output, exit-status, quoting, or cleanup behavior changes.
Validation
origin/mainwas reproduced as source-level broken: all six call shapes lackedwindowsHide.A temporary isolated Electron GUI-parent oracle on Windows 2 exercised the exact argv/exit/output shapes. Windows Terminal made
GetConsoleWindow()and foreground APIs unusable for this session and the independent top-level watcher saw no child console, so this run does not claim visual baseline/candidate proof. The regression tests intentionally cover the CI-suitable option boundary; the remaining OS-level visual/focus proof needs a Windows session with a reliable console-host/foreground oracle.Full lint is currently blocked by stale generated skill manifests already present on main. The full SSH module is not a valid Windows baseline here: its unrelated failures depend on POSIX
/bin/sh, system-OpenSSH path assumptions, and relay test environment. The changed SSH tests pass.Original implementation attribution is preserved in commit
410a193249via co-authorship with Wooseong Kim (@innocarpe).Refs: STA-4337, #14543, #10488
Visual Proof
N/A — Windows-only fix that keeps background helper console windows HIDDEN (SSH config checks, proxy command, browser helpers). By design nothing appears on screen on any platform; not demonstrable on macOS.