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
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| `/dashboard/${teamIdOrSlug}/sandboxes/${sandboxId}`, | ||
| SANDBOX_INSPECT: (teamIdOrSlug: string, sandboxId: string) => | ||
| `/dashboard/${teamIdOrSlug}/sandboxes/${sandboxId}/inspect`, | ||
| `/dashboard/${teamIdOrSlug}/sandboxes/${sandboxId}/logs`, |
There was a problem hiding this comment.
| } | ||
|
|
||
| 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.


Note
Medium Risk
Introduces new infra API integration and new TRPC surface for log retrieval, plus non-trivial changes to log pagination/polling that could affect ordering, duplicates, and load behavior.
Overview
Adds a new Sandbox Logs experience in the dashboard: new
/logsroute under a sandbox, new TRPCsandbox.logsBackwards/logsForwardendpoints, and a repository call to infra’s new/v2/sandboxes/{sandboxID}/logsAPI (OpenAPI + generated types updated).Reworks the sandbox details layout to use tabbed navigation (Logs and Filesystem) with header controls (refresh/kill) moved into a
DashboardTabsheader accessory; sandbox list links andsbx/newredirect are updated to point at the new default destinations.Refactors the existing build logs viewer and store to share new common log viewer UI components (
log-cells,log-viewer-ui), improves pagination de-duplication via cursor+"seen" counts, and adds a drain window to keep polling briefly after builds stop (similar logic used for sandboxes).Written by Cursor Bugbot for commit 4ad367b. This will update automatically on new commits. Configure here.