Feat/ez terminal#321
Conversation
This reverts commit be3d80e.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview 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 Reviewed by Cursor Bugbot for commit 8cf74ca. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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/terminalroute 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.
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.

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