Repository navigation
fix(ui): keep an outside tap from activating the page beneath - #190505
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThis PR suppresses the click following a touch release that dismisses a shared menu or popover. Example: At 390×844, tap the Tax filing research session while the Live activity filter is open.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 4 items remain Keep this PR open: the shared fix addresses accidental mobile navigation, but it must preserve vetoed closes and satisfy the existing listener guard. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe Control UI overlay registry receives document and shadow-root input events, delegates accepted visibility changes to the overlay lifecycle owner, and now intercepts the following touch-generated click. flowchart TD
A[Touch input] --> B[Overlay registry]
B --> C[Overlay lifecycle]
C --> D[Popover or menu closes]
B --> E[Document click interception]
E --> F[Underlying page action]
Technical reviewBest possible solution: Keep suppression in the shared registry, arm it only after accepted dismissal, and use the existing listener helper with explicit teardown. Do we have a high-confidence way to reproduce the issue? Current main dismisses the overlay on an outside release without suppressing its click, matching the supplied before screenshot and reported session-row navigation; no target code was executed. Is this the best way to solve the issue? The existing registry is the smallest appropriate owner, and the added test protects distinct touch, subsequent-tap, and mouse behavior, but click suppression must depend on accepted close admission. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e33046421b6f. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +30, Tests +43. Total +73 across 2 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 1, 2026, 11:28 AM ET / 16:28 UTC. |
…aw#190505) Keep the dismissing outside touch from activating the page below the popover while preserving keyboard, mouse and subsequent pointer actions. Budget exception approved after source simplification review: chat boot JavaScript is 60 bytes over its gzip ceiling. Behavioral, lint, type and security checks passed.
What Problem This Solves
On a phone, tapping outside an open popover or menu closes it and also activates whatever is under the finger. In Live activity, tapping a session row to dismiss the filter opens that session. #190376 added a guard for this to Dashboards alone, and every other surface still has the problem.
User Impact
On touch, a tap outside an overlay closes it without activating the control under the finger. A tap on a text field also focuses that field, since only the click is held back. The next tap acts on the page as usual. Scrolling still leaves an overlay open, as it does today. Mouse behavior doesn't change.
Why This Change Was Made
The overlay registry already decides when an outside press dismisses an overlay, so one rule there covers every popover and menu. It absorbs one click, only when a touch release has just dismissed something. The next press clears it, even when the tap produced no click and took the registry's last root with it, so a long press can't swallow a later click. Keyboard activation still goes through.
With this landed, #190376 can drop its local
pointerdownandclickguard indashboard-filter-popover.tsx. Sheets aren't involved: #190499 and the sidebar's sheets take the tap on their own backdrop.Evidence
Mock data at 390x844, real touch input, same tap on the second session row. This changes behavior and no pixels, so there are no theme images.
oxfmt,oxlint,tsgo:uiandui:check-performance:basepass. Browser tests for popovers, overlay lifecycle, menus, session menu, pickers and multi-select pass, along with the mobile sheet e2e tests.pointerType: touch. The first tap on a Live activity row closed the filter and stayed on the page, the second opened the session, and a tap on the search field closed the filter and focused the field. Real Safari isn't captured: OS clicks reach it as a mouse. iOS Safari isn't run.