Repository navigation
[tooltip] Fix provider delay group lifecycle - #4887
Conversation
commit: |
Bundle size
PerformanceTotal duration: 1,274.18 ms +44.44 ms(+3.6%) | Renders: 50 (+0) | Paint: 1,920.37 ms +37.04 ms(+2.0%)
11 tests within noise — details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codex Review (GPT-5.5)Dominant type: bug-fix, with regression-test coverage. I reviewed the full PR diff against freshly fetched 1. Bugs / Issues (None)No actionable issues found. Root Cause & Patch AssessmentThe patch addresses the two relevant root causes: inactive consumers no longer clear the active delay-group context on unmount, and provider delay changes now refresh the backing refs without breaking the current instant-open phase. The cleanup now keys off the active Test Coverage AssessmentCoverage is well targeted. The new Validated:
RecommendationApprove ✅ The change is small, focused, and has regression tests that demonstrate the previous behavior was broken against the fresh base branch. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4bd44f7c67
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
Summary
Bug
FloatingDelayGroupcaptures the initial delay only once, so laterTooltip.ProvidercloseDelay updates are ignored. Its cleanup also clears the shared current context for any consumer unmount, meaning an inactive tooltip unmount can prevent the next tooltip from closing the active one.Reproduction
Test plan
pnpm test:jsdom FloatingDelayGroup --no-watchpnpm test:jsdom TooltipProvider --no-watchpnpm test:chromium TooltipProvider --no-watchpnpm eslintpnpm typescript