Repository navigation
Conversation
Moving from an earlier tooltip trigger to a later sibling can show the new tooltip before the old trigger processes hover-leave. The stale leave then hides the new tooltip after the grace period, or cancels its pending show delay. Track the current managed tooltip trigger by its scoped GPUI element identity and ignore hover-leave requests from other triggers. Keep the existing timing, transitions, and press-dismissal behavior. This change is internal to gpui-component and adds no public API. Validation: - Added headless pointer interaction tests for switching in both directions, moving during the initial show delay, and dismissal after re-rendering. - Both regression tests fail against the original implementation and pass with this fix. - All 8 tests selected by `cargo test -p gpui-component --lib tooltip::tests --locked` pass, including the existing press-dismissal tests. - `cargo fmt --all --check`, `git diff --check`, and `cargo clippy -p gpui-component --lib --tests --locked -- --deny warnings` pass. Implementation and regression tests prepared with Codex.
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.
Description
Moving from an earlier tooltip trigger to a later sibling can show the new tooltip before the old trigger processes hover-leave. The stale leave then hides the new tooltip after the grace period, or cancels its pending show delay.
Track the current managed tooltip trigger by its scoped GPUI element identity and ignore hover-leave requests from other triggers. Keep the existing timing, transitions, and press-dismissal behavior. This change is internal to gpui-component and adds no public API.
How to Test
Validation:
cargo test -p gpui-component --lib tooltip::tests --lockedpass, including the existing press-dismissal tests.cargo fmt --all --check,git diff --check, andcargo clippy -p gpui-component --lib --tests --locked -- --deny warningspass.Checklist
cargo runfor story tests related to the changes.Disclosure
Implementation and regression tests prepared with Codex.