Extract control plane API client wrapper to @vectorless/control-plane#3
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reviewer's GuideExtracts the control plane HTTP client from the web app into a new shared @vectorless/control-plane package and re-exports it from the existing web lib entrypoint so existing imports keep working. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe control-plane HTTP client, ChangesControl-plane package extraction
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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.
Hey - I've left some high level feedback:
- Consider exporting the
CallOptionstype so downstream callers ofcontrolPlaneServiceCall/controlPlaneUserCallcan reuse the same options shape instead of re-declaring it. - Now that this lives in a shared package, you may want to make the base URL and service token configurable (e.g., via a factory or parameters) rather than reading
process.envdirectly, to make the client easier to reuse in non-Node/non-Next runtimes and in tests.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider exporting the `CallOptions` type so downstream callers of `controlPlaneServiceCall` / `controlPlaneUserCall` can reuse the same options shape instead of re-declaring it.
- Now that this lives in a shared package, you may want to make the base URL and service token configurable (e.g., via a factory or parameters) rather than reading `process.env` directly, to make the client easier to reuse in non-Node/non-Next runtimes and in tests.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Extracts the backend control plane HTTP client code from apps/web/lib/control-plane.ts into a new shared workspace package @vectorless/control-plane under packages/control-plane. Exposes it in apps/web/lib/control-plane.ts via a re-export to ensure no other imports break.
Closes HAL-330
Summary by Sourcery
Extract control-plane HTTP client into a shared workspace package and re-export it from the web app to preserve existing imports.
Enhancements:
Summary by CodeRabbit