Skip to content

app init: take the app name from the login too, ask nothing - #12

Merged
agorovyi merged 3 commits into
mainfrom
fix/init-identity-from-login
Oct 15, 2026
Merged

agorovyi merged 3 commits into
mainfrom
fix/init-identity-from-login

Conversation

@agorovyi

@agorovyi agorovyi commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

reactiv app init asks nothing now. It still prompted for an app name (or took --name), and whatever was typed became appName in reactiv.conf.js and the display name of the runnable shell, while the folder and the package were already named after the merchant slug from the login. The slug now fills the app name as well, so a project carries one identity: merchant slug and app UUID, both from the login. The --name flag is gone.

Docs updated to match (README, package README, docs/commands.md, docs/getting-started.md). Changeset: minor bump of @reactivapp/cli.

How it was tested

  • pnpm build, pnpm lint, pnpm typecheck, pnpm test (cli 477/477, cli-ui 2/2).
  • pnpm scan:internal, pnpm pack:inspect, pnpm changeset:check --since origin/main.
  • Init tests now scaffold without --name and assert appName: 'acme' in reactiv.conf.js next to the package name and the app UUID; the shadowing cases now vary the merchant slug directly.
  • The no-login test runs the built CLI against an empty home directory with REACTIV_API_KEY removed, so it proves the command fails with the login hint instead of waiting for input.

Checklist

  • pnpm lint, pnpm typecheck and pnpm test pass locally
  • A changeset is included (pnpm changeset), or this change does not affect the published packages
  • No credentials, internal hostnames or account identifiers appear in the diff (pnpm scan:internal passes)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Changes
    • reactiv app init uses your authenticated merchant slug to name the project folder, package, and app shell, without prompting for an app name.
    • You must log in before initializing an app.

The command still prompted for an app name, and whatever was typed became
appName in reactiv.conf.js and the shell's display name while the folder and
package were already named after the merchant slug from the login. The slug
now fills the app name as well, --name is gone, and the command asks nothing.

The no-TTY test now runs against an empty HOME so it exercises the
not-logged-in path instead of the removed prompt.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 17a51271-a799-4bc1-98d2-71d60a4a4d99
📥 Commits

Reviewing files that changed from the base of the PR and between de36146 and 2af538b.

📒 Files selected for processing: 1
  • scripts/internal-reference-allowlist.json
+--------------------------------------------------------+
| You can't just `setTimeout` your way out of causality. |
+--------------------------------------------------------+
  \
   \     /)/)
        ( '')
        /  |
      o(___)

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: d51eb4b5-2cab-4fda-af38-9160be2e855c
📥 Commits

Reviewing files that changed from the base of the PR and between 51ea9ee and f8174db.

📒 Files selected for processing: 10
  • .changeset/init-identity-from-login.md
  • README.md
  • docs/commands.md
  • docs/getting-started.md
  • packages/cli/README.md
  • packages/cli/src/commands/app/init.ts
  • packages/cli/test/init-run.test.ts
  • packages/cli/test/stub-commands.test.ts
  • packages/cli/test/upgrade.test.ts
  • packages/cli/test/walkthrough.test.ts

Included review availability: This review used your included allowance. 1 included review remains after this review. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

Walkthrough

reactiv app init no longer prompts for or accepts an app name. It uses the authenticated merchant slug for the project folder, package, shell app, and template appName, while the app UUID remains part of the generated identity.

Changes

App initialization identity

Layer / File(s) Summary
Derive app names from merchant slug
packages/cli/src/commands/app/init.ts, packages/cli/test/init-run.test.ts, .changeset/init-identity-from-login.md, README.md, docs/commands.md, docs/getting-started.md, packages/cli/README.md
The init command removes the --name flag, prompt, and name validation. It uses the merchant slug for template expansion and success output. Direct tests and documentation reflect the new naming behavior.
Update CLI init test invocations
packages/cli/test/stub-commands.test.ts, packages/cli/test/upgrade.test.ts, packages/cli/test/walkthrough.test.ts
The tests invoke init without --name. The stub-command test checks the missing-login error using temporary directories and an environment without REACTIV_API_KEY.

Priority: ➖ Normal

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

Change: Feature

Merge Risk: ⚪ Minimal · up to f8174

Init now derives the generated app name from the logged-in merchant slug. No concrete PR-introduced regression is established, so no material merge blocker remains.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: app init takes the app name from the login and no longer asks for it.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 5…
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)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

agorovyi and others added 2 commits October 15, 2026 16:43
Updating a pull request branch from main in the GitHub UI produces a merge
commit authored under the maintainer's GitHub account address and committed
by GitHub's no-reply identity. The commit-message scan now knows both.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@agorovyi
agorovyi merged commit f61319f into main Oct 15, 2026
1 of 2 checks passed
@agorovyi
agorovyi deleted the fix/init-identity-from-login branch October 15, 2026 20:52
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.

1 participant