Repository navigation
fix(app): keep session tab preview from intercepting clicks - #442
Conversation
Kobalte's layer stack sets inline pointer-events: auto on every mounted layer, overriding the preview's pointer-events: none. After a folder switch the open preview covered the review panel's Open file button. Force the non-interactive preview and restore the quarantined e2e regression. Closes #438
|
🔍 Automated Cursor review is underway. Please hold off on merging until the review comment lands here (usually 10–20 minutes). |
|
Review complete: Low — No High or Medium findings. The |
|
Re Cursor Low ( |
Intent
Fix issue #438 in shuv1337/shuvcode. Main lead authorization corr=91920f991fadc644: "The session-tab hover popover stays open with inline pointer-events: auto after a folder switch and covers the Open file button. Close or neutralize the popover on switch so the click lands, and un-fixme the tabs.spec.ts test as the regression proof. This is product-facing, so mode no-mistakes, yolo on. Keep it to that bug under the captain's no-extra-gates rule: the existing e2e plus CI is the proof."
Existing evidence from the completed Cursor review on #439 (comment): in job https://github.com/shuv1337/shuvcode/actions/runs/37427591275/job/112150819534 the first Open file click succeeds, but the next open("notes.txt") after switching to a session in another folder fails on all three attempts. With the review panel open at 1440x900, the focused/switched session tab leaves its hover preview over the button. The trace shows data-component=session-tab-popover positioned at translate3d(553px, 43px, 0px) with inline pointer-events: auto, overriding tab-popover.css pointer-events: none; its FolderSwitch project span intercepts the click. The quarantine in merged PR #439 is temporary and must be removed with this fix.
Captain's current process constraints: no additional validation/live-instance gates beyond the ask and brief. Existing e2e plus CI is the proof. Review findings after green CI get a fix commit, a PR reply per finding, and CI only, never a second full no-mistakes run. Unrelated flaky tests are quarantined with tracking issues, never re-run or blocking.
What Changed
tab-popover.css, the session-tab hover preview now usespointer-events: none !important. Kobalte's layer stack sets an inlinepointer-events: autoon every mounted layer. Without!important, that inline value won. A preview left open after a folder switch could then cover controls such as the review panel's Open file button and take their clicks.test.fixmequarantine (issue app e2e: FolderSwitch project label covers Open file button in tabs.spec folder-switch test #438) from the folder-switch regression test ine2e/regression/tabs.spec.ts, so it runs again as the regression check.Fixes #438
Risk Assessment
✅ Low: The change is a single CSS change.
pointer-events: none !importantoverrides the inlinepointer-events: autothat Kobalte's layer stack sets on the popover, so the purely presentational popover can no longer catch clicks on what it covers. The only other change removes the temporary quarantine (test.fixme) from the regression e2e test, as the intent requires.Testing
I built and served the app the way CI does (Vite build + preview with test fixtures) and drove it in Chromium. With the fix, the un-quarantined FolderSwitch test passed 6 of 6 runs. Without the fix it also passed locally, so the quarantined test alone doesn't reproduce the CI failure here. To check the bug itself, I wrote a throwaway probe that pins the open preview over the Open file button. Without the fix, the preview had computed
pointer-events: auto, was the element under the button, and Playwright's click timed out because the preview header intercepted it. With the fix, inlinepointer-eventswas stillautobut the computed value wasnone, the click reached the button, and notes.txt opened. Screenshots are in the evidence directory. All--trace onruns timed out, including a run of an unrelated test, so that's a local tracing problem and not part of this result. The probe spec, build output and reports were removed from the worktree afterwards.npx playwright test e2e/regression/tabs.spec.ts -g "each session tab shows its own file tab" --repeat-each=5on the production build: 5 passed, plus 1 earlier single passEvidence: Probe log, base CSS (reproduces the bug)
PROBE {"inline":"auto","computed":"auto","covers":true,"hit":"popover"} TimeoutError: locator.click: Timeout 5000ms exceeded. - <div data-slot="header">…</div> from <div>…</div> subtree intercepts pointer eventsEvidence: Probe log, fixed CSS
PROBE {"inline":"auto","computed":"none","covers":true,"hit":""} ✓ open session-tab preview does not intercept the Open file click it coversEvidence: Un-quarantined test with base CSS (passes locally; CI timing not reproduced)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
packages/app/e2e/regression/tabs.spec.ts:486- The un-quarantined FolderSwitch test also passes locally on the base CSS (3/3), so on this machine it doesn't fail before the fix. It depends on CI timing to open the hover preview. A deterministic probe pinning the preview over the button did reproduce the bug and confirm the fix. The intent names the existing e2e plus CI as the proof, so no extra test was added.npx playwright test e2e/regression/tabs.spec.ts -g "each session tab shows its own file tab" --repeat-each=5on the production build: 5 passed, plus 1 earlier single passPLAYWRIGHT_BUILD=1 PLAYWRIGHT_PORT=3917 PLAYWRIGHT_SERVER_PORT=3917 npx playwright test e2e/regression/tabs.spec.ts -g "each session tab shows its own file tab"(un-quarantined test, 1 run and --repeat-each=5, fix applied)Same test with base-commit tab-popover.css restored (--repeat-each=3): it also passes locally, so it doesn't reproduce the CI timing failure on this machineTemporary probe spec (deleted afterwards) at 1440x900: switch to the session in the other folder, hover its tab to open the preview, move the preview over the Open file button as in the CI trace, record inline vs. computed pointer-events and elementFromPoint, take a screenshot, then do a real Playwright click and open notes.txtRan the same probe with the base-commit CSS restored to reproduce the bugRan another tabs.spec test with--trace onand it timed out the same way, confirming those timeouts come from the trace harness, not the change✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.