Skip to content

feat(site/src/pages/TemplateBuilder): disable create button when no provisioners - #26938

Merged
jeremyruppel merged 3 commits into
mainfrom
jeremy/template-builder-disable-create-no-provisioners
Jul 1, 2026
Merged

feat(site/src/pages/TemplateBuilder): disable create button when no provisioners#26938
jeremyruppel merged 3 commits into
mainfrom
jeremy/template-builder-disable-create-no-provisioners

Conversation

@jeremyruppel

@jeremyruppel jeremyruppel commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Add provisioner awareness to the Template Builder wizard: disable the Create Template button when the selected organization has no provisioners, and reset the customizations step when navigating back.

Changes

  • Query provisioner daemons for the selected org in TemplateCustomizationsStep and show a warning alert when none are found
  • Track hasProvisioners in wizard state via SET_HAS_PROVISIONERS action; computeCanContinue disables the Create Template button when hasProvisioners === false
  • Add RESET_CUSTOMIZATIONS action to clear customization fields (name, displayName, description, icon, organizationId, hasProvisioners) when navigating back from the customizations step
  • Clear the create mutation error on back navigation via onClearCreateError callback

Follows up on #26935 which added the provisioner warning alert to the Template Builder.

🤖 Generated by Coder Agents on behalf of @jeremyruppel

Disable the Create Template button on the customizations step when the
selected organization has no provisioner daemons. Adds hasProvisioners
to the wizard state, updated via a callback from
TemplateCustomizationsStep, and checked in computeCanContinue.
@jeremyruppel jeremyruppel changed the title feat(site/TemplateBuilder): disable create button when no provisioners feat(site/src/pages/TemplateBuilder): disable create button when no provisioners Jul 1, 2026
@jeremyruppel
jeremyruppel requested a review from aqandrew July 1, 2026 20:48
Reset the template customization fields (name, displayName, description,
icon, organizationId, hasProvisioners) and clear any create error when
navigating back from the customizations step. The step component
remounts fresh with clean local state on re-entry.
@jeremyruppel
jeremyruppel marked this pull request as ready for review July 1, 2026 20:53
Wrap onProvisionerStatusChange in useCallback to prevent an infinite
render loop. The inline arrow function created a new reference each
render, re-triggering the useEffect in TemplateCustomizationsStep.
@jeremyruppel
jeremyruppel merged commit 2318b0e into main Jul 1, 2026
26 of 27 checks passed
@jeremyruppel
jeremyruppel deleted the jeremy/template-builder-disable-create-no-provisioners branch July 1, 2026 21:30
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 1, 2026
@jeremyruppel jeremyruppel added cherry-pick/v2.35 Cherry-pick PR targeting release/2.35 cherry-pick and removed cherry-pick/v2.35 Cherry-pick PR targeting release/2.35 labels Jul 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants