Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(site): name template versions in promote/archive dialogs and toasts - #27633

Merged
jakehwll merged 3 commits into
mainfrom
jakehwll/templates-versions-verbosity
Aug 6, 2026
Merged

fix(site): name template versions in promote/archive dialogs and toasts#27633
jakehwll merged 3 commits into
mainfrom
jakehwll/templates-versions-verbosity

Conversation

@jakehwll

@jakehwll jakehwll commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Note

These were previously returning as typed values in the api.ts, however, they were not actually typed in this way and updating them wouldn't have worked for the promotion as it would fall back to needing to validate against the template.

Archive toasts showed "undefined" because the API does not return a TemplateVersion. Toast/dialog copy now comes from the selected version.

  • Hold the full TemplateVersion for promote/archive confirms (global pattern elsewhere)
  • Name the version in confirm dialogs and success/error toasts
  • Type archive/unarchive API helpers as Promise<void>
image

@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: 8a6720c78a

ℹ️ 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 on lines +105 to +109
description={
<>
Are you sure you want to promote version{" "}
<strong>{versionToPromote?.name}</strong>? Workspaces will be
prompted to “Update” to this version once promoted.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add interaction coverage for the version-naming flow

This changes the user-visible promote and archive dialogs and their success/error toasts, but no Storybook story was added or updated to exercise either interaction; the existing VersionsTable stories only render the table and cannot verify that the selected version name reaches the confirmation copy and mutation result toast. Add a page-level story with a play function that opens and submits these dialogs.

AGENTS.md reference: site/AGENTS.md:L9-L10

Useful? React with 👍 / 👎.

Comment thread site/src/pages/TemplatePage/TemplateVersionsPage/TemplateVersionsPage.tsx Outdated
Comment thread site/src/pages/TemplatePage/TemplateVersionsPage/TemplateVersionsPage.tsx Outdated
Comment thread site/src/pages/TemplatePage/TemplateVersionsPage/TemplateVersionsPage.tsx Outdated
Comment thread site/src/pages/TemplatePage/TemplateVersionsPage/TemplateVersionsPage.tsx Outdated
Comment thread site/src/pages/TemplatePage/TemplateVersionsPage/TemplateVersionsPage.tsx Outdated
@jakehwll
jakehwll requested a review from aslilac August 1, 2026 03:47

@aqandrew aqandrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm other than a tiny merge conflict in TemplateVersionsPage's imports

Comment on lines +137 to +139
Are you sure you want to archive version{" "}
<strong>{versionToArchive?.name}</strong>? This is reversible.
Archived versions cannot be used by workspaces.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Explicitly naming the versions in the dialog description is a great change! 🙌🏽

nit: The version name is bolded here and double-quoted in the toast text. We should pick one style and stick with it. I vote for bolding the version name in the toast text (removing double quotes)

@jakehwll
jakehwll enabled auto-merge (squash) August 6, 2026 04:33
@jakehwll
jakehwll merged commit 6c8a864 into main Aug 6, 2026
26 checks passed
@jakehwll
jakehwll deleted the jakehwll/templates-versions-verbosity branch August 6, 2026 04:41
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants