Skip to content

feat: update templates list to namespaced names#227

Merged
ben-fornefeld merged 3 commits intomainfrom
feat/update-templates-list-to-namespaced-names
Feb 4, 2026
Merged

feat: update templates list to namespaced names#227
ben-fornefeld merged 3 commits intomainfrom
feat/update-templates-list-to-namespaced-names

Conversation

@dobrac
Copy link
Contributor

@dobrac dobrac commented Feb 2, 2026

Screenshot 2026-02-02 at 1 16 14 PM

Note

Medium Risk
Changes API contracts and generated types (new endpoints, deprecated fields) and updates the template list rendering logic, which can break clients if backend responses don’t match the new names/tagging shapes.

Overview
Updates the templates API and UI to support namespaced template names via a new names array, deprecating aliases for display and wiring default-template fetching to build names from env_aliases.namespace + alias.

Extends the OpenAPI spec with template tagging endpoints (POST/DELETE /templates/tags), a GET /templates/aliases/{alias} lookup, and a new PATCH /v2/templates/{templateID} (while deprecating the existing /templates/{templateID} patch); also updates generated types and mock data accordingly, plus shows team.slug in settings.

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

@dobrac dobrac requested a review from ben-fornefeld as a code owner February 2, 2026 12:14
@dobrac dobrac added feature and removed feature labels Feb 2, 2026
@vercel
Copy link

vercel bot commented Feb 2, 2026

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

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Feb 4, 2026 7:00pm
web-juliett Ready Ready Preview, Comment Feb 4, 2026 7:00pm

Request Review

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.

Reviewed commit: e0ba58ba3e

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

@cursor
Copy link

cursor bot commented Feb 2, 2026

Bugbot Autofix prepared fixes for 2 of the 2 bugs found in the latest run.

  • ✅ Fixed: Tooltip displays primary name instead of additional names
    • Changed tooltip logic to filter out the primary name using filter() instead of slice(1), ensuring correct display regardless of primary name position.
  • ✅ Fixed: Mock template data missing required names field causes crashes
    • Added the required names field to all templates in DEFAULT_TEMPLATES and TEMPLATES arrays in mock-data.ts to match the Template type definition.

Create PR

Or push these changes by commenting:

