Repository navigation
Conversation
There was a problem hiding this comment.
The one-line CSS fix looks right. menu-v2-content is the shared surface for menus, submenus and select dropdowns, so marking it app-region: no-drag removes it from Electron's drag region wherever it overlaps the session header's drag area. I couldn't check native window hit-testing in the desktop app (that needs Electron on macOS or Windows). In Playwright, the new test fails on the base at the menu's computed app-region (none) after confirming that the menu overlaps the header drag area. With this PR it passes. The full session-header.spec.ts suite also passes (29/29).
The public API is unchanged.
One point on the test, inline.
| .toBe(true) | ||
| // Chromium's synthetic clicks bypass native window hit-testing, so also assert the exclusion Electron consumes. | ||
| await expect(menu).toHaveCSS("app-region", "no-drag") | ||
| await menu.getByRole("menuitem", { name: "Rename", exact: true }).click() |
There was a problem hiding this comment.
As the comment above says, Playwright's clicks skip native window hit-testing. So the Rename and Export steps after the app-region assertion pass whether or not the fix is there; on the base the test only fails at the CSS check. Could you cut the test down to the overlap check plus toHaveCSS("app-region", "no-drag")? That keeps the regression check small and drops the download and rename steps, which can't catch this bug.
Keep the menu overlap check and the no-drag CSS assertion that catches the native hit-testing regression. Rename behavior remains covered by the session-header context-menu cases. Export and its filename remain covered by the Home session context-menu case and sessionExportFilename tests.
There was a problem hiding this comment.
My earlier point about the test is addressed: it now checks only that the menu overlaps the header drag area and that the menu's computed app-region is no-drag. It passes with the fix. In my last review, the same checks failed on the base. I still haven't checked real clicks in the desktop app (that needs Electron on macOS or Windows).
The public API is unchanged.
Nothing else to raise.
Issue for this PR
Closes #63776
Type of change
What does this PR do?
Mark portaled menu surfaces as
app-region: no-drag. Electron otherwise lets the session header's draggable area intercept clicks on overlapping Rename and Export items. The shared rule also covers submenus.This bug fix needs no feature flag.
How did you verify your code works?
app-regionand passes 10/10 runs with five workers and zero retries. It checks overlap with the header and the menu's computedapp-region: no-drag.bun run checkpasses all 35 typecheck tasks, with existing lint warnings.Visual
Screenshots / recordings
Verified with native coordinate clicks on macOS in an isolated Electron 41.0.3 window using the built desktop fixture and mocked API. Restoring the original computed
app-regionreproduces the blocked click. With this fix, Export opens the system Save dialog and Rename focuses the title. The repository pins Electron 44.9.1, which was unavailable locally.Checklist