Pass sandbox management auth from server#358
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Sandbox terminal and filesystem inspect no longer call Supabase AuthUser lives in Reviewed by Cursor Bugbot for commit 2a747ca. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b18de9a12a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR refactors dashboard sandbox SDK usage so that sandbox-management authentication (Supabase token + team header + user id) is provided by server-rendered routes and then passed into client-side helpers/components, instead of being fetched from the browser Supabase client at call time.
Changes:
- Introduces a
SandboxManagementAuthshape and threads it through terminal and sandbox-inspect client code. - Removes browser Supabase session lookups from terminal sandbox session logic and inspect connection logic.
- Updates the terminal and filesystem inspect server pages to construct and pass sandbox-management auth headers from the server.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/dashboard-terminal.test.ts | Updates unit tests to pass sandboxManagementAuth instead of mocking browser Supabase session lookups. |
| src/features/dashboard/terminal/sandbox-session.ts | Refactors terminal sandbox open/connect/create to use provided sandboxManagementAuth headers/userId. |
| src/features/dashboard/terminal/dashboard-terminal.tsx | Updates terminal component API to accept and forward sandboxManagementAuth. |
| src/features/dashboard/sandbox/sandbox-management-auth.ts | Adds shared SandboxManagementAuth interface. |
| src/features/dashboard/sandbox/inspect/view.tsx | Threads sandboxManagementAuth into the inspect provider. |
| src/features/dashboard/sandbox/inspect/context.tsx | Uses provided headers for Sandbox.connect instead of fetching browser session. |
| src/app/dashboard/terminal/page.tsx | Constructs sandboxManagementAuth server-side and passes into the terminal client component. |
| src/app/dashboard/[teamSlug]/sandboxes/[sandboxId]/filesystem/page.tsx | Fetches auth context + team id server-side and passes sandboxManagementAuth into sandbox inspect view. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b18de9a to
92926d6
Compare
92926d6 to
94193ff
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 94193ff. Configure here.
94193ff to
fcb8dc9
Compare
fcb8dc9 to
62da057
Compare
62da057 to
2a747ca
Compare

Summary
Boundary check