Skip to content

fix(cli): list Create a new Project first in the setup picker#111

Merged
AmanVarshney01 merged 3 commits into
mainfrom
fix/project-picker-create-first
Jul 3, 2026
Merged

fix(cli): list Create a new Project first in the setup picker#111
AmanVarshney01 merged 3 commits into
mainfrom
fix/project-picker-create-first

Conversation

@AmanVarshney01

Copy link
Copy Markdown
Member

With many projects, reaching Create a new Project in the interactive setup picker meant paging past the entire list. It's now the first option; Cancel stays last. Applies to both project link and app deploy first-time setup (shared picker).

Before:

? Which Project should this directory use?
  ❯ Acme Dashboard
    Billing API
    ... (N more)
    Create a new Project
    Cancel

After:

? Which Project should this directory use?
  ❯ Create a new Project
    Acme Dashboard
    Billing API
    ...
    Cancel

Note the intentional side effect: plain Enter now starts the create flow instead of linking the first listed project. Creating still requires typing a name, so there's no silent resource creation; existing projects are one arrow-key away.

Testing: spec examples updated, six picker-driving tests adjusted for the new order, full suite 591 green.

With many projects, creating a new one required paging past the whole
list. The interactive project setup picker (project link and app
deploy setup) now lists Create a new Project first, with Cancel last;
spec examples updated and picker-driving tests adjusted for the new
order.
Glyph over color: the prompt library owns the active-row styling
(embedded ANSI would break its highlight), and the style guide forbids
color-only meaning. The + survives NO_COLOR and non-TTY logs.

@kristof-siket kristof-siket left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 948b027b-543d-495e-88c6-b365aaef0db6

📥 Commits

Reviewing files that changed from the base of the PR and between df4ad95 and 0d9ab98.

📒 Files selected for processing (5)
  • docs/product/command-spec.md
  • packages/cli/src/lib/project/interactive-setup.ts
  • packages/cli/tests/app-controller.test.ts
  • packages/cli/tests/project-controller.test.ts
  • packages/cli/tests/project.test.ts

Summary by CodeRabbit

  • Bug Fixes

    • Improved the interactive project picker so “Create a new Project” appears first and stays visible without paging.
    • Added a non-color + indicator for the create option, making it easier to recognize in all themes and terminal settings.
  • Documentation

    • Updated the command specification to match the latest interactive project selection behavior.

Walkthrough

Changes

Summary: Reorders the interactive Project selection prompt so "Create a new Project" appears first, before existing project entries, with "Cancel" remaining last. The command spec documentation was updated to reflect the new ordering and includes a non-color + glyph indicator for the create option. Test stdin sequences across four test files were updated to send different keypress sequences (arrow-down or plain carriage returns) to correctly navigate the reordered picker in interactive test scenarios.

Impacted areas: interactive project setup prompt logic, command spec documentation, and associated test fixtures for app-controller, project-controller, and project commands.

Sequence Diagram(s)

Not applicable — changes are limited to list ordering and test input adjustments without new interaction flows.

Related PRs: None identified.

Suggested labels: cli, documentation, tests

Suggested reviewers: None identified.

Poem:
A rabbit hopped to pick a Project name,
Found "Create" now leading, first in the game.
Arrow keys shuffled, carriage returns too,
Tests all adjusted to match the new view.
Hop, hop, reorder — the picker's anew! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: moving “Create a new Project” to the top of the setup picker.
Description check ✅ Passed The description matches the PR and explains the reordered picker, updated Enter behavior, and related test updates.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/project-picker-create-first
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/project-picker-create-first

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

@AmanVarshney01 AmanVarshney01 merged commit c74cfcb into main Jul 3, 2026
10 checks passed
@AmanVarshney01 AmanVarshney01 deleted the fix/project-picker-create-first branch July 3, 2026 09:41
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.

3 participants