Skip to content

chore(internals): cover playground url construction in utils - #314

Merged
coryrylan merged 1 commit into
mainfrom
topic/upkeep/coverage/playground-utils-url
Sep 17, 2026
Merged

coryrylan merged 1 commit into
mainfrom
topic/upkeep/coverage/playground-utils-url

Conversation

@cursor

@cursor cursor Bot commented Sep 17, 2026

Copy link
Copy Markdown

Selected task

coverage for projects/internals/tools/src/playground/utils.ts.

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

Measurement

Metric Before After
Lines 71/76 (93.42%) 76/76 (100%)
Branches 45/55 (81.81%) 54/55 (98.18%)

Added tests in the existing utils.test.ts that reload the module with ELEMENTS_PLAYGROUND_BASE_URL set so createPlaygroundURL actually builds a URL. They cover optional name / theme / referer query params and the character-limit ToolError.

Public API

No public API changed. Production utils.ts is untouched.

Left alone

  • The remaining uncovered serialize(..., compress = false) branch, which is not reachable from the public surface.
  • Existing tests that assert an empty string when the playground base URL is unset.

Validation

  • projects/internals/tools: lint pass; test 734 pass.
  • test:types, test:axe, test:ssr, test:lighthouse, test:visual: not defined for this package.
  • Root mise exec -- pnpm run ci: pass.
  • git diff --check: pass.
Open in Web View Automation 

Adds unit tests that load playground utils with ELEMENTS_PLAYGROUND_BASE_URL
set, covering name/theme/referer query construction and the url length limit.

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

coderabbitai Bot commented Sep 17, 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 89bae6db-6305-4239-846c-fdd0b2483f43

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 17, 2026 06:15
@coryrylan coryrylan added the upkeep label Sep 17, 2026 — with Cursor
@coryrylan
coryrylan merged commit f5b35ac into main Sep 17, 2026
16 checks passed
@coryrylan
coryrylan deleted the topic/upkeep/coverage/playground-utils-url branch September 17, 2026 13:24
@coryrylan

Copy link
Copy Markdown
Collaborator

🎉 This issue has been resolved in version 2.1.0 🎉

Changelog

@coryrylan

Copy link
Copy Markdown
Collaborator

🎉 This issue has been resolved in version 2.8.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