Skip to content

Add confirmation prompt to workspace update action #557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 22, 2025

Conversation

blink-so[bot]
Copy link
Contributor

@blink-so blink-so bot commented Jul 17, 2025

This PR adds a confirmation prompt to the workspace update action to prevent accidental updates that could result in data loss.

Changes:

  • Changed from showInformationMessage to showWarningMessage to better indicate the destructive nature
  • Added explicit warning text: "Updating will restart your workspace and stop any running processes that may result in loss of unsaved data"
  • Added "Cancel" button to provide clear opt-out option

Testing:

  • Linting passes
  • Build completes successfully
  • One unrelated test failure in SSH support (pre-existing)

Fixes the issue where users accidentally trigger workspace updates without understanding the consequences.

Adds a warning dialog with explicit consent before updating workspace.
Includes warning text about workspace restart and potential data loss.

Co-authored-by: kylecarbs <[email protected]>
@matifali matifali requested a review from code-asher July 19, 2025 08:04
src/commands.ts Outdated
"Update Workspace",
{
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.`,
Copy link
Member

Choose a reason for hiding this comment

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

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 <[email protected]>
@code-asher code-asher merged commit 2d7dac8 into main Jul 22, 2025
2 checks passed
@code-asher code-asher deleted the add-update-confirmation-prompt branch July 22, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants