Repository navigation
fix(terminal): keep SSH reconnect banner above the xterm canvas - #10242
Conversation
Portal the non-blocking reconnect banner into each pane container so WebGL compositing cannot paint terminal text through it, raise z-index above pane-local chrome, and use a fully opaque card background.
📝 WalkthroughWalkthroughSSH reconnect overlays are now rendered through portals into each managed terminal pane’s container, using pane-specific identifiers. The overlay’s stacking order increases to 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c29cbe1f-091e-4ffb-af93-69ca1b989664
📒 Files selected for processing (3)
src/renderer/src/components/terminal-pane/TerminalPane.tsxsrc/renderer/src/components/terminal-pane/TerminalSshReconnectOverlay.test.tsxsrc/renderer/src/components/terminal-pane/TerminalSshReconnectOverlay.tsx
| {/* Why: portal into the pane so the banner stacks above the xterm canvas (sibling mount painted under WebGL). */} | ||
| {showSshReconnectOverlay && sshReconnectTargetId && sshReconnectStatus | ||
| ? managedPanes.map((pane) => | ||
| createPortal( | ||
| <TerminalSshReconnectOverlay | ||
| targetId={sshReconnectTargetId} | ||
| targetLabel={sshReconnectTargetLabel} | ||
| status={sshReconnectStatus} | ||
| targetRemoved={sshReconnectTargetRemoved} | ||
| worktreeId={worktreeId} | ||
| sshOwnerEnvironmentId={sshReconnectEnvironmentId} | ||
| />, | ||
| pane.container, | ||
| `ssh-reconnect-${pane.id}` | ||
| ) | ||
| ) | ||
| : null} |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
Share the reconnect action state across pane portals.
Each pane now mounts an independent TerminalSshReconnectOverlay, whose connecting guard is local to that instance. In a split tab, users can click Connect in multiple panes before the shared SSH status updates, sending duplicate connect requests. Lift the in-flight guard/action into TerminalPane or shared store state, and add a multi-pane regression test.
…lyai#10242) Portal the non-blocking reconnect banner into each pane container so WebGL compositing cannot paint terminal text through it, raise z-index above pane-local chrome, and use a fully opaque card background.



Summary
Before / after
After — full pane context
Reproduction and verification
Before: the banner was a
TerminalPanesibling of the terminal host. With WebGL compositing, the canvas painted on top, so terminal output showed through the reconnect UI.After: the banner is portaled into
.pane(same pattern asTerminalRemoteRuntimeReconnectBanner), sits at the bottom of the full-height pane, andelementFromPointhits the banner content.Verified via
pn dev+ CDP on a disconnectedopenclawSSH workspace:parentIsPane: trueoffsetBottom: 12(bottom-3)onTop: trueTests
pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/TerminalSshReconnectOverlay.test.tsx(9/9)