Skip to content

Feat: Sandbox Logs#239

Merged
ben-fornefeld merged 34 commits intomainfrom
implement-sandbox-details-logs
Feb 25, 2026
Merged

Feat: Sandbox Logs#239
ben-fornefeld merged 34 commits intomainfrom
implement-sandbox-details-logs

Conversation

@ben-fornefeld
Copy link
Member

@ben-fornefeld ben-fornefeld commented Feb 11, 2026

Note

Medium Risk
Adds new server endpoints/routes and non-trivial client state/pagination logic for log streaming, which could impact correctness (missing/duplicated logs) and performance under load, but changes are scoped to logs/dashboard flows.

Overview
Adds end-to-end sandbox log viewing in the dashboard, including a new /sandboxes/{id}/logs page with virtualized scrolling, “load older” pagination, and live tailing while the sandbox is running.

Introduces a new infra endpoint spec /v2/sandboxes/{sandboxID}/logs and wires it through a new tRPC sandbox router + sandboxesRepo.getSandboxLogs, along with new DTOs and a Zustand store that tracks cursors/duplicates for forward/backward log fetching.

Refactors related dashboard chrome: sandbox detail routes now point to logs by default (and creation redirects to filesystem), sandbox header controls move into a tabs header accessory, header titles can expose a copy-to-clipboard value, and build logs reuse shared log viewer UI while improving cursor/drain behavior after builds stop.

Written by Cursor Bugbot for commit d3ca670. This will update automatically on new commits. Configure here.

- Removed redundant wrapper in SandboxDetailsHeader for SandboxDetailsTitle.
- Updated DashboardLayoutHeader to ensure consistent rendering of ThemeSwitcher.
- Refactored logs handling in VirtualizedLogsBody to utilize state for scroll container, enhancing performance and readability.
- Adjusted event listeners for scroll handling to improve responsiveness.
@vercel
Copy link

vercel bot commented Feb 11, 2026

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

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Feb 25, 2026 6:17pm
web-juliett Ready Ready Preview, Comment Feb 25, 2026 6:17pm

Request Review

direction: options.direction,
level: options.level,
// TODO: remove once template manger is deployed ~ Thu, Feb 19, 2026
source: 'persistent'
Copy link

Choose a reason for hiding this comment

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

Temporary source parameter added with already-expired TODO date

Medium Severity

The source: 'persistent' query parameter is introduced alongside a TODO comment targeting removal after Feb 19, 2026 — a date already in the past (today is Feb 25). This temporary code was committed with an already-expired removal deadline, making it easy to forget. If the template manager is already deployed, this parameter may no longer be needed.

Fix in Cursor Fix in Web

@ben-fornefeld ben-fornefeld merged commit f9bb1dd into main Feb 25, 2026
8 checks passed
@ben-fornefeld ben-fornefeld deleted the implement-sandbox-details-logs branch February 25, 2026 18:31
Copy link

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

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

SANDBOX_FILESYSTEM: (teamIdOrSlug: string, sandboxId: string) =>
`/dashboard/${teamIdOrSlug}/sandboxes/${sandboxId}/filesystem`,
SANDBOX_LOGS: (teamIdOrSlug: string, sandboxId: string) =>
`/dashboard/${teamIdOrSlug}/sandboxes/${sandboxId}/logs`,
Copy link

Choose a reason for hiding this comment

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

SANDBOX_LOGS URL helper defined but never used

Low Severity

PROTECTED_URLS.SANDBOX_LOGS is newly defined but never imported or referenced anywhere in the codebase. It's also functionally identical to PROTECTED_URLS.SANDBOX, which generates the exact same /logs path and is the one actually used throughout the app (in table-row.tsx, route.ts, and tests).

Fix in Cursor Fix in Web

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants