Skip to content

feat: send sbx/new to the terminal instead of filesystem#431

Merged
matthewlouisbrockman merged 2 commits into
mainfrom
feat/sbx-new-terminal
Jun 17, 2026
Merged

feat: send sbx/new to the terminal instead of filesystem#431
matthewlouisbrockman merged 2 commits into
mainfrom
feat/sbx-new-terminal

Conversation

@matthewlouisbrockman

Copy link
Copy Markdown
Contributor

sends the sbx/new to the terminal insteado f filesystem

@cursor

cursor Bot commented Jun 17, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Redirect and sandbox client config only; no auth or data-model changes.

Overview
The sbx/new route now passes apiUrl: process.env.NEXT_PUBLIC_INFRA_API_URL into Sandbox.create('base', …) and redirects to the sandbox terminal URL via PROTECTED_URLS.SANDBOX_TERMINAL instead of the filesystem URL.

Reviewed by Cursor Bugbot for commit 4520167. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Jun 17, 2026 8:24pm

Request Review

@matthewlouisbrockman matthewlouisbrockman merged commit 772d782 into main Jun 17, 2026
14 checks passed
@matthewlouisbrockman matthewlouisbrockman deleted the feat/sbx-new-terminal branch June 17, 2026 20:27

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/app/sbx/new/route.ts
Comment on lines 32 to 36
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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants