make publishable client keys truly optional ig (i hope)#1274
Conversation
- Revised descriptions in `stack-app.mdx`, `setup.mdx`, and `setup-instructions.md` to specify that the publishable client key is optional and only required if the project is configured to use it. - Adjusted instructions in `init-prompt.ts` to reflect the conditional nature of the publishable client key based on project settings. - Enhanced clarity in setup instructions for users regarding environment variable configurations.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughDocumentation updates clarify that the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Pull request overview
Updates CLI-generated setup instructions and documentation to reflect that publishableClientKey / *_STACK_PUBLISHABLE_CLIENT_KEY should be optional unless a project is configured to require publishable client keys.
Changes:
- Adjusts Stack CLI init prompt text to describe
publishableClientKeyas conditional. - Updates multiple docs pages/instructions to mark publishable client keys as optional depending on project configuration.
- Updates
pnpm-lock.yaml(adds a new importer and bumps some transitive deps such asminimatch).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Lockfile updates; introduces a new workspace importer entry and updates transitive dependency versions. |
| packages/stack-cli/src/lib/init-prompt.ts | Updates CLI init prompt guidance around when to provide publishableClientKey. |
| docs/src/app/api/internal/[transport]/setup-instructions.md | Updates internal setup workflow text/code samples to treat publishable client key as conditional. |
| docs/content/docs/(guides)/getting-started/setup.mdx | Updates getting-started prose to describe publishable client keys as optional depending on project configuration. |
| docs/content/docs/(guides)/concepts/stack-app.mdx | Updates conceptual docs to clarify publishable client key is only required for projects configured to require it. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/stack-cli/src/lib/init-prompt.ts`:
- Around line 47-49: Update the Vite example in the comment block that currently
shows "projectId: import.meta.env.VITE_STACK_PROJECT_ID," and
"publishableClientKey: import.meta.env.VITE_STACK_PUBLISHABLE_CLIENT_KEY," so
the publishableClientKey is presented conditionally (not shown as always
required); modify the Vite snippet in the "Other frameworks" comment near the
existing Vite lines so that publishableClientKey is either commented out or
annotated with a conditional note (matching the earlier sentence that says it's
only needed conditionally) to avoid implying it's required by default.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a8eb72df-d048-491b-8c22-16c73e397b93
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
docs/content/docs/(guides)/concepts/stack-app.mdxdocs/content/docs/(guides)/getting-started/setup.mdxdocs/src/app/api/internal/[transport]/setup-instructions.mdpackages/stack-cli/src/lib/init-prompt.ts
Greptile SummaryThis PR updates setup documentation and CLI prompt templates to reflect that the publishable client key (
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Start StackClientApp setup] --> B{Project configured to\nrequire publishable\nclient keys?}
B -- Yes --> C[Include publishableClientKey\nin constructor / env var]
B -- No --> D[Omit publishableClientKey\nentirely]
C --> E[StackClientApp initialised]
D --> E
E --> F{Framework?}
F -- Next.js --> G[Auto-detect from\nNEXT_PUBLIC_ env vars\nno explicit config needed]
F -- Other e.g. Vite --> H[Pass projectId explicitly\ne.g. import.meta.env.VITE_STACK_PROJECT_ID]
G --> I[Ready]
H --> I
Last reviewed commit: "Merge branch 'dev' i..." |
|
@greptile-ai review |
… resolutions for balanced-match, brace-expansion, and minimatch. Adjusted minimatch version in dependencies to 10.1.1.
Summary by CodeRabbit
Documentation