Repository navigation
fix: allow fixing stale parameters when the active version is required - #30660
Merged
Merged
Conversation
untra
reviewed
Oct 13, 2026
| workspace.template_require_active_version && | ||
| !canChangeVersions; | ||
| !canChangeVersions && | ||
| templateVersionId !== workspace.template_active_version_id; |
Contributor
There was a problem hiding this comment.
okay so AI recommended this as well, but then is it too wide of a cut?
with this it should not be disabled if the workspace template version does not match the template version.
the presence of errors will still correctly disable the update button 👍
Member
Author
There was a problem hiding this comment.
imagine it like this:
// Disable the form if...
const disabled =
// ...the workspace is outdated
workspace.outdated &&
// ...and the template requires auto-updates
workspace.template_require_active_version &&
// ...and the user cannot choose arbitrary versions anyway (ie. admin)
!canChangeVersions &&
// ...and they are attempting to use a template version which is *NOT* the
// latest version, as required by auto-updates.
templateVersionId !== workspace.template_active_version_id;without this new part of the condition, we previously had...
// Disable the form if...
const disabled =
// ...the workspace is outdated
workspace.outdated &&
// ...and the template requires auto-updates
workspace.template_require_active_version &&
// ...and the user cannot choose arbitrary versions anyway (ie. admin)
!canChangeVersions;...which would mean that a user with an outdated workspace with auto-updates enabled would be entirely unable to use this page unless they're an admin. this change makes it so that they're not locked out as long as we got sent to this page to update the workspace to the latest version.
untra
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes CLIENT-697.
When a template requires the active version, users without permission to change versions get sent to the parameters page to fix a parameter value the new version no longer accepts, but the form was fully disabled. The form now stays editable when it targets the active version, since submitting it is the update the template requires. The build error dialog also now links these users to the active version's parameters instead of the old version's.
Decisions
coder_parameterselectable options from workflow display #29575).?templateVersionId=<active version>is still read-only for these users, and immutable parameters with errors still block the update.Generated by Coder Agents.