feat: add tag management to template screens#282
feat: add tag management to template screens#282rhys-vultron wants to merge 2 commits intoe2b-dev:mainfrom
Conversation
Add full tag management support to the templates list view, leveraging the existing infra API tag endpoints. Users can view, assign, and remove tags directly from the table with an inline popover UI. - Add `tags` field to Template type - Add TRPC procedures: getTemplateTags, assignTags, removeTags - Add Tags column with badge display and management popover - Add tag filter (text-based) to table filters - Add unit test for tag filter logic - Update mock data with sample tags Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Someone is attempting to deploy a commit to the E2B Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52e9ffc2ed
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const [newTag, setNewTag] = useState('') | ||
| const inputRef = useRef<HTMLInputElement>(null) | ||
|
|
||
| const templateName = template.aliases[0] || template.names[0] |
There was a problem hiding this comment.
Use canonical template names in tag mutation payloads
Tag assignment/removal derives templateName from template.aliases[0] before template.names[0], but the infra contracts for /templates/tags expect template name fields (target in name:tag format and name for delete). For namespaced templates where alias and canonical name differ, these requests will be sent with the wrong identifier and return not found, so tag management fails even though the row is visible.
Useful? React with 👍 / 👎.
| <Button | ||
| variant="ghost" | ||
| size="icon" | ||
| className="text-fg-tertiary size-5 shrink-0 opacity-0 group-hover/row:opacity-100" |
There was a problem hiding this comment.
Expose tag editor trigger without hover-only visibility
The tag editor button is rendered with opacity-0 and only becomes visible on row hover, with no focus-visible fallback. In non-hover contexts (touch devices) and keyboard navigation, the control stays visually hidden, making add/remove tag actions effectively inaccessible for those users.
Useful? React with 👍 / 👎.
UI Screenshots (local dev with mock data)List Tab - Tags ColumnTemplates show their current build's tags as Visible tags in the table:
Builds Tab - Tags per BuildEach build row now shows which tags point to that specific build (e.g. Manage Tags PopoverOn row hover, a
Tag FilterFilter dropdown includes a Tags submenu with text input. Active filter shows as a pill (e.g. To test locally# Set up Supabase with the schema from scripts/setup-local-db.sql
NEXT_PUBLIC_MOCK_DATA=1 bun dev
# Navigate to /dashboard/{team}/templates |
Shows which tags (production, staging, latest, etc.) point to each build. Tags are batch-fetched per unique template to avoid n+1 queries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Closing for now - will revisit after further discussion on UX approach. |
Summary
Closes #281
tagsfield to theTemplatetype (already present in infra API schema)getTemplateTags,assignTags,removeTagsTest plan
codebadgesbun test:unitto confirm tag filter unit tests pass🤖 Generated with Claude Code