feat: send sbx/new to the terminal instead of filesystem#431
Conversation
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit 4520167. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4520167740
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const sbx = await Sandbox.create('base', { | ||
| apiUrl: process.env.NEXT_PUBLIC_INFRA_API_URL, | ||
| domain: process.env.NEXT_PUBLIC_E2B_DOMAIN, | ||
| apiHeaders: { | ||
| ...authHeaders(authContext.accessToken, team.id), |
There was a problem hiding this comment.
Use terminal lifecycle for /sbx/new sandboxes
When a user opens /sbx/new and then leaves the redirected terminal idle until its timeout, this sandbox is still created with the SDK's default timeout lifecycle, which kills it instead of pausing it. The terminal-specific creator in src/features/dashboard/terminal/sandbox-session.ts sets lifecycle: { onTimeout: 'pause', autoResume: true }, and SandboxTerminalView has a resume flow for paused sandboxes; without the same lifecycle here, these new terminal sandboxes cannot be resumed after timing out.
Useful? React with 👍 / 👎.
sends the sbx/new to the terminal insteado f filesystem