Clicking above the Usage or Settings modal doesn't close it in the macOS desktop app
What happened
In the macOS desktop app, the Usage modal (opened from the bottom-left of the sidebar) closes on a click on the backdrop to its left, right, or below it. A click on the backdrop above it does nothing. The user hit this in macOS fullscreen, with a thread open. Settings uses the same AppRouteModal.
Diagnosis
The backdrop strip above the modal lies over the app's titlebar drag regions: the thread <header> and the sidebar header, both .drag-region, 52px tall. Electron treats a press there as a window drag (caption hit), so it never reaches the renderer, and AppRouteModal's backdrop-dismiss handler (onPointerDown/onClick on DialogPrimitive.Viewport) never runs. The Popup sets [-webkit-app-region:no-drag], but the Viewport and backdrop don't. App-region hit-testing ignores z-index, so the fixed backdrop doesn't mask the headers' drag rects. PullRequestsPage.tsx (~L1380) has a comment about this.
Spots under the backdrop that are themselves no-drag (header links and buttons) let the click through, so the modal closes there. That's why the bug looks inconsistent.
Gap sizes: in a 1100×780 window the modal's top is at 40px (lg:p-10), so the whole top gap is dead. In fullscreen on a 1728×1084 viewport the modal is centered at max-h 60rem, so its top is at 62px and the top 52px of the gap are dead.
A likely fix is to make the backdrop layer no-drag while the modal is open: [-webkit-app-region:no-drag] on the Viewport, or a no-drag strip over the titlebar band. Mind the Electron 44 initial/none/no-drag notes in index.css (~L1832) and the intentional max-sm drag strip inside the Popup.
Steps to reproduce
- Open T3 Code Desktop on macOS and open a thread, so the thread header is showing.
- Open Usage from the bottom-left of the sidebar.
- Click the dimmed backdrop above the modal, over an empty part of the thread header row: the modal stays open.
- Press and drag at the same spot: the window moves.
- Click the backdrop to the left, right, or below the modal: it closes.
Version
Reported on 0.1.10-nightly.20261113.4630 (T3 Code Desktop). Reproduced on main at 2953fda6 (dev desktop build, Electron 44.10.1). AppRouteModal.tsx is identical in both.
Environment
macOS 27.0.0 (arm64), T3 Code Desktop (Nightly) against its local server, in macOS fullscreen. Verification build: vp run dev:desktop from main with isolated state.
Evidence
Real OS-level clicks (CGEvent) on the main dev build, modal state read through CDP:
| Where (window CSS px) | What's under the backdrop | Result |
|---|---|---|
| Windowed 1100×780, modal top = 40 | ||
| (550, 20), above the modal | thread <header> .drag-region |
stays open |
| (230, 10), above the modal | sidebar header .drag-region |
stays open |
| (150, 20), above the modal | "T3 Code home" link (no-drag) | closes |
| (20, 390), left of the modal | no drag region | closes |
| press-drag at (550, 20), +40px | thread header | window moves 40px, modal stays open |
| Fullscreen 1728×1084, modal top = 62 | ||
| (1710, 500), right of the modal | closes | |
| (900, 1075), below the modal | closes |
No log or trace output: the press never reaches the renderer.
Related issues
None found. Nearby but different: #28695 (modal fade-in), #36133 (modal size).
Fix applied or workaround
None applied. Workaround: press Esc, click the X, or click the backdrop to the left, right, or below the modal.
Filed by
Claude Code (Claude Opus 5.5) running T3 Code's triage playbook. Reproduced with real clicks on a local main dev build.
Posted with gh from the reporter's account, which can't apply the via-triage label. Please add it.