-
Notifications
You must be signed in to change notification settings - Fork 54
Feat: Sandbox Details Logs #239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
|
There was a problem hiding this 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 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| } | ||
|
|
||
| prevLogsCountRef.current = logsCount | ||
| }, [logsCount, scrollContainerElement]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double scroll adjustment when backward fetch completes
Medium Severity
Both useMaintainScrollOnPrepend and useAutoScrollToBottom independently react to logsCount changes and adjust scrollTop by the delta. When backward fetch completes (prepending older logs) while the user has scrolled back near the bottom, both hooks fire in the same render: useMaintainScrollOnPrepend correctly offsets scrollTop for the prepended items, and then useAutoScrollToBottom applies the same offset again (it doesn't distinguish prepended vs. appended logs). This results in a double scroll adjustment, jumping the viewport past the intended position.
Additional Locations (1)
| <span className="text-fg-secondary">]</span> | ||
| <span> | ||
| {isRunning | ||
| ? 'No more logs to show. Wating for new entries...' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| </TabsTrigger> | ||
| ))} | ||
| </TabsList> | ||
| )} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tab trigger rendering duplicated across conditional branches
Low Severity
The tabsWithHrefs.map(...) rendering logic producing TabsTrigger + Link elements is duplicated verbatim in both branches of the headerAccessory conditional. Only the wrapping TabsList className and parent container differ. Extracting the shared tab triggers into a variable or component would reduce duplication and the risk of inconsistent future changes.


Note
Medium Risk
Adds a new API integration and polling/pagination state for sandbox logs, which could impact performance or correctness (ordering/dedup/cursors) under load. UI/layout refactors also change routing defaults and header rendering behavior across dashboard pages.
Overview
Adds a new Sandbox Logs experience in the dashboard: a
/logsroute under sandbox details, a newLogstab alongside the renamedFilesystemtab, and a virtualized, auto-scrolling log table that supports backward pagination (scroll-up to load older entries) and forward polling while the sandbox is running.Introduces backend plumbing for logs via the new infra endpoint
/v2/sandboxes/{sandboxID}/logs(OpenAPI + generated types), a newsandboxtRPC router (logsBackwards/logsForward), and a repository/model layer mapping infraSandboxLogEntryinto a simplifiedSandboxLogDTO.Refactors sandbox details navigation and header: list rows now link to logs,
/sbx/newredirects to filesystem, header controls (refresh/kill) are moved into a newSandboxDetailsControlsaccessory rendered inDashboardTabs, and the global dashboard header can now show breadcrumb-style titles with an optional copy-to-clipboard value (e.g., sandbox/build IDs).Written by Cursor Bugbot for commit 6ad9e7e. This will update automatically on new commits. Configure here.