Skip to content

chore(internals): cover playground browser open branches - #373

Merged
coryrylan merged 1 commit into
mainfrom
topic/upkeep/coverage/playground-browser-open
Oct 5, 2026
Merged

coryrylan merged 1 commit into
mainfrom
topic/upkeep/coverage/playground-browser-open

Conversation

@cursor

@cursor cursor Bot commented Oct 5, 2026

Copy link
Copy Markdown

Selected task

Coverage for projects/internals/tools/src/playground/service.ts.

Selector rationale: "2 uncovered lines, 92% lines and 85.71% branches, the smallest gap below the 90% threshold."

Measurement

  • Before: lines 23/25 (92%), branches 18/21 (85.71%)
  • After: lines 25/25 (100%), branches 21/21 (100%)
  • No other file's coverage decreased

PlaygroundService.create opens the system browser when CI is unset and ELEMENTS_ENV is mcp or cli. The new tests call create in both environments with CI removed and assert that open receives the returned URL. The open module is mocked so the suite does not launch a browser.

Public API

No public API changed.

Left alone

Validation failures, formatted playground names, and the existing path that skips the browser when CI is set were already covered.

projects/internals/tools has no DEVELOPMENT.md. It defines lint, test, and test:coverage. It does not define test:types, test:axe, test:ssr, test:lighthouse, or test:visual.

Validation

  • pnpm run lint in projects/internals/tools: pass
  • pnpm run test:coverage in projects/internals/tools: 763 tests pass
  • Root CI=true pnpm run ci: pass
  • git diff --check: clean

pnpm run test (coverage disabled) fails on unmodified main as well. The node test config isolates modules only when coverage is enabled, so incomplete node:fs mocks leak across files. Package CI runs test:coverage, which passes.

Open in Web View Automation 

@cursor
cursor Bot marked this pull request as ready for review October 5, 2026 06:24
@coryrylan coryrylan added the upkeep label Oct 5, 2026 — with Cursor
@coderabbitai

coderabbitai Bot commented Oct 5, 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: 2df70c07-c994-4f74-a2d0-3b0b8e75f5a9

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
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-code-quality

github-code-quality Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/vitest

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

Show a line coverage summary of the most impacted files.
File main b4d7c92 topic/upkeep/coverag... ef6c27e +/-
projects/intern...ound/service.ts 92% 100% +8%

Updated October 05, 2026 12:05 UTC

Adds unit tests that call PlaygroundService.create for the mcp and cli
environments while CI is unset, and assert that the open package receives
the returned playground URL. Line coverage for service.ts moves from 92%
to 100%, and branch coverage moves from 85.71% to 100%. No behavior change.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>
@coryrylan
coryrylan force-pushed the topic/upkeep/coverage/playground-browser-open branch from 8a1883e to ef6c27e Compare October 5, 2026 11:55
@coryrylan
coryrylan enabled auto-merge (rebase) October 5, 2026 11:55
@coryrylan
coryrylan merged commit 0e67caa into main Oct 5, 2026
17 checks passed
@coryrylan
coryrylan deleted the topic/upkeep/coverage/playground-browser-open branch October 5, 2026 12:10
@coryrylan

Copy link
Copy Markdown
Collaborator

🎉 This issue has been resolved in version 2.12.0 🎉

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