Skip to content

fix(core): cleanup timeout on popover close#111

Merged
coryrylan merged 1 commit into
mainfrom
topic-interest-delay-fix
May 29, 2026
Merged

fix(core): cleanup timeout on popover close#111
coryrylan merged 1 commit into
mainfrom
topic-interest-delay-fix

Conversation

@coryrylan
Copy link
Copy Markdown
Collaborator

@coryrylan coryrylan commented May 28, 2026

  • Added tests to ensure that the popover cancels delayed showing when it receives an 'interest' event or a 'hide-popover' command before the delay completes

Summary by CodeRabbit

  • Bug Fixes
    • Cancelled pending popover opening when the popover is closed, receives a hide command, or the component disconnects—preventing inadvertent opens after a delay.
  • Tests
    • Added tests verifying delayed popover opening is cancelled when closed or when a hide command is received during the open delay.

Review Change Stack

@coryrylan coryrylan requested a review from johnyanarella May 28, 2026 21:11
@coryrylan coryrylan self-assigned this May 28, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 43a35ce1-8dbe-45fc-8285-bb921d85d58b

📥 Commits

Reviewing files that changed from the base of the PR and between 3bdc2a7 and 748fe7f.

📒 Files selected for processing (2)
  • projects/core/src/internal/controllers/type-native-popover.controller.test.ts
  • projects/core/src/internal/controllers/type-native-popover.controller.ts

📝 Walkthrough

Walkthrough

TypeNativePopoverController now clears scheduled interest open/close timers when the popover transitions to closed via toggle, when handling a hide-popover command (before calling hidePopover()), and when the controller disconnects. Two tests assert that openDelay-driven opens are cancelled by hidePopover() and hide-popover command events.

Changes

Interest Timeout Cancellation

Layer / File(s) Summary
Interest timeout cleanup across lifecycle and test coverage
projects/core/src/internal/controllers/type-native-popover.controller.ts, projects/core/src/internal/controllers/type-native-popover.controller.test.ts
The controller now calls #clearInterestTimeout() when toggling to closed, before executing hidePopover() for hide-popover commands, and during hostDisconnected(). Two tests validate that a pending open started by interest + openDelay is cancelled when hidePopover() or a hide-popover CommandEvent occur before the delay elapses.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding timeout cleanup when popovers close, which is the core functionality added to the controller.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch topic-interest-delay-fix

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Actionable comments posted: 0

- Added tests to ensure that the popover cancels delayed showing when it receives an 'interest' event or a 'hide-popover' command before the delay completes

Signed-off-by: Cory Rylan <crylan@nvidia.com>
@coryrylan coryrylan force-pushed the topic-interest-delay-fix branch from 3bdc2a7 to 748fe7f Compare May 29, 2026 02:06
@coryrylan coryrylan merged commit a3c1448 into main May 29, 2026
13 checks passed
@coryrylan coryrylan deleted the topic-interest-delay-fix branch May 29, 2026 02:28
@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.2.1 🎉

Changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants