Skip to content

Feat/ez terminal#321

Open
matthewlouisbrockman wants to merge 14 commits into
mainfrom
feat/ez-terminal
Open

Feat/ez terminal#321
matthewlouisbrockman wants to merge 14 commits into
mainfrom
feat/ez-terminal

Conversation

@matthewlouisbrockman
Copy link
Copy Markdown
Contributor

@matthewlouisbrockman matthewlouisbrockman commented May 10, 2026

adds a standalone terminal that starts and reconnects to a sandbox at /dashboard/terminal

currently just creates or connects to a sandbox with the passed in params. not linking it externally, but lets us re-use it for the dashboard specific terminal use as well as play with it in other use cases

Screenshot 2026-05-10 at 3 01 46 PM

go to /dashboard/terminal to have it spawn one for you.

note: this doesn't handle new user sign up. keeping it minimal for now.

@cla-bot cla-bot Bot added the cla-signed label May 10, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

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

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment May 10, 2026 10:08pm
web-juliett Ready Ready Preview, Comment May 10, 2026 10:08pm

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented May 10, 2026

PR Summary

Medium Risk
Adds a new /dashboard/terminal flow that creates/connects to sandboxes from the browser and relaxes auth redirects for that route, which could impact access control and sandbox ownership if misconfigured.

Overview
Adds a new /dashboard/terminal page/layout that can start or reconnect to an E2B sandbox and attach an in-browser PTY using @xterm/xterm, with support for template, sandboxId, and optional command query params.

Implements client-side terminal session management: template validation, resize-aware xterm sizing, transcript/copy support, a confirmation dialog before running URL-provided commands, and localStorage-based reuse of the last sandbox per user/template.

Updates the proxy auth redirect to allow unauthenticated access to /dashboard/terminal (and trailing slash) while keeping other dashboard routes protected, adds tests for the exception, and tightens a Supabase SSR cookie typing annotation.

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

Comment thread src/app/layout.tsx Outdated
Comment thread src/features/dashboard/terminal/terminal-panel.tsx Outdated
Comment thread src/features/dashboard/terminal/terminal-panel.tsx Outdated
Comment thread src/features/dashboard/terminal/dashboard-terminal.tsx Outdated
@matthewlouisbrockman matthewlouisbrockman marked this pull request as ready for review May 10, 2026 21:57
Copilot AI review requested due to automatic review settings May 10, 2026 21:57
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization has reached its monthly code review spending cap.

An organization admin can view or raise the cap at claude.ai/admin-settings/claude-code. The cap resets at the start of the next billing period.

Once the cap resets or is raised, reopen this pull request to trigger a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a standalone dashboard terminal experience at /dashboard/terminal that can start or reconnect to an E2B sandbox, including template handling, local session persistence, and a command-confirmation flow.

Changes:

  • Introduces a new /dashboard/terminal route with server-side team/template resolution and an unauthenticated sign-in prompt.
  • Implements a client-side terminal UI using @xterm/xterm, including resize logic, sandbox lifecycle management, and command-confirmation before sending URL-provided commands.
  • Updates middleware auth redirect logic to exempt /dashboard/terminal, and adds unit/integration coverage for the new behavior.

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/unit/dashboard-terminal.test.ts Adds unit tests for template normalization, localStorage session handling, sizing calculations, and sandbox open/reuse behavior.
tests/integration/proxy.test.ts Ensures unauthenticated users are not redirected away from /dashboard/terminal.
src/features/dashboard/terminal/types.ts Adds terminal-related types (status, storage session shape, launch options).
src/features/dashboard/terminal/terminal-size.ts Implements terminal sizing based on container size and measured xterm cell dimensions.
src/features/dashboard/terminal/terminal-panel.tsx Adds the terminal header UI (template/sandbox ID display + copy/refresh actions).
src/features/dashboard/terminal/template.ts Adds template normalization + override resolution with basic input hardening.
src/features/dashboard/terminal/storage.ts Adds localStorage persistence for per-user sandbox session info.
src/features/dashboard/terminal/sandbox-session.ts Adds logic to connect/create sandboxes and reuse stored sessions when compatible.
src/features/dashboard/terminal/dashboard-terminal.tsx Implements the xterm-based terminal client, PTY wiring, command queueing, and URL synchronization.
src/features/dashboard/terminal/dashboard-terminal-command-dialog.tsx Adds a confirmation dialog before running commands sourced from URL params.
src/features/dashboard/terminal/constants.ts Centralizes terminal constants (timeouts, defaults, storage prefix).
src/features/dashboard/layouts/header.tsx Minor layout adjustment (adds gap in header client-only area).
src/core/server/http/proxy.ts Updates auth redirect logic to allow /dashboard/terminal without authentication.
src/core/server/api/middlewares/auth.ts Tightens typing for Supabase cookie setAll integration.
src/app/dashboard/terminal/page.tsx Adds the server route for terminal, including auth/team/template checks and sign-in/unavailable states.
src/app/dashboard/terminal/layout.tsx Adds a layout importing xterm CSS for the terminal route segment.
package.json Adds @xterm/xterm dependency.
bun.lock Locks @xterm/xterm dependency version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/features/dashboard/terminal/storage.ts Outdated
Comment thread src/core/server/http/proxy.ts
Comment thread src/features/dashboard/terminal/dashboard-terminal.tsx
Comment thread src/features/dashboard/terminal/dashboard-terminal.tsx Outdated
Comment thread src/app/dashboard/terminal/page.tsx Outdated
Copy link
Copy Markdown

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

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: fe70042bf8

ℹ️ 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/features/dashboard/terminal/storage.ts Outdated
Comment thread src/features/dashboard/terminal/template.ts Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8cf74ca. Configure here.

Comment thread src/app/dashboard/terminal/page.tsx
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