Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThis PR introduces a new public export subpath Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ 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 |
Greptile OverviewGreptile SummaryFixes import path for Convex integration by creating a dedicated
This change ensures the Convex integration can be imported without pulling in unnecessary dependencies from the main package. Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant App as Convex App
participant Stack as Stack Package
participant Convex as Convex Auth
Note over Dev,Convex: Before: Import from main package
Dev->>App: import { getConvexProvidersConfig } from "@stackframe/stack"
App->>Stack: Load entire package (with unnecessary deps)
Stack->>App: Return getConvexProvidersConfig + all exports
App->>Convex: Configure auth with providers config
Note over Dev,Convex: After: Import from dedicated /convex path
Dev->>App: import { getConvexProvidersConfig } from "@stackframe/stack/convex"
App->>Stack: Load only convex integration module
Stack->>App: Return getConvexProvidersConfig (tree-shaken)
App->>Convex: Configure auth with providers config
|
There was a problem hiding this comment.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
examples/convex/convex/auth.config.ts(1 hunks)packages/js/package.json(1 hunks)packages/react/package.json(1 hunks)packages/stack/package.json(1 hunks)packages/template/package-template.json(1 hunks)packages/template/package.json(1 hunks)packages/template/src/index.ts(0 hunks)packages/template/src/integrations/convex/component/README.md(1 hunks)packages/template/tsup.config.ts(1 hunks)
💤 Files with no reviewable changes (1)
- packages/template/src/index.ts
🧰 Additional context used
📓 Path-based instructions (2)
packages/{stack,js}/**
📄 CodeRabbit inference engine (AGENTS.md)
Never update packages/stack or packages/js directly; update packages/template instead as the others are copies of that package
Files:
packages/stack/package.jsonpackages/js/package.json
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Ensure code passespnpm typecheckfor TypeScript type validation
Never usetoastfor blocking alerts and errors; use alerts instead as they are more visible to users
Keep hover/click transitions snappy and fast; apply transitions after the action (e.g., smooth fade-out on hover end) rather than delaying actions with pre-transitions to avoid sluggish UI
Never use try-catch-all, never void a promise, never use .catch(console.error) or similar; userunAsynchronouslyorrunAsynchronouslyWithAlertfor error handling instead of try-catch blocks
Use loading indicators instead of try-catch blocks for asynchronous UI operations; button components like support async callbacks with built-in loading state
Use ES6 maps instead of records wherever possible
Files:
packages/template/tsup.config.tsexamples/convex/convex/auth.config.ts
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: stack-auth/stack-auth PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T02:09:03.104Z
Learning: Applies to packages/stack-shared/src/config/** : When making backwards-incompatible changes to the config schema, update the migration functions in `packages/stack-shared/src/config/schema.ts`
Learnt from: CR
Repo: stack-auth/stack-auth PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T02:09:03.104Z
Learning: Applies to packages/{stack,js}/** : Never update packages/stack or packages/js directly; update packages/template instead as the others are copies of that package
📚 Learning: 2025-11-25T02:09:03.104Z
Learnt from: CR
Repo: stack-auth/stack-auth PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T02:09:03.104Z
Learning: Applies to **/apps-{frontend,config}.{ts,tsx} : To update available apps, edit `apps-frontend.tsx` and `apps-config.ts`
Applied to files:
packages/template/src/integrations/convex/component/README.md
📚 Learning: 2025-11-25T02:09:03.104Z
Learnt from: CR
Repo: stack-auth/stack-auth PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T02:09:03.104Z
Learning: Applies to packages/stack-shared/src/config/** : When making backwards-incompatible changes to the config schema, update the migration functions in `packages/stack-shared/src/config/schema.ts`
Applied to files:
packages/template/tsup.config.tsexamples/convex/convex/auth.config.ts
🧬 Code graph analysis (1)
packages/template/tsup.config.ts (1)
configs/tsup/js-library.ts (1)
createJsLibraryTsupConfig(33-64)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: Vercel Agent Review
- GitHub Check: restart-dev-and-test-with-custom-base-port
- GitHub Check: check_prisma_migrations (22.x)
- GitHub Check: setup-tests
- GitHub Check: build (22.x)
- GitHub Check: lint_and_build (latest)
- GitHub Check: docker
- GitHub Check: build (22.x)
- GitHub Check: restart-dev-and-test
- GitHub Check: all-good
- GitHub Check: build (22.x)
🔇 Additional comments (5)
examples/convex/convex/auth.config.ts (1)
1-1: LGTM: Import path updated to use dedicated convex export.The import path change from
@stackframe/stackto@stackframe/stack/convexcorrectly aligns with the new dedicated export path being introduced across the Stack packages.packages/template/src/integrations/convex/component/README.md (1)
20-22: LGTM: Documentation updated to reflect new convex-specific import paths.The code examples correctly demonstrate importing from the new dedicated
/convexexport path for each package variant.packages/template/package-template.json (1)
36-45: LGTM: Correct file for template changes.This is the proper source file to edit. The new "./convex" export entry is correctly structured and will be propagated to all generated package.json files when the template generation script runs.
Ensure that you run the template generation script to update
packages/template/package.json,packages/js/package.json,packages/stack/package.json, andpackages/react/package.jsonfrom this template, or remove the manual edits from those files if they were added by mistake.packages/template/tsup.config.ts (1)
3-7: Barrel file exists and exports are correct.The file
packages/template/src/integrations/convex.tsexists and properly exportsgetConvexProvidersConfig()with appropriate TypeScript typing. The tsup configuration correctly references this barrel file, and the integration setup is valid.packages/template/package.json (1)
27-36: Critical: Do not edit auto-generated files directly.This file has a comment at line 2 stating "THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY". According to the coding guidelines, you should only edit
packages/template/package-template.jsonand then run the generation script to update this file and others.Based on coding guidelines, the correct approach is:
- Make changes only to
packages/template/package-template.json- Run the template generation script
- The script will automatically update
packages/template/package.json,packages/js/package.json,packages/stack/package.json, andpackages/react/package.jsonDirect edits to this file will be overwritten on the next generation run.
⛔ Skipped due to learnings
Learnt from: CR Repo: stack-auth/stack-auth PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-11-25T02:09:03.104Z Learning: Applies to packages/{stack,js}/** : Never update packages/stack or packages/js directly; update packages/template instead as the others are copies of that packageLearnt from: CR Repo: stack-auth/stack-auth PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-11-25T02:09:03.104Z Learning: Applies to **/apps-{frontend,config}.{ts,tsx} : To update available apps, edit `apps-frontend.tsx` and `apps-config.ts`Learnt from: CR Repo: stack-auth/stack-auth PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-11-25T02:09:03.104Z Learning: Applies to packages/stack-shared/src/config/** : When making backwards-incompatible changes to the config schema, update the migration functions in `packages/stack-shared/src/config/schema.ts`
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
packages/js/package.json (1)
26-35: Critical: Do not edit auto-generated files directly.Per the coding guidelines, packages/js should never be updated directly. This file is auto-generated from the template package.
Instead, make these changes in
packages/template/package-template.jsonand run the package generation script to propagate them automatically.Based on coding guidelines: "Never update packages/stack or packages/js directly; update packages/template instead as the others are copies of that package"
packages/react/package.json (1)
26-35: Critical: Do not edit auto-generated files directly.This file is auto-generated from the template package and should not be modified directly. The same guideline applies here as with packages/js.
Make changes only in
packages/template/package-template.json, then run the generation script to propagate them to this file.Based on coding guidelines for template-generated packages.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
examples/convex/convex/auth.config.ts(1 hunks)packages/js/package.json(1 hunks)packages/react/package.json(1 hunks)packages/stack/package.json(1 hunks)packages/template/package-template.json(1 hunks)packages/template/package.json(1 hunks)packages/template/src/integrations/convex/component/README.md(1 hunks)packages/template/src/lib/stack-app/apps/implementations/server-app-impl.ts(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/stack/package.json
- packages/template/package-template.json
🧰 Additional context used
📓 Path-based instructions (2)
packages/{stack,js}/**
📄 CodeRabbit inference engine (AGENTS.md)
Never update packages/stack or packages/js directly; update packages/template instead as the others are copies of that package
Files:
packages/js/package.json
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Ensure code passespnpm typecheckfor TypeScript type validation
Never usetoastfor blocking alerts and errors; use alerts instead as they are more visible to users
Keep hover/click transitions snappy and fast; apply transitions after the action (e.g., smooth fade-out on hover end) rather than delaying actions with pre-transitions to avoid sluggish UI
Never use try-catch-all, never void a promise, never use .catch(console.error) or similar; userunAsynchronouslyorrunAsynchronouslyWithAlertfor error handling instead of try-catch blocks
Use loading indicators instead of try-catch blocks for asynchronous UI operations; button components like support async callbacks with built-in loading state
Use ES6 maps instead of records wherever possible
Files:
packages/template/src/lib/stack-app/apps/implementations/server-app-impl.tsexamples/convex/convex/auth.config.ts
🧠 Learnings (4)
📚 Learning: 2025-11-25T02:09:03.104Z
Learnt from: CR
Repo: stack-auth/stack-auth PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T02:09:03.104Z
Learning: Applies to **/apps-{frontend,config}.{ts,tsx} : To update available apps, edit `apps-frontend.tsx` and `apps-config.ts`
Applied to files:
packages/template/src/integrations/convex/component/README.md
📚 Learning: 2025-11-25T02:09:03.104Z
Learnt from: CR
Repo: stack-auth/stack-auth PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T02:09:03.104Z
Learning: Applies to packages/{stack,js}/** : Never update packages/stack or packages/js directly; update packages/template instead as the others are copies of that package
Applied to files:
packages/js/package.json
📚 Learning: 2025-10-11T04:13:19.308Z
Learnt from: N2D4
Repo: stack-auth/stack-auth PR: 943
File: examples/convex/app/action/page.tsx:23-28
Timestamp: 2025-10-11T04:13:19.308Z
Learning: In the stack-auth codebase, use `runAsynchronouslyWithAlert` from `stackframe/stack-shared/dist/utils/promises` for async button click handlers and form submissions instead of manual try/catch blocks. This utility automatically handles errors and shows alerts to users.
Applied to files:
packages/template/src/lib/stack-app/apps/implementations/server-app-impl.ts
📚 Learning: 2025-11-25T02:09:03.104Z
Learnt from: CR
Repo: stack-auth/stack-auth PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T02:09:03.104Z
Learning: Applies to packages/stack-shared/src/config/** : When making backwards-incompatible changes to the config schema, update the migration functions in `packages/stack-shared/src/config/schema.ts`
Applied to files:
examples/convex/convex/auth.config.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: Vercel Agent Review
- GitHub Check: restart-dev-and-test-with-custom-base-port
- GitHub Check: restart-dev-and-test
- GitHub Check: setup-tests
- GitHub Check: lint_and_build (latest)
- GitHub Check: build (22.x)
- GitHub Check: all-good
- GitHub Check: docker
- GitHub Check: build (22.x)
- GitHub Check: check_prisma_migrations (22.x)
- GitHub Check: build (22.x)
🔇 Additional comments (3)
packages/template/src/integrations/convex/component/README.md (1)
20-22: LGTM! Documentation correctly reflects the new convex-auth.config subpath.The updated import examples align with the new export structure and address the previous feedback requesting this naming convention.
packages/template/src/lib/stack-app/apps/implementations/server-app-impl.ts (1)
16-16: LGTM! Static imports improve build-time optimization.Converting from dynamic to static imports for
captureError,startRegistration, andWebAuthnErrorenables better tree-shaking and type checking without changing runtime behavior.Also applies to: 38-38
examples/convex/convex/auth.config.ts (1)
1-1: LGTM! Import now uses the requested convex-auth.config subpath.This change directly addresses the previous feedback to make the import path explicit for auth-specific configuration.
Summary by CodeRabbit
New Features
./convex-auth.configexport path for Convex authentication configuration across all packages.Documentation
✏️ Tip: You can customize this high-level summary in your review settings.