Commit b2659f1
authored
Feature: Template build details page (#204)
<!-- CURSOR_SUMMARY -->
> [!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`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1c4739e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent b9f668d commit b2659f1
File tree
35 files changed
+3054
-274
lines changed- spec
- src
- app/dashboard/[teamIdOrSlug]
- templates/[templateId]/builds/[buildId]
- configs
- features/dashboard
- build
- layouts
- sandbox/header
- templates/builds
- lib/utils
- server/api
- models
- repositories
- routers
- trpc
- types
- ui
- primitives
35 files changed
+3054
-274
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
940 | 941 | | |
941 | 942 | | |
942 | 943 | | |
| 944 | + | |
| 945 | + | |
943 | 946 | | |
944 | 947 | | |
| 948 | + | |
| 949 | + | |
945 | 950 | | |
946 | 951 | | |
947 | 952 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
0 commit comments