Skip to content

chore(core): cover default spatial keynav constructor options - #341

Merged
coryrylan merged 1 commit into
mainfrom
topic/upkeep/coverage/keynav-spatial-controller
Sep 24, 2026
Merged

coryrylan merged 1 commit into
mainfrom
topic/upkeep/coverage/keynav-spatial-controller

Conversation

@cursor

@cursor cursor Bot commented Sep 24, 2026

Copy link
Copy Markdown

Selected task

Coverage for projects/core/src/internal/controllers/keynav-spatial.controller.ts.

Selector rationale: "1 uncovered lines, 94.44% lines and 87.5% branches, the smallest gap below the 90% threshold".

Measurement

Metric Before After
Lines 17/18 (94.44%) 18/18 (100%)
Branches 14/16 (87.5%) 16/16 (100%)
Functions 5/6 (83.33%) 6/6 (100%)
Statements 19/20 (95%) 20/20 (100%)

The gap was the constructor default isEnabled = () => true when options are omitted. The new test constructs KeyNavigationSpatialController with only a host and asserts an ArrowRight nve-key command.

Public API

No public API changed. Production source is unchanged. One existing test file gained 20 lines.

Left alone

  • Production keynav-spatial.controller.ts
  • Other controllers and coverage targets
  • Visual baselines (LFS smudge noise in the worktree is not part of this change)

Validation

  • projects/core lint: pass
  • projects/core unit tests: 2193 pass (includes the new case)
  • projects/core test:coverage: pass, target file 100% lines/branches
  • projects/core test:axe: pass (wireit cache after pre-edit CI)
  • projects/core test:ssr: pass (wireit cache after pre-edit CI)
  • projects/core test:lighthouse: 79 pass
  • projects/core test:visual: pass (wireit cache after LFS-recovered CI)
  • projects/core test:types: pass (wireit cache; no production type changes)
  • root pnpm run ci: pass
  • git diff --check: pass
Open in Web View Automation 

Adds a unit test for constructing KeyNavigationSpatialController
without options, covering the default isEnabled path.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>
@coryrylan coryrylan added the upkeep label Sep 24, 2026 — with Cursor
@coderabbitai

coderabbitai Bot commented Sep 24, 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: 5cb249a4-2088-416d-99da-f37abdba4525

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 24, 2026 06:34
@github-code-quality

Copy link
Copy Markdown

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/vitest

The overall line coverage in commit c5fd050 in the topic/upkeep/coverag... branch remains at 99%, unchanged from commit 0e9e892 in the main branch.

Show a line coverage summary of the most impacted files.
File main 0e9e892 topic/upkeep/coverag... c5fd050 +/-
projects/core/s...l.controller.ts 94% 100% +6%

@coryrylan
coryrylan merged commit 4f76783 into main Sep 24, 2026
16 checks passed
@coryrylan
coryrylan deleted the topic/upkeep/coverage/keynav-spatial-controller branch September 24, 2026 23:14
@coryrylan

Copy link
Copy Markdown
Collaborator

🎉 This issue has been resolved in version 2.2.6 🎉

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