Skip to content

fix(link): pin the create-application option to the top of the app picker - #401

Merged
rafa-thayto merged 1 commit into
mainfrom
rafa-thayto/commands-update-order-explore
Jul 30, 2026
Merged

fix(link): pin the create-application option to the top of the app picker#401
rafa-thayto merged 1 commit into
mainfrom
rafa-thayto/commands-update-order-explore

Conversation

@rafa-thayto

Copy link
Copy Markdown
Contributor

Summary

  • The shared application picker (lib/app-picker.ts, used by clerk link, clerk init, and the clerk users fallback) appended the "+ Create a new application" choice after all applications. With a long app list the option was hidden below the truncation fold and effectively invisible unless the user scrolled past every app or typed a term with no matches.
  • The create choice is now the first row, both in the unfiltered list and while a search term is typed.
  • The clerk users action menu already lists "Create user" first; a sweep of all other interactive list prompts (init, deploy, switch-env, api, skills) found no other selectable "create" options, so this is the only ordering change needed. This also brings the code in line with commands/link/README.md, which already documented the option as "pinned at the top".

Test plan

  • Updated the three clerk link app-selection tests to assert the create option is index 0 (empty term, name-filtered term, and ID-filtered term), and strengthened the previously length-only unfiltered assertion to pin the full order.
  • bun run format, bun run lint, bun run typecheck pass.
  • bun run test — 2123 tests pass.
  • Changeset added (patch).

…cker

The "+ Create a new application" choice in the shared app picker was
appended after all applications, so with a long app list it was hidden
below the truncation fold in `clerk link`, `clerk init`, and the
`clerk users` fallback picker. Render it as the first row, both in the
unfiltered list and while a search term is typed.
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9ae01f7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
clerk Patch

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

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The interactive application picker now displays “+ Create a new application” before matching applications. Tests cover empty searches, name filtering, and app ID filtering, and a patch changeset documents the behavior for clerk link and clerk users.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: wyattjoh

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: moving the create-application option to the top of the app picker.
Description check ✅ Passed The description accurately describes the app picker ordering change, tests, and changeset, and is clearly related to the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/commands-update-order-explore.md:
- Around line 1-5: Update the changeset description to include clerk init
alongside clerk link and clerk users, since the shared application picker change
affects all three CLI flows.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 52f1bd9c-7c02-47e1-9a4c-d66641f0f289

📥 Commits

Reviewing files that changed from the base of the PR and between e2224f0 and 9ae01f7.

📒 Files selected for processing (3)
  • .changeset/commands-update-order-explore.md
  • packages/cli-core/src/commands/link/index.test.ts
  • packages/cli-core/src/lib/app-picker.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)

Comment on lines +1 to +5
---
"clerk": patch
---

Show the "+ Create a new application" option first in the interactive application picker used by `clerk link` and `clerk users`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Include clerk init in the release note.

The shared picker change also affects clerk init, but the changeset currently mentions only clerk link and clerk users. Add clerk init so the patch note covers every affected CLI flow.

🤖 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/commands-update-order-explore.md around lines 1 - 5, Update the
changeset description to include clerk init alongside clerk link and clerk
users, since the shared application picker change affects all three CLI flows.

@rafa-thayto
rafa-thayto merged commit 3006b5b into main Jul 30, 2026
11 checks passed
@rafa-thayto
rafa-thayto deleted the rafa-thayto/commands-update-order-explore branch July 30, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants