Skip to content

fix(desktop): terminal pane no longer traps the window when you switch tabs - #90351

Merged
OutThisLife merged 2 commits into
mainfrom
bb/terminal-tab-trap
Aug 19, 2026
Merged

fix(desktop): terminal pane no longer traps the window when you switch tabs#90351
OutThisLife merged 2 commits into
mainfrom
bb/terminal-tab-trap

Conversation

@OutThisLife

@OutThisLife OutThisLife commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Opening the terminal and then clicking another tab could leave you stuck: the tab switch registered, but the terminal kept covering the pane and swallowing clicks, so the chat was unreachable until the app was restarted.

The persistent terminal is a position: fixed overlay that chases its slot's rect instead of moving in the DOM (moving it detaches xterm's WebGL renderer). That tracker is paused while the renderer is idle — sensible for the rect chase, which forces layout, but visibility was gated behind the same check. Switch tabs while the window is unfocused, or right as it blurs, and the overlay never learns its slot went inactive: it stays parked over the zone at full opacity with pointer-events: auto.

The hidden flag is a cheap attribute walk and it is correctness, not perf, so it is now sampled on every wake — paused or not — while the measurement half stays gated. The PTY is untouched: only the overlay stands down.

Verified against a live build over CDP. With the terminal stacked as a tab in the main zone, switching away while unfocused previously left active: workspace with the overlay still hit-testing over the pane; it now reports hidden with the chat reachable, and the terminal workspace stays mounted. The regression test fails on main and passes here.

This is scoped to the terminal overlay. It does not address the Bot Mode open failures tracked in #89617 / #90111 / #89556 / #89834, which are backend hydration and workspace-tab problems rather than occlusion.

Closes #82315
Closes #72590

The persistent terminal is a position:fixed overlay that chases its slot's
rect, and the whole tracker — visibility included — was gated behind the
renderer pause. Switching tabs while the window is unfocused therefore left
the overlay parked over the zone at full opacity with pointerEvents:auto, so
the chat underneath was unreachable until something refocused the window.

Visibility is correctness rather than perf, so sample it on every wake even
while paused; the rect chase, which is the part that forces layout, stays
gated.
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 7f3d255 — test(desktop): cover the terminal overlay hiding on an unfoc

⚠️ Warnings

OSV vulnerability scan · View job

7 known vulnerabilities found in pinned dependencies.

How to fix:

Review the findings in the Security tab. Update the affected dependencies if a patched version is available.


debug info

CI timings

CI timings · View report · View job

Wall time 7m56s vs 7m56s (+0.0%). 11 job(s) slower, 5 faster, 3 unchanged.

  • JS & TS checks / apps/desktop / check:test:ui:shard-1of3: +14.0s
  • JS & TS checks / apps/desktop / check:lint: +14.0s
  • JS & TS checks / apps/desktop / check:test:ui:shard-2of3: +12.0s
  • JS & TS checks / ui-tui / check: -11.0s
  • JS & TS checks / apps/desktop / check:test:desktop:all: +10.0s

@OutThisLife
OutThisLife enabled auto-merge August 19, 2026 23:40
@OutThisLife
OutThisLife merged commit 2eb0b3b into main Aug 19, 2026
41 checks passed
@OutThisLife
OutThisLife deleted the bb/terminal-tab-trap branch August 19, 2026 23:40
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/desktop Electron desktop app (apps/desktop/*) labels Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

2 participants