Skip to content

fix(terminal): recover wedged panes after input - #10617

Merged
AmethystLiang merged 3 commits into
mainfrom
fix-wedged-pane-recovery
Jul 26, 2026
Merged

AmethystLiang merged 3 commits into
mainfrom
fix-wedged-pane-recovery

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Request a terminal write-pipeline FIFO probe from the shared accepted-input bookkeeping point, covering all accepted input paths without duplicated branch logic.
  • Arm acknowledged input only after the transport confirms acceptance; rejected or unbound input uses transport recovery and never arms the parser watchdog.
  • Model one terminal-scoped watchdog with explicit output-completion and fifo-probe modes. Input upgrades the active watch, so completion from earlier queued work cannot cancel the FIFO marker.
  • Treat the probe callback as the healthy verdict. If other writes keep parsing while the probe waits behind backlog, extend the quiet deadline instead of remounting a slow terminal.
  • Keep one coalesced timer and at most one zero-byte local xterm write per terminal. The probe produces no PTY, SSH, or network traffic.
  • Add unit coverage for accepted input without renderer output, rejected acknowledged input, mode upgrades, and parse-progress deadline extension.

Verification

  • npx oxfmt --check -c .oxfmtrc.json on all four changed files
  • npx oxlint on all four changed files
  • Node and web TypeScript projects
  • Terminal-pane and pane-manager Vitest scope: 238 files passed; 2,977 tests passed; 1 skipped
  • npx electron-vite build --mode e2e
  • Repeated target E2E: 6/6 passed (three wedged-pipeline recoveries and three disposed-terminal recoveries)
  • Earlier full repeated run: 5 scenarios passed; one repetition failed before the test body because the initial PaneManager did not mount within 30 seconds
  • No changes under tests/e2e

Platform caveat

The repeated E2E ran on macOS, which cannot prove the Linux CI failure is fixed. The exact Linux-specific reason that post-wedge PTY output sometimes fails to reach the renderer remains unconfirmed; the available evidence does not establish either hidden-delivery gating or xvfb focus routing as the trigger.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The terminal write-pipeline health module now supports probe-mode stall watches that remain active through parse progress and certify a dead pipeline after a quiet interval. PTY connection handling requests probes only after accepted input. Tests verify probe-based certification, wedged-terminal recovery, and that rejected input does not arm the probe.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and verification, but omits major required template sections like Screenshots, AI Review Report, Security Audit, and Notes. Add the missing template sections: Screenshots, Testing checklist, AI Review Report, Security Audit, and Notes, or state why each is unnecessary.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately captures the main terminal recovery change.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e4e4ee33-0793-490b-a391-6cc417365b2c

📥 Commits

Reviewing files that changed from the base of the PR and between 51fa7e5 and 2cfb7ac.

📒 Files selected for processing (3)
  • src/renderer/src/components/terminal-pane/pty-connection.ts
  • src/renderer/src/lib/pane-manager/terminal-write-pipeline-health.test.ts
  • src/renderer/src/lib/pane-manager/terminal-write-pipeline-health.ts

@AmethystLiang
AmethystLiang merged commit daba81e into main Jul 26, 2026
7 of 8 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* fix(terminal): recover wedged panes after input

* refactor(terminal): make wedge probes explicit

* fix(terminal): require quiet parser before recovery
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.

1 participant