Skip to content

Conversation

@ben-fornefeld
Copy link
Member

@ben-fornefeld ben-fornefeld commented Dec 4, 2025

Note

Adds a new template build details page with live, filterable logs and status; updates API spec and server to fetch build info/logs; improves layout/breadcrumbs and links from builds table; enables React Query Devtools.

  • Dashboard UI:
    • Build Details Page: New route dashboard/[team]/templates/[template]/builds/[build] with header (status, timings, template link) and virtualized, filterable logs (back/forward pagination, auto-scroll).
    • Builds Table: Clickable rows navigate to build details; adjusted columns (ID moved, compact ID display, reason styling), duration/started cells tweaked.
    • Shared Components: Added CopyButtonInline, DetailsRow/DetailsItem, loading re-export for the build page.
    • Layout/Header: Breadcrumb-style titles via TitleSegment; config now functions per-path; sidebar active match widened; added PROTECTED_URLS.TEMPLATE_BUILD.
  • Server (tRPC):
    • New queries: buildDetails, buildLogsBackwards, buildLogsForward using infra client; build DTOs for details/logs; retention check; mapping helpers.
    • Repository: functions to get build info/status/logs from infra; existing list/running status unchanged.
  • OpenAPI/Types:
    • Added pagination params, logs types (LogsDirection, LogsSource, TemplateBuildLogsResponse), template/build models, MachineInfo, SandboxNetworkConfig, Mcp.
    • New/updated endpoints: POST /sandboxes/{id}/connect, GET /templates/{id} (with builds), GET /templates/{id}/builds/{id}/logs, POST /v3/templates; marked several legacy endpoints deprecated.
    • Generated infra-api.types updated accordingly; types/api.types narrows Template fields.
  • Client/Infra:
    • Export useTRPCClient; enable @tanstack/react-query-devtools.
  • Misc:
    • Formatting util formatDurationCompact supports decimal seconds.
    • Sandbox header refactored to use shared DetailsRow.

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

@linear
Copy link

linear bot commented Dec 4, 2025

@vercel
Copy link

vercel bot commented Dec 4, 2025

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

Project Deployment Review Updated (UTC)
web Ready Ready Preview, Comment Dec 18, 2025 11:51am
web-juliett Ready Ready Preview, Comment Dec 18, 2025 11:51am

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- Removed `clientSegmentCache` from Next.js configuration.
- Updated `StatusBanner` in `BuildHeader` to use dynamic status and message from `buildDetails`.
- Added new imports for additional table cells in the builds table component.
- Enhanced `formatDurationCompact` function to improve decimal second formatting.
- Modified `getBuildInfo` query to include `team_id` in the selection and filtering.

These changes improve the clarity and functionality of the dashboard components and enhance data handling in the builds repository.
code: 'NOT_FOUND',
message: "Build not found or you don't have access to it",
})
}
Copy link

Choose a reason for hiding this comment

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

Bug: Database errors incorrectly reported as NOT_FOUND

The getBuildInfo function throws a NOT_FOUND TRPCError for any Supabase error, including network failures, database errors, and permission issues. This masks real errors as 404s, making debugging difficult and showing users misleading "not found" messages when there are actual server problems. The other functions in this file (getInfraBuildStatus, getInfraBuildLogs) correctly differentiate 404 errors from other errors using apiError(status) for non-404 cases, but getBuildInfo lacks this distinction.

Fix in Cursor Fix in Web

@ben-fornefeld ben-fornefeld merged commit b2659f1 into main Dec 18, 2025
6 checks passed
@ben-fornefeld ben-fornefeld deleted the implement-template-build-details-page-eng-3335 branch December 18, 2025 14:29
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.

3 participants