Repository navigation
fix(app): prevent desktop titlebar submenus from stacking - #63289
Railgun-wiki wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
This fixes the stacking: I ran the issue's reproduction in headless Chromium with the windows-menu.html fixture. On the base, hovering slowly or diagonally down File→Help left 5 submenus open. With this PR, at most one was open at every step. Moving from File's trigger down to its last item kept the submenu open, so #59613 doesn't come back. The other Windows menu tests in tabs.spec.ts and tsc -b pass.
Public API: unchanged.
Two things need work before this is ready:
- The new test "discards a pending hover after explicit selection" is flaky. It failed in 2 of 3 runs for me: the View submenu opened with the keyboard was closed again by the next check (line 1816). In one of three runs of the slow hover check, hovering Help also left no submenu open at all. Both suggest that Kobalte's own hover/close handling and the new pending-timer state can still get out of sync (see the inline comment).
- The new tests are large and timing-heavy (about 155 lines). They use
page.clockfast-forwards tied to the 150 ms delay, hand-computed pointer paths and Kobalte internals ("ignores a Kobalte hover request"). The e2e guide asks for deterministic tests of user-visible behaviour. A sibling-hover test (one submenu open at a time) and one diagonal-move test would cover the fix. Please drop or simplify the rest.
Related: #59613
There was a problem hiding this comment.
The new commits address both earlier points: the open state is down to one signal plus the settle timer, and the flaky timer-heavy tests are gone. I re-ran the issue's reproduction in headless Chromium with the windows-menu.html fixture. Hovering slowly or diagonally down File→Help never leaves more than one submenu open, and the base still stacks five. Moving from File to its last item keeps the submenu open, so #59613 doesn't come back. Hovering a parent after a keyboard selection still opens its submenu. The Windows menu tests in tabs.spec.ts passed 3 times each, and tsc -b passes.
Public API: unchanged.
No further concerns.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
There was a problem hiding this comment.
The new commit only merges dev; this PR's changes to windows-menu.tsx and tabs.spec.ts are unchanged, and nothing merged from dev touches the menu components or the Kobalte version. I re-ran the issue's reproduction on the new head in headless Chromium: never more than one submenu open, the submenu stays open while moving to its last item, and the Windows titlebar menu tests and tsc -b pass.
Public API: unchanged.
No further concerns.
There was a problem hiding this comment.
The new commit only merges dev; this PR's changes are unchanged, and nothing merged touches the titlebar menu, the shared menu components or the Kobalte version. I re-ran the issue's reproduction on the new head in headless Chromium: never more than one submenu open, the submenu stays open while moving to its last item, and the Windows titlebar menu tests and tsc -b pass.
Public API: unchanged.
No further concerns.


Issue for this PR
Closes #63095
Type of change
What does this PR do?
Hovering across the desktop titlebar menu can leave several submenus open at once.
This change controls the open submenu within the titlebar menu. It delays switching while the pointer is moving across sibling items, so moving diagonally into a submenu remains possible. Keyboard and click selections cancel pending hover changes.
How did you verify your code works?
bun run typecheckinpackages/app.bun run checkfrom the repository root: lint passed; the full check did not complete becausedrizzle-kitwas missing and Turbo exited with SIGSEGV.Visual
Screenshots / recordings
Before:
After:
Checklist
Added by the opencode bot (AI-generated).
Related: #59613