Conversation
- 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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| { cursor, limit, direction } | ||
| ) | ||
|
|
||
| const logs: SandboxLogDTO[] = sandboxLogs.logs |
src/server/api/routers/sandbox.ts
Outdated
|
|
||
| const logs: SandboxLogDTO[] = sandboxLogs.logs | ||
| .map(mapInfraSandboxLogToDTO) | ||
| .sort((a, b) => a.timestampUnix - b.timestampUnix) |
There was a problem hiding this comment.
| .sort((a, b) => a.timestampUnix - b.timestampUnix) |
| export const sandboxRouter = createTRPCRouter({ | ||
| // QUERIES | ||
|
|
||
| logsBackwards: protectedTeamProcedure |
There was a problem hiding this comment.
you should reverse outside this query
| } | ||
|
|
||
| return logs.slice(0, end) | ||
| } |
There was a problem hiding this comment.
Cursor-tracking helpers duplicated across two store files
Low Severity
countLeadingAtTimestamp, countTrailingAtTimestamp, dropLeadingAtTimestamp, and dropTrailingAtTimestamp are copy-pasted identically between sandbox-logs-store.ts and build-logs-store.ts. Both only access the timestampUnix property, so a single generic or shared implementation would work for both DTO types.
Additional Locations (1)
| <LogsTableHeader | ||
| timestampWidth={COLUMN_WIDTHS_PX.timestamp} | ||
| levelWidth={COLUMN_WIDTHS_PX.level} | ||
| /> |
There was a problem hiding this comment.
Sandbox logs header shows wrong sort direction arrow
Low Severity
The LogsTableHeader in both SandboxLogs and LogsContent omits timestampSortDirection, which defaults to 'desc' (down arrow). However, sandbox logs are displayed in ascending chronological order (oldest at top, newest at bottom), just like build logs. Build logs correctly pass timestampSortDirection="asc" — the sandbox logs views need the same to show the correct up-arrow indicator.
Additional Locations (1)
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.
| # AI agents and related files | ||
| CLAUDE.md | ||
| .agent | ||
| .cursor/ |
There was a problem hiding this comment.
Gitignore removes IDE and tooling ignore patterns
Low Severity
This commit removes .vscode/, .idea/, .cursor/, .claude/, .agents/, .codex/, .copilot/, .github/copilot/, .anthropic/, and .openai/ from .gitignore. These are standard IDE and AI-tool configuration directories. This change appears unrelated to the Sandbox Logs feature and could lead to tool configuration files being accidentally committed.


Note
Medium Risk
Touches log retrieval/pagination and polling behavior across both sandbox and build log viewers, which can impact correctness (duplicates/missing logs) and UI performance, but does not alter auth or data mutation paths.
Overview
Adds a new sandbox logs experience: introduces
GET /v2/sandboxes/{sandboxID}/logsin the infra OpenAPI, wires it through a newsandboxtRPC router + repository, and ships a new/dashboard/.../sandboxes/{id}/logspage with a virtualized, live-polling log viewer (pagination, retention messaging, and end/live status rows).Refactors build log fetching to be cursor-based without key-based deduping (tracking “seen at cursor” for forward/backward loads) and improves polling drain behavior after builds stop. Updates sandbox navigation to default to Logs (new tabbed
Logs/Filesystemlayout, newStorageIcon), moves refresh/kill controls into the tabs header accessory, and adds breadcrumb-style titles with copy-to-clipboard support for sandbox/build identifiers.Written by Cursor Bugbot for commit 470f89e. This will update automatically on new commits. Configure here.