Skip to content

fix(terminal): keep SSH reconnect banner above the xterm canvas - #10242

Merged
nwparker merged 1 commit into
mainfrom
nwparker/overlay-not-on-top
Jul 24, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/overlay-not-on-top

Conversation

@nwparker

@nwparker nwparker commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Portal the non-blocking SSH reconnect banner into each pane container so WebGL/xterm compositing cannot paint terminal text through it
  • Raise the banner z-index above pane-local chrome (focus rim is z-30) and use a fully opaque card background
  • Cover the stacking regression with a unit assertion on the banner z-index class

Before / after

Before (banner under terminal text) After (banner on top)
before after

After — full pane context

after context

Reproduction and verification

Before: the banner was a TerminalPane sibling 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 as TerminalRemoteRuntimeReconnectBanner), sits at the bottom of the full-height pane, and elementFromPoint hits the banner content.

Verified via pn dev + CDP on a disconnected openclaw SSH workspace:

  • parentIsPane: true
  • full pane height (1110px)
  • offsetBottom: 12 (bottom-3)
  • onTop: true

Tests

  • pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/TerminalSshReconnectOverlay.test.tsx (9/9)
  • commit hooks: oxlint, React Doctor, oxfmt

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.
@nwparker

Copy link
Copy Markdown
Contributor Author

Attachments

before.png after.png
before.png after.png
after-context.png
after-context.png

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

SSH 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 z-40, and its card background becomes fully opaque without backdrop blur. The disconnected-banner test now verifies the updated z-index class.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary, screenshots, and testing, but omits the required AI Review Report, Security Audit, and Notes sections. Add the missing template sections with the AI review findings, security audit, and notes, and include the required testing checklist details.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: keeping the SSH reconnect banner above the xterm canvas.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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: c29cbe1f-091e-4ffb-af93-69ca1b989664

📥 Commits

Reviewing files that changed from the base of the PR and between ee87bb3 and 7ade44a.

📒 Files selected for processing (3)
  • src/renderer/src/components/terminal-pane/TerminalPane.tsx
  • src/renderer/src/components/terminal-pane/TerminalSshReconnectOverlay.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalSshReconnectOverlay.tsx

Comment on lines +2899 to +2915
{/* 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}

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.

🩺 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.

@nwparker
nwparker merged commit f26ea6a into main Jul 24, 2026
4 checks passed
@nwparker
nwparker deleted the nwparker/overlay-not-on-top branch July 24, 2026 00:08
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…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.
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