Add confirmation prompt to workspace update action#557
Merged
code-asher merged 3 commits intomainfrom Jul 22, 2025
Merged
Conversation
Adds a warning dialog with explicit consent before updating workspace. Includes warning text about workspace restart and potential data loss. Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com>
matifali
reviewed
Jul 18, 2025
Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com>
code-asher
approved these changes
Jul 22, 2025
src/commands.ts
Outdated
| useCustom: true, | ||
| modal: true, | ||
| detail: `Update ${this.workspace.owner_name}/${this.workspace.name} to the latest version?`, | ||
| detail: `Update ${this.workspace.owner_name}/${this.workspace.name} to the latest version?\n\nUpdating will restart your workspace and stop any running processes that may result in loss of unsaved work.`, |
Member
There was a problem hiding this comment.
To me "that" implies the stopping of processes results in the loss of work, but really the restart is what does it. "And" might be a bit better, although "and" could also be interpreted this way so idk.
But this does match the wording used in coder/coder more: "Updating will restart your workspace which stops any running processes and may result in the loss of unsaved work."
Use 'which stops' instead of 'and stop' to clarify that the restart causes the process stopping and potential data loss. Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds a confirmation prompt to the workspace update action to prevent accidental updates that could result in data loss.
Changes:
showInformationMessagetoshowWarningMessageto better indicate the destructive natureTesting:
Fixes the issue where users accidentally trigger workspace updates without understanding the consequences.