Repository navigation
Studio: keep the sidebar More flyout shut when a modal opens during its hover delay - #13237
Merged
Merged
Conversation
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Oct 10, 2026
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9244
What was wrong
The sidebar More flyout opens on hover after a 150 ms delay (
useHoverFlyout). If a modal dialog opens inside that delay while the pointer rests on More (for example Cmd+, for Settings or Cmd+P for the command palette), WebKit sends the trigger nopointerleave, so nothing cancels the timer. The timer then opens the flyout on top of the modal dialog, and it stays there until the mouse moves. Chromium and Firefox cancel the timer on their own, so this shows up in Safari and in Unsloth Desktop on macOS (WKWebView).The press path the issue originally measured is not a bug: a press at the More location with a dialog open lands on the dialog overlay and closes the dialog like any outside click, and the More hover preview then shows because the pointer is resting on it. That is unchanged here.
The change
The hover timer now checks, when it fires, whether the trigger sits under an active modal layer, using the existing
isBlockedByActiveModalfromcomponents/ui/tooltip-modal-layer.ts(the same check tooltips use). If it does, the flyout stays shut. Hover, press, touch and keyboard behaviour are otherwise unchanged.Evidence
Playwright on production
vite builddists served by one Studio install, real mouse and keyboard events. The pointer moves onto More, then the shortcut is pressed after the gap shown, and the state is read 1.2 s later (3 repeats per cell, WebKit). At a 400 ms gap the preview is already open before the dialog, and the dialog closes it on both arms (0/3 stuck each). Cmd+K opens no modal dialog, so it is a no-op control here:No change on the ordinary paths, main vs this branch, Chromium + Firefox + WebKit, 2 repeats each (identical on both arms):
tests/hover-intent.test.tsgains a check that fails on main and passes here;tsc -band eslint are clean.Before / after
WebKit, pointer resting on More, Cmd+, pressed 60 ms later, read 1.2 s after. Left: main, the More flyout sits on top of the Settings dialog. Right: this branch, the dialog alone.