Conversation
Triggers the setup-sandbox background task to create a personal sandbox, provision a GitHub repo, take a snapshot, and shut down. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis pull request adds a new Changes
Sequence DiagramsequenceDiagram
participant Client
participant Route as POST Handler
participant Validate as validateSetupSandboxBody
participant Auth as validateAuthContext
participant Handler as setupSandboxHandler
participant Trigger as triggerSetupSandbox
participant TaskQueue as Trigger.dev
Client->>Route: POST /api/sandboxes/setup
Route->>Validate: validateSetupSandboxBody(request)
Validate->>Validate: Parse & validate body schema
Validate->>Auth: validateAuthContext(request, {accountId})
Auth-->>Validate: Auth context or error response
alt Auth Error
Validate-->>Route: NextResponse (error)
Route-->>Client: 401/403 Error
else Auth Success
Validate-->>Route: {accountId}
Route->>Handler: setupSandboxHandler(request)
Handler->>Validate: validateSetupSandboxBody(request)
Validate-->>Handler: {accountId}
Handler->>Trigger: triggerSetupSandbox(accountId)
Trigger->>TaskQueue: tasks.trigger("setup-sandbox", {accountId})
TaskQueue-->>Trigger: Task handle {runId}
Trigger-->>Handler: Task handle
Handler-->>Route: {status: "success", runId} + 200
Route-->>Client: 200 OK with runId
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ❌ 1❌ Failed checks (1 warning)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
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 |
Merge test branch into main
Summary by CodeRabbit