You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Synchronous git on the main-process event loop with no default timeout #88
electron/worktrees.js:25-33 (gitOut) and :62-97 (gitTry) use execFileSync with no timeout unless the caller opts in. IPC-reachable paths like diff (:510), listFiles (:751), sync info, repo info, and merge all go through these, and electron/ssh.js:91-98 runs them synchronously over SSH too (ConnectTimeout=10 only bounds the connect). One slow filesystem or remote blocks all agent streaming and every window — the exact failure class already documented for prStatus in docs/ISSUES.md ("blocking the event loop including agent streaming"), fixed there but never generalized.
Fix: add a sane default timeout to gitOut/gitTry (callers can still override), and consider moving the hot IPC paths to async spawn. This is the same bug class as the fixed prStatus freeze — worth a general solution, not another one-off.
Fixed in 6d8613d (branch coder/synchronous-git-on-the-main-process-even-d0e336).
One choke point instead of three: electron/ssh.jsexecCommand now defaults timeout to SYNC_TIMEOUT_MS (15s), and worktrees.jsgitOut/gitTry route through it instead of calling execFileSync directly. So diff, listFiles, sync info, repo info, merge and their ssh variants are all bounded, local and remote.
Caller timeouts still win — push keeps its explicit 30s.
services.gitFetch/gitPull pass 60s; network git is legitimately slower than local.
Tests in electron/test/ssh.test.js: default applied local + over ssh, caller override wins, and gitTry inherits it. Mutation-checked (removing the default fails 3).
Not done: moving the hot IPC paths to async spawn. 15s is a bounded freeze, not no freeze — that's a bigger change than a bound, so it's left open here.
Activity
currentbits commentedon Aug 16, 2026
Fixed in
6d8613d(branchcoder/synchronous-git-on-the-main-process-even-d0e336).One choke point instead of three:
electron/ssh.jsexecCommandnow defaultstimeouttoSYNC_TIMEOUT_MS(15s), andworktrees.jsgitOut/gitTryroute through it instead of callingexecFileSyncdirectly. So diff, listFiles, sync info, repo info, merge and their ssh variants are all bounded, local and remote.services.gitFetch/gitPullpass 60s; network git is legitimately slower than local.electron/test/ssh.test.js: default applied local + over ssh, caller override wins, and gitTry inherits it. Mutation-checked (removing the default fails 3).Not done: moving the hot IPC paths to async spawn. 15s is a bounded freeze, not no freeze — that's a bigger change than a bound, so it's left open here.
Make worktrees hot git reads async so concurrent threads do not beach…