Description
- show "Cancel action" button when workspaceStatus is starting, stopping, or deleting
- show "Start workspace" and "Stop workspace" buttons when workspaceStatus is canceled or error
- remove Retry button and related code (because we realized we need to allow the user to take any action from an unknown state such as canceled or failed)
- remove loading version of start and stop buttons
- hook up api to cancel builds
- test that build is canceled
Note: There is an endpoint in the API specifically for canceling.
Given I have clicked "Stop workspace",
When I click "Cancel action",
Then I see the status "Canceling action" and no action buttons.
Moments later, I see the status "Canceled action" and "Start workspace" and "Stop workspace" buttons.
Given I have clicked "Start workspace",
When I click "Cancel action",
Then I see the status "Canceling action" and no action buttons.
Moments later, I see the status "Canceled action" and "Start workspace" and "Stop workspace" buttons.
The same should be true for deletion but the UI doesn't expose a delete button yet. You can test it from the CLI, though, with coder delete {workspaceName}
.