feat: check sandbox snapshot on login, trigger setup if missing#9
Conversation
Adds useSetupSandbox hook that runs once after Privy authentication. Checks GET /api/sandboxes for existing snapshots, and if none exist, fires POST /api/sandboxes/setup in the background to provision a GitHub repo + snapshot before the user starts using the terminal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ 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 |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Matches the existing pattern in lib/recoup-api/ — uses production URL in prod and test URL otherwise. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deduplicates the env-based URL logic from three files into a single shared constant. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These are top-level fields on the GET /api/sandboxes response, not nested inside the sandboxes array. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
useSetupSandboxhook that runs once after Privy authenticationGET /api/sandboxesfor existing snapshots; if none exist, firesPOST /api/sandboxes/setupin the backgroundChanges
app/hooks/useSetupSandbox.ts— client hook for background sandbox provisioningapp/components/TerminalPage.tsx— integrates the hookTest plan
POST /api/sandboxes/setupis called🤖 Generated with Claude Code