@cursor push b62a1789d3
Preview (b62a1789d3)
diff --git a/src/configs/mock-data.ts b/src/configs/mock-data.ts
--- a/src/configs/mock-data.ts
+++ b/src/configs/mock-data.ts
@@ -15,6 +15,7 @@
 const DEFAULT_TEMPLATES: DefaultTemplate[] = [
   {
     aliases: ['code-interpreter'],
+    names: ['code-interpreter'],
     buildID: 'build_000',
     cpuCount: 1,
     memoryMB: 1024,
@@ -36,6 +37,7 @@
   },
   {
     aliases: ['web-starter'],
+    names: ['web-starter'],
     buildID: 'build_005',
     cpuCount: 2,
     memoryMB: 2048,
@@ -54,6 +56,7 @@
   },
   {
     aliases: ['data-science'],
+    names: ['data-science'],
     buildID: 'build_006',
     cpuCount: 4,
     memoryMB: 8192,
@@ -78,6 +81,7 @@
 const TEMPLATES: Template[] = [
   {
     aliases: ['node-typescript', 'node-ts'],
+    names: ['node-typescript', 'node-ts'],
     buildID: 'build_001',
     cpuCount: 2,
     memoryMB: 2048,
@@ -97,6 +101,7 @@
   },
   {
     aliases: ['react-vite'],
+    names: ['react-vite'],
     buildID: 'build_002',
     cpuCount: 1,
     memoryMB: 1024,
@@ -113,6 +118,7 @@
   },
   {
     aliases: ['postgres', 'pg'],
+    names: ['postgres', 'pg'],
     buildID: 'build_003',
     cpuCount: 2,
     memoryMB: 4096,
@@ -129,6 +135,7 @@
   },
   {
     aliases: ['redis'],
+    names: ['redis'],
     buildID: 'build_004',
     cpuCount: 1,
     memoryMB: 2048,
@@ -145,6 +152,7 @@
   },
   {
     aliases: ['python-ml', 'ml'],
+    names: ['python-ml', 'ml'],
     buildID: 'build_005',
     cpuCount: 4,
     memoryMB: 8192,
@@ -161,6 +169,7 @@
   },
   {
     aliases: ['elastic', 'es'],
+    names: ['elastic', 'es'],
     buildID: 'build_006',
     cpuCount: 2,
     memoryMB: 4096,
@@ -177,6 +186,7 @@
   },
   {
     aliases: ['grafana'],
+    names: ['grafana'],
     buildID: 'build_007',
     cpuCount: 1,
     memoryMB: 2048,
@@ -193,6 +203,7 @@
   },
   {
     aliases: ['nginx'],
+    names: ['nginx'],
     buildID: 'build_008',
     cpuCount: 1,
     memoryMB: 1024,
@@ -209,6 +220,7 @@
   },
   {
     aliases: ['mongodb', 'mongo'],
+    names: ['mongodb', 'mongo'],
     buildID: 'build_009',
     cpuCount: 2,
     memoryMB: 4096,
@@ -225,6 +237,7 @@
   },
   {
     aliases: ['mysql'],
+    names: ['mysql'],
     buildID: 'build_010',
     envdVersion: '0.1.0',
     cpuCount: 2,
@@ -241,6 +254,7 @@
   },
   {
     aliases: ['nextjs', 'next'],
+    names: ['nextjs', 'next'],
     buildID: 'build_011',
     envdVersion: '0.1.0',
     cpuCount: 2,
@@ -260,6 +274,7 @@
   },
   {
     aliases: ['vue', 'vue3'],
+    names: ['vue', 'vue3'],
     buildID: 'build_012',
     cpuCount: 1,
     envdVersion: '0.1.0',
@@ -276,6 +291,7 @@
   },
   {
     aliases: ['django'],
+    names: ['django'],
     buildID: 'build_013',
     envdVersion: '0.1.0',
     cpuCount: 2,
@@ -295,6 +311,7 @@
   },
   {
     aliases: ['flask'],
+    names: ['flask'],
     buildID: 'build_014',
     envdVersion: '0.1.0',
     cpuCount: 1,
@@ -311,6 +328,7 @@
   },
   {
     aliases: ['golang', 'go'],
+    names: ['golang', 'go'],
     buildID: 'build_015',
     envdVersion: '0.1.0',
     cpuCount: 2,
@@ -330,6 +348,7 @@
   },
   {
     aliases: ['rust'],
+    names: ['rust'],
     buildID: 'build_016',
     cpuCount: 2,
     memoryMB: 2048,
@@ -346,6 +365,7 @@
   },
   {
     aliases: ['java-spring', 'spring'],
+    names: ['java-spring', 'spring'],
     buildID: 'build_017',
     cpuCount: 3,
     memoryMB: 4096,
@@ -365,6 +385,7 @@
   },
   {
     aliases: ['dotnet', 'csharp'],
+    names: ['dotnet', 'csharp'],
     buildID: 'build_018',
     cpuCount: 2,
     memoryMB: 3072,
@@ -381,6 +402,7 @@
   },
   {
     aliases: ['php-laravel', 'laravel'],
+    names: ['php-laravel', 'laravel'],
     buildID: 'build_019',
     cpuCount: 2,
     memoryMB: 2048,
@@ -400,6 +422,7 @@
   },
   {
     aliases: ['ruby-rails', 'rails'],
+    names: ['ruby-rails', 'rails'],
     buildID: 'build_020',
     cpuCount: 2,
     memoryMB: 2048,
@@ -416,6 +439,7 @@
   },
   {
     aliases: ['jupyter', 'notebook'],
+    names: ['jupyter', 'notebook'],
     buildID: 'build_021',
     cpuCount: 4,
     memoryMB: 6144,
@@ -435,6 +459,7 @@
   },
   {
     aliases: ['tensorflow'],
+    names: ['tensorflow'],
     buildID: 'build_022',
     cpuCount: 8,
     memoryMB: 16384,
@@ -454,6 +479,7 @@
   },
   {
     aliases: ['pytorch'],
+    names: ['pytorch'],
     buildID: 'build_023',
     cpuCount: 8,
     memoryMB: 16384,
@@ -473,6 +499,7 @@
   },
   {
     aliases: ['cassandra'],
+    names: ['cassandra'],
     buildID: 'build_024',
     cpuCount: 4,
     memoryMB: 8192,
@@ -489,6 +516,7 @@
   },
   {
     aliases: ['docker', 'dind'],
+    names: ['docker', 'dind'],
     buildID: 'build_025',
     cpuCount: 2,
     memoryMB: 4096,
@@ -508,6 +536,7 @@
   },
   {
     aliases: ['kubernetes', 'k8s'],
+    names: ['kubernetes', 'k8s'],
     buildID: 'build_026',
     cpuCount: 4,
     memoryMB: 8192,
@@ -527,6 +556,7 @@
   },
   {
     aliases: ['terraform'],
+    names: ['terraform'],
     buildID: 'build_027',
     cpuCount: 2,
     memoryMB: 2048,
@@ -543,6 +573,7 @@
   },
   {
     aliases: ['ansible'],
+    names: ['ansible'],
     buildID: 'build_028',
     cpuCount: 1,
     memoryMB: 1536,
@@ -562,6 +593,7 @@
   },
   {
     aliases: ['prometheus'],
+    names: ['prometheus'],
     buildID: 'build_029',
     cpuCount: 2,
     memoryMB: 3072,
@@ -578,6 +610,7 @@
   },
   {
     aliases: ['jenkins'],
+    names: ['jenkins'],
     buildID: 'build_030',
     cpuCount: 3,
     envdVersion: '0.1.0',
@@ -597,6 +630,7 @@
   },
   {
     aliases: ['gitlab-ci'],
+    names: ['gitlab-ci'],
     buildID: 'build_031',
     cpuCount: 2,
     envdVersion: '0.1.0',
@@ -613,6 +647,7 @@
   },
   {
     aliases: ['apache-spark', 'spark'],
+    names: ['apache-spark', 'spark'],
     buildID: 'build_032',
     cpuCount: 8,
     envdVersion: '0.1.0',
@@ -632,6 +667,7 @@
   },
   {
     aliases: ['kafka'],
+    names: ['kafka'],
     envdVersion: '0.1.0',
     buildID: 'build_033',
     cpuCount: 3,
@@ -648,6 +684,7 @@
   },
   {
     aliases: ['rabbitmq'],
+    names: ['rabbitmq'],
     buildID: 'build_034',
     cpuCount: 2,
     memoryMB: 2048,
@@ -667,6 +704,7 @@
   },
   {
     aliases: ['zookeeper'],
+    names: ['zookeeper'],
     envdVersion: '0.1.0',
     buildID: 'build_035',
     cpuCount: 1,
@@ -683,6 +721,7 @@
   },
   {
     aliases: ['solr'],
+    names: ['solr'],
     buildID: 'build_036',
     cpuCount: 2,
     memoryMB: 4096,
@@ -702,6 +741,7 @@
   },
   {
     aliases: ['logstash'],
+    names: ['logstash'],
     buildID: 'build_037',
     cpuCount: 2,
     memoryMB: 3072,
@@ -718,6 +758,7 @@
   },
   {
     aliases: ['kibana'],
+    names: ['kibana'],
     buildID: 'build_038',
     cpuCount: 1,
     memoryMB: 2048,
@@ -734,6 +775,7 @@
   },
   {
     aliases: ['minio'],
+    names: ['minio'],
     buildID: 'build_039',
     cpuCount: 2,
     memoryMB: 2048,
@@ -753,6 +795,7 @@
   },
   {
     aliases: ['vault'],
+    names: ['vault'],
     buildID: 'build_040',
     cpuCount: 1,
     envdVersion: '0.1.0',

diff --git a/src/features/dashboard/templates/list/table-cells.tsx b/src/features/dashboard/templates/list/table-cells.tsx
--- a/src/features/dashboard/templates/list/table-cells.tsx
+++ b/src/features/dashboard/templates/list/table-cells.tsx
@@ -292,7 +292,7 @@
 
   // Prefer a name without "/" as the primary display name
   const primaryName = names.find((name) => !name.includes('/')) ?? names[0]
-  const additionalCount = names.length - 1
+  const additionalNames = names.filter((name) => name !== primaryName)
 
   return (
     <div
@@ -304,16 +304,16 @@
       )}
     >
       <span>{primaryName ?? 'N/A'}</span>
-      {additionalCount > 0 && (
+      {additionalNames.length > 0 && (
         <HelpTooltip
           trigger={
             <span className="text-fg-tertiary bg-bg-muted rounded px-1.5 py-0.5 text-xs font-medium">
-              +{additionalCount}
+              +{additionalNames.length}
             </span>
           }
         >
           <div className="flex flex-col gap-1">
-            {names.slice(1).map((name) => (
+            {additionalNames.map((name) => (
               <span key={name} className="font-mono text-xs">
                 {name}
               </span>

@dobrac dobrac force-pushed the feat/update-templates-list-to-namespaced-names branch from e0ba58b to 1f4dba5 Compare February 2, 2026 12:38
@dobrac dobrac added the enhancement New feature or request label Feb 2, 2026
<span>{team.id}</span>
<CopyButton value={team.id} variant="ghost" className="size-5" />
</div>
<div className="flex items-center gap-2">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

add also team slug to the teams info

@dobrac dobrac force-pushed the feat/update-templates-list-to-namespaced-names branch from 1f4dba5 to 8aeec95 Compare February 2, 2026 13:20
@dobrac dobrac changed the base branch from main to feat/template-list-pixel-perfect-tweaks February 2, 2026 13:20
@dobrac dobrac force-pushed the feat/update-templates-list-to-namespaced-names branch from 8aeec95 to 22704a6 Compare February 2, 2026 15:12
Comment on lines -880 to -881
required:
- alias
Copy link

Choose a reason for hiding this comment

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

Should we do something like:

oneOf:
	- required: [ alias ]
	- required: [ name ]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

alias is deprecated + the oneOf generator in go is not great

Comment on lines +937 to +940
name:
description: Name of the template. Can include a tag with colon separator (e.g. "my-template" or "my-template:v1"). If tag is included, it will be treated as if the tag was provided in the tags array.
type: string
tags:
Copy link

Choose a reason for hiding this comment

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

Silly question - what's the difference between a name and a tag? Is a name more important than a tag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

name is the name of the template, tag is a pointer to a specific build within the template

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(docs for context: https://e2b.dev/docs/template/tags) let me know please if something is not clear 🙏

Base automatically changed from feat/template-list-pixel-perfect-tweaks to main February 4, 2026 17:43
@dobrac dobrac force-pushed the feat/update-templates-list-to-namespaced-names branch from 22704a6 to e2b4fb0 Compare February 4, 2026 17:55
Copy link

@cursor cursor bot left a 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 1 potential issue.

Bugbot Autofix is ON. A Cloud Agent has been kicked off to fix the reported issue.

@cursor
Copy link

cursor bot commented Feb 4, 2026

Bugbot Autofix prepared fixes for 1 of the 1 bugs found in the latest run.

  • ✅ Fixed: API schema allows empty template build requests
    • Added required constraint on the 'name' field in TemplateBuildRequestV3 schema to prevent empty template build requests.

Create PR

Or push these changes by commenting:

@cursor push 998b7633c8
Preview (998b7633c8)
diff --git a/spec/openapi.infra.yaml b/spec/openapi.infra.yaml
--- a/spec/openapi.infra.yaml
+++ b/spec/openapi.infra.yaml
@@ -933,6 +933,8 @@
           description: Whether the step should be forced to run regardless of the cache
 
     TemplateBuildRequestV3:
+      required:
+        - name
       properties:
         name:
           description: Name of the template. Can include a tag with colon separator (e.g. "my-template" or "my-template:v1"). If tag is included, it will be treated as if the tag was provided in the tags array.

diff --git a/src/types/infra-api.types.ts b/src/types/infra-api.types.ts
--- a/src/types/infra-api.types.ts
+++ b/src/types/infra-api.types.ts
@@ -2289,7 +2289,7 @@
         };
         TemplateBuildRequestV3: {
             /** @description Name of the template. Can include a tag with colon separator (e.g. "my-template" or "my-template:v1"). If tag is included, it will be treated as if the tag was provided in the tags array. */
-            name?: string;
+            name: string;
             /** @description Tags to assign to the template build */
             tags?: string[];
             /**

Copy link
Member

@ben-fornefeld ben-fornefeld left a comment

Choose a reason for hiding this comment

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

lgtm

@ben-fornefeld ben-fornefeld merged commit 61f6e39 into main Feb 4, 2026
9 checks passed
@ben-fornefeld ben-fornefeld deleted the feat/update-templates-list-to-namespaced-names branch February 4, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants