Add agent-legible project setup next actions#52
Conversation
|
Warning Review limit reached
More reviews will be available in 29 minutes and 23 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR introduces a structured NextActions system to the Prisma CLI, enabling agents and users to understand actionable follow-up steps through a unified model. The changes span type definitions, error handling, project command workflows, deployment error detection, output rendering, and comprehensive test coverage. ChangesNextActions System and Integration
🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 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. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@packages/cli/src/lib/project/resolution.ts`:
- Around line 177-228: Update buildProjectSetupNextActions so the
user-choice.commands array is derived from the existing helper
buildProjectRecoveryCommands instead of hardcoding the "prisma-cli project link"
and "--project" templates: call
buildProjectRecoveryCommands(options.commandName) (or similar) to obtain the
link/--project entries, then prepend or merge the always-present "prisma-cli
project list" entry into NextAction.commands; adjust references in the
user-choice NextAction (in function buildProjectSetupNextActions) to use that
derived array so the link/--project templates cannot drift from the shared
helper.
In `@packages/cli/src/shell/command-arguments.ts`:
- Around line 1-3: formatCommandArgument currently returns JSON.stringify for
unsafe values and lets strings that match /^[A-Za-z0-9._/-]+$/ through, which is
not POSIX shell-safe and also allows values starting with '-' to be emitted
unquoted; update formatCommandArgument to instead: treat a value as safe only if
it matches the allowlist AND does NOT start with '-' (so names like "-rf" are
quoted), otherwise return a single-quoted shell-safe string where every embedded
single quote is escaped using the standard '\'' sequence (i.e., replace each '
with '\'' and wrap the result in single quotes); keep the function name
formatCommandArgument and its return type string.
🪄 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: ASSERTIVE
Plan: Pro
Run ID: 0ed2cdcd-e08a-401e-a413-59fd85db87d2
📒 Files selected for processing (25)
docs/product/cli-style-guide.mddocs/product/command-principles.mddocs/product/command-spec.mddocs/product/error-conventions.mddocs/product/output-conventions.mdpackages/cli/src/controllers/app.tspackages/cli/src/controllers/project.tspackages/cli/src/lib/project/resolution.tspackages/cli/src/lib/project/setup.tspackages/cli/src/presenters/project.tspackages/cli/src/shell/command-arguments.tspackages/cli/src/shell/command-runner.tspackages/cli/src/shell/errors.tspackages/cli/src/shell/next-actions.tspackages/cli/src/shell/output.tspackages/cli/src/types/project.tspackages/cli/tests/app-controller.test.tspackages/cli/tests/app-env-vars.test.tspackages/cli/tests/auth-real-mode.test.tspackages/cli/tests/auth.test.tspackages/cli/tests/branch.test.tspackages/cli/tests/project-controller.test.tspackages/cli/tests/project-real-mode.test.tspackages/cli/tests/project.test.tspackages/cli/tests/version.test.ts
Summary
Review
Validation