feat(js): add sandbox command palette#8672
Conversation
🦋 Changeset detectedLatest commit: 388fcda The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Snapi: no API changes detected in |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
📝 WalkthroughWalkthroughThis PR adds an interactive command palette to the Clerk JS sandbox using a lightweight, self-contained implementation. A new Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.changeset/polite-papers-watch.md:
- Around line 1-2: The changeset file polite-papers-watch.md currently contains
only delimiters and must either be deleted or replaced with a valid changeset
frontmatter entry; if the sandbox output is included in the published build
(i.e., affects the `@clerk/clerk-js` package which publishes "dist"), replace the
delimiter-only content with a proper frontmatter mapping that lists the affected
package (e.g., `@clerk/clerk-js`) and a bump type (patch/minor/major) plus an
optional description so Changesets can generate a release, otherwise remove the
polite-papers-watch.md file entirely to avoid breaking changelog/release
tooling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 02e8563a-054e-48ee-887e-6277b6c239e3
📒 Files selected for processing (3)
.changeset/polite-papers-watch.mdpackages/clerk-js/sandbox/app.tspackages/clerk-js/sandbox/cmdk.ts
| --- | ||
| --- |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if sandbox is excluded from the clerk-js package
# Look for files configuration in package.json
cat packages/clerk-js/package.json | jq -r '.files // "no files field"'
# Check for .npmignore if present
if [ -f packages/clerk-js/.npmignore ]; then
echo "=== .npmignore content ==="
cat packages/clerk-js/.npmignore
fi
# Look for any references to sandbox in publish configuration
rg -n "sandbox" packages/clerk-js/package.json -A 2 -B 2 || echo "No sandbox references in package.json"Repository: clerk/javascript
Length of output: 1508
Fix empty Changesets file—either add bump metadata or remove it
.changeset/polite-papers-watch.mdcontains only the---delimiters (no package bump entries), which makes it unclear/likely invalid for Changesets processing.@clerk/clerk-jspublishes only"files": ["dist","no-rhc"], so if the sandbox feature outputs intodistduring the publish/release build, the change should include a proper version bump; if the sandbox is not part of the publish build, the changeset file should be removed.- Replace the delimiter-only content with a valid frontmatter/bump entry (or delete the file) so release tooling and changelog generation don’t miss or fail on this PR.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.changeset/polite-papers-watch.md around lines 1 - 2, The changeset file
polite-papers-watch.md currently contains only delimiters and must either be
deleted or replaced with a valid changeset frontmatter entry; if the sandbox
output is included in the published build (i.e., affects the `@clerk/clerk-js`
package which publishes "dist"), replace the delimiter-only content with a
proper frontmatter mapping that lists the affected package (e.g.,
`@clerk/clerk-js`) and a bump type (patch/minor/major) plus an optional
description so Changesets can generate a release, otherwise remove the
polite-papers-watch.md file entirely to avoid breaking changelog/release
tooling.
Description
Adds a keyboard command palette to the clerk-js sandbox so developers can jump to sandbox routes and toggle appearance controls with Cmd/Ctrl+K.
It also prevents the existing
/sidebar shortcut from firing while typing in inputs, textareas, or contenteditable regions.Tested with
pnpm --filter @clerk/clerk-js build:sandboxandpnpm changeset status --since=origin/main; pnpm printed the local Node engine warning because this shell is on Node v22.22.0 instead of the repo's Node >=24.15.0 requirement.https://clerk-js-sandbox-git-kylemac-sandbox-cmdk-interface.clerkstage.dev/ - and hit cmd+k and try searching
Checklist
pnpm testruns as expected.pnpm --filter @clerk/clerk-js build:sandboxruns as expected.Type of change