Skip to content

feat: template details page#351

Open
drankou wants to merge 94 commits into
mainfrom
template-dashboard-enhancements-versioning-and-storage-usage-eng-3771
Open

feat: template details page#351
drankou wants to merge 94 commits into
mainfrom
template-dashboard-enhancements-versioning-and-storage-usage-eng-3771

Conversation

@drankou

@drankou drankou commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Add template detail page with Overview, Builds, and Tags tabs.

Changes:

  • Overview tab: latest build, specs, envd version, visibility, started-sandboxes count.
  • Tags tab: assign, reassign, and rollback against any build, with a searchable build picker and tag history view.
  • Builds tab: server-side search and status filtering per template.

Other UI fixes:

  • Set caret color to accent
  • Fix dialog title styling clashing with heading styles
  • Dialog paddings and close button position
  • Clipped ID cell value in builds list

@linear-code

linear-code Bot commented Jun 2, 2026

Copy link
Copy Markdown

ENG-3771

@cla-bot cla-bot Bot added the cla-signed label Jun 2, 2026
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Jun 9, 2026 2:32pm
web-juliett Ready Ready Preview, Comment Jun 9, 2026 2:32pm

Request Review

@drankou drankou force-pushed the template-dashboard-enhancements-versioning-and-storage-usage-eng-3771 branch from 4e0926b to 53bf652 Compare June 2, 2026 12:38
@drankou drankou force-pushed the template-dashboard-enhancements-versioning-and-storage-usage-eng-3771 branch from ca9b9d0 to d2d5b04 Compare June 2, 2026 13:14
@drankou drankou force-pushed the template-dashboard-enhancements-versioning-and-storage-usage-eng-3771 branch from 17112e2 to 422cd2b Compare June 2, 2026 14:26
@drankou drankou marked this pull request as ready for review June 2, 2026 15:24
@drankou drankou requested a review from ben-fornefeld as a code owner June 2, 2026 15:24

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

Copy link
Copy Markdown

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.

Reviewed commit: 478a8fe671

ℹ️ 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".

Comment thread src/core/modules/templates/repository.server.ts Outdated
Comment thread src/features/dashboard/templates/tags/reassign-dialog.tsx
Comment thread src/features/dashboard/templates/detail/visibility-dropdown.tsx
Comment thread src/configs/urls.ts Outdated
Comment on lines 14 to 19
| 'names'
| 'createdAt'
| 'updatedAt'
| 'createdBy'
| 'lastSpawnedAt'
| 'spawnCount'
| 'buildCount'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟣 Pre-existing nit cleanup: createDefaultTemplatesRepository.getDefaultTemplatesCached in src/core/modules/templates/repository.server.ts still assigns createdBy: null on each mapped DefaultTemplate, even though this PR removed createdBy from the Template Pick (models.ts) and from every mock entry (mock-data.ts). It's dead — no compile error, no consumer reads it — but the assignment should be dropped to finish the cleanup the PR started.

Extended reasoning...

What the issue is. This PR removes createdBy from the Pick<> in src/core/modules/templates/models.ts (lines 14–19 in the diff) and removes createdBy: … / createdBy: null entries from every mock template in src/configs/mock-data.ts. However, the matching mapping in createDefaultTemplatesRepository.getDefaultTemplatesCached (around src/core/modules/templates/repository.server.ts:585) was not touched and still does createdBy: null inside its .map(...) callback when building templates: DefaultTemplate[].\n\nWhy this is not a build break. The original report hypothesized a TypeScript excess-property error, and a verifier confirmed via bunx tsc --noEmit that no such error fires. The literal flows through generic inference into the callback's return type U, the resulting U[] is then structurally assignable to DefaultTemplate[] (extra properties are fine for subtyping at the array level, and excess-property freshness doesn't apply once the literal has been inferred through a generic). Vercel's "Ready" deployment status is consistent with that. So the original "build break" framing is incorrect — I'm filing this corrected.\n\nWhat the actual impact is. Each returned DefaultTemplate object carries a createdBy: null property that the type system no longer surfaces and no consumer reads. The OpenAPI DefaultTemplate response shape doesn't include it, and the dashboard renders templates from the typed shape, so there is zero behavioral effect at runtime. This is dead/stale code, not a bug that affects users — which is why I'm marking it pre-existing/nit rather than normal.\n\nStep-by-step proof.\n1. Template in models.ts (post-PR) is Pick<…, 'templateID' | 'buildID' | … | 'updatedAt' | 'lastSpawnedAt' | …> — no createdBy.\n2. DefaultTemplate = Template & { isDefault: true; defaultDescription?: string } — also no createdBy.\n3. In repository.server.ts, the mapped object literal still includes createdBy: null, between updatedAt: t.createdAt, and lastSpawnedAt: t.createdAt,.\n4. TS narrows the callback return to the literal's shape, then unifies into U[] and finally checks U[] assignability against DefaultTemplate[] — that check accepts extra properties (no fresh-literal excess-property check applies post-inference), so the file compiles cleanly.\n5. At runtime, every entry of templates carries an untyped createdBy: null property. Nothing in the dashboard reads it, so it just sits there.\n\nHow to fix it. Drop the createdBy: null, line in the .map callback alongside the matching removals in models.ts and mock-data.ts. That completes the cleanup with no behavior change.

@drankou drankou force-pushed the template-dashboard-enhancements-versioning-and-storage-usage-eng-3771 branch from a5b893f to 8c2ca01 Compare June 9, 2026 14:29
@drankou drankou requested a review from huv1k as a code owner June 9, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant