Repository navigation
Fix Windows Git Bash console-capacity failures - #16045
Conversation
|
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 (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change propagates PTY exit codes through transport and connection handling. Local process failures now report structured pane exit data, including Git Bash console-capacity detection. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 377fe452-c347-4888-b73a-4f4b2ee36313
📥 Commits
Reviewing files that changed from the base of the PR and between 1375c57 and 4dbdc20fa2d323f5c3282f62b4f6b5e20f19e1ba.
📒 Files selected for processing (19)
src/renderer/src/components/terminal-pane/TerminalPane.tsxsrc/renderer/src/components/terminal-pane/TerminalProcessExitOverlay.test.tsxsrc/renderer/src/components/terminal-pane/TerminalProcessExitOverlay.tsxsrc/renderer/src/components/terminal-pane/git-bash-console-capacity.test.tssrc/renderer/src/components/terminal-pane/git-bash-console-capacity.tssrc/renderer/src/components/terminal-pane/pty-connection-pty-exit-teardown.test.tssrc/renderer/src/components/terminal-pane/pty-connection-types.tssrc/renderer/src/components/terminal-pane/pty-connection.tssrc/renderer/src/components/terminal-pane/pty-transport-detach-attach-handoff.test.tssrc/renderer/src/components/terminal-pane/pty-transport-handler-suspension.test.tssrc/renderer/src/components/terminal-pane/pty-transport-reattach-admission.test.tssrc/renderer/src/components/terminal-pane/pty-transport-types.tssrc/renderer/src/components/terminal-pane/pty-transport.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.json
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
4dbdc20 to
9e62e9f
Compare
|
@coderabbitai review |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: cba93a03-03b6-45d4-bd87-33b343b3be4f
📥 Commits
Reviewing files that changed from the base of the PR and between 4dbdc20fa2d323f5c3282f62b4f6b5e20f19e1ba and 9e62e9f.
📒 Files selected for processing (7)
src/renderer/src/components/terminal-pane/TerminalPane.tsxsrc/renderer/src/components/terminal-pane/TerminalProcessExitOverlay.test.tsxsrc/renderer/src/components/terminal-pane/pty-connection-pty-exit-teardown.test.tssrc/renderer/src/components/terminal-pane/pty-connection-types.tssrc/renderer/src/components/terminal-pane/pty-connection.tssrc/renderer/src/components/terminal-pane/terminal-process-exit-restart.test.tssrc/renderer/src/components/terminal-pane/terminal-process-exit-restart.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
|
* fix(terminal): retain failed local console panes * fix(terminal): preserve failed pane restart context * fix(terminal): scope capacity recovery to PTY binding --------- Co-authored-by: OrcaWin <[email protected]>
* fix(terminal): retain failed local console panes * fix(terminal): preserve failed pane restart context * fix(terminal): scope capacity recovery to PTY binding --------- Co-authored-by: OrcaWin <[email protected]> (cherry picked from commit 4c984d4)
* fix(terminal): retain failed local console panes * fix(terminal): preserve failed pane restart context * fix(terminal): scope capacity recovery to PTY binding --------- Co-authored-by: OrcaWin <[email protected]>
* fix(terminal): retain failed local console panes * fix(terminal): preserve failed pane restart context * fix(terminal): scope capacity recovery to PTY binding --------- Co-authored-by: OrcaWin <[email protected]>
…ailures (#16991) * fix(terminal): only the Windows console-limit failure keeps a dead terminal open #16045 retained every non-zero local PTY exit and only used the Git Bash console-capacity marker to pick the overlay's label, so an ordinary shell exiting after a failed command left a dead pane behind on macOS and Linux too. Claim the exit for the capacity overlay only when all of it holds: a native local Windows ConPTY pane, a non-zero code, the same PTY whose fresh spawn was observed, no user input on that PTY (an unsettled write counts), and the exact MSYS marker in that PTY's own output. Every other exit falls through to the unchanged teardown path. Per-PTY interaction rides on the existing per-PTY process-exit record, marked at the input-forward chokepoint so a late write acknowledgement can never label a replacement PTY. STA-5604 * test(terminal): pin the two unpinned arms of the Git Bash capacity gate Gate-level ablation of the six-clause capacity condition found the six conjuncts each individually pinned, but two neighbouring arms free: - the `session.deps.onPaneProcessDied` presence check. The callback is optional on PaneConnectionDeps; without the guard a capacity exit calls `undefined` and throws out of the exit handler, leaving the pane neither retained nor torn down. - the per-PTY keying in `noteTerminalInputForPty`. A generation installs its exit state when its callbacks are captured, before the transport rebinds its PTY id; a write in that window would be credited to the incoming PTY and silently suppress its capacity overlay. Both new tests fail with their own arm reverted and pass with it restored. No production change. * Preserve startup input intent across terminal connection * Keep terminal input attempts with their launch across remounts * Load the real capacity-test transport during suite setup * Match the paste-input test result type to its API
ELI5
When Git Bash cannot allocate another console, Orca now keeps the failed terminal and its error on screen. The user can close unused terminals, then restart the failed pane in place.
What Changed
Why
Git for Windows hardcodes
MAX_CONS_DEVto 128 in its MSYS2 runtime. This is not a Windows ConPTY, CPU, or RAM limit and Orca cannot safely tune it per user. Raising it requires a forkedmsys-2.0.dll, with shared-runtime layout and Git-for-Windows update compatibility risk. Preserving the failure and providing recovery is the safe product behavior.Linked Issue
STA-4903
Visual Proof
Prior behavior: the failed terminal disappeared immediately, so there was no durable failure state to capture.
Failure retained with recovery actions:
After in-place restart and a successful
echo ORCA_RESTART_OK:Testing
exit 7retained output, Restart spawned a working shell in place, andORCA_RESTART_OKrendered.pnpm typecheckandpnpm buildpass locally.pnpm run typecheck:web, max-lines, localization, and direct normal/type-aware/React Doctor Oxlint scans pass.AI Disclosure
Review
Please focus on local-vs-remote exit ownership, split-pane recovery, and original startup preservation.
Agent skill upstream boundary
Notes
OpenConsole.exedropped from 133 to 109 (112 after validation spawned three consoles). No worktrees or files were removed.pnpm run check:code-quality:changedhits the repository's Windows wrapper bugspawnSync pnpm.cmd EINVAL; its three underlying Oxlint scans pass directly.Checklist