Skip to content

chore(core): cover native popover controller edge paths - #325

Open
cursor[bot] wants to merge 1 commit into
mainfrom
topic/upkeep/coverage/native-popover-controller
Open

cursor[bot] wants to merge 1 commit into
mainfrom
topic/upkeep/coverage/native-popover-controller

Conversation

@cursor

@cursor cursor Bot commented Sep 20, 2026

Copy link
Copy Markdown

Selected task

coverage for projects/core/src/internal/controllers/type-native-popover.controller.ts.

Selector rationale: "5 uncovered lines, 96.89% lines and 88.33% branches, the smallest gap below the 90% threshold".

Measurement

Before After
Lines 156/161 (96.89%) 160/161 (99.37%)
Branches 106/120 (88.33%) 110/120 (91.66%)
Functions 18/19 (94.73%) 19/19 (100%)

Added tests in the existing type-native-popover.controller.test.ts for:

  • skip remaining hostConnected setup when the element disconnects before the first update
  • show-popover invoker command
  • interest with unset openDelay and empty computed interestDelayStart
  • legacy hint mouseleave and rebinding listeners when the trigger changes

Public API

No public API changed. No production source changed. Behavior is unchanged.

Left alone

Line 203 (#removeHintTrigger when #hintTrigger already differs from the new trigger after #clearLegacyTrigger) remains uncovered. That branch is defensive after the hint path already clears the previous trigger. CSS.escape fallbacks and millisecond-unit interest delay parsing were not added, to stay inside the 150-line cap.

Diff: 1 file, +98 lines.

Open in Web View Automation 

Adds unit tests for disconnect-before-update, show-popover command,
empty interest delay, and legacy hint mouseleave. Line coverage rose
from 96.89% to 99.37% and branches from 88.33% to 91.66%. No public
API or behavior change.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: NVIDIA/elements/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: f099bac0-2f84-4138-ac19-6d0652affcd1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@cursor
cursor Bot marked this pull request as ready for review September 20, 2026 06:20
@coryrylan coryrylan added the upkeep label Sep 20, 2026 — with Cursor
@github-code-quality

Copy link
Copy Markdown

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/vitest

The overall line coverage in commit 7839547 in the topic/upkeep/coverag... branch remains at 99%, unchanged from commit 907a7ab in the main branch.

Show a line coverage summary of the most impacted files.
File main 907a7ab topic/upkeep/coverag... 7839547 +/-
projects/core/s...r.controller.ts 97% 99% +2%

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