🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

feat(site): confirm before batch stopping workspaces - #27631

Merged
jakehwll merged 9 commits into
mainfrom
jakehwll/batch-stop-confirmation
Jul 29, 2026
Merged

feat(site): confirm before batch stopping workspaces#27631
jakehwll merged 9 commits into
mainfrom
jakehwll/batch-stop-confirmation

Conversation

@jakehwll

Copy link
Copy Markdown
Contributor

🤖 This PR was written by Coder Agents on behalf of Jake Howell.

What

Bulk stopping workspaces from the workspaces table currently fires immediately with no confirmation, whereas the single-row Stop action and the bulk Delete / Update actions all show a dialog first. This adds a confirmation dialog to the bulk Stop action so it matches the rest.

How

  • Added BatchStopConfirmation, a small ConfirmDialog wrapper mirroring the wording of the single-workspace stop confirmation but pluralized for the selected count.
  • Wired it into WorkspacesPage: onBatchStopTransition now opens the dialog (setActiveBatchAction("stop")) instead of calling batchActions.stop(...) directly, and the actual stop runs on confirm. Added "stop" to the BatchAction union.

No change to the underlying batchActions.stop behavior (still only stops running workspaces).

Reviewer notes

Before: onBatchStopTransition={() => batchActions.stop(checkedWorkspaces)} — no confirmation.

After: opens BatchStopConfirmation; confirm calls batchActions.stop(checkedWorkspaces) then clears the active action, consistent with how BatchDeleteConfirmation and BatchUpdateModalForm are handled.


Opened as a draft. Disclosure: this PR was generated by Coder Agents on behalf of @jakehwll.

@jakehwll jakehwll changed the title feat(WorkspacesPage): confirm before batch stopping workspaces feat(site): confirm before batch stopping workspaces Jul 29, 2026
@jakehwll
jakehwll marked this pull request as ready for review July 29, 2026 02:52
@coder-tasks

coder-tasks Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Documentation Check

Updates Needed

  • docs/user-guides/workspace-management.md - The Bulk operations section says "For update and delete, the user will be prompted for confirmation before any action is taken." This PR still adds a confirmation dialog to bulk stop (BatchStopConfirmation is wired up in WorkspacesPage.tsx), so that sentence is inaccurate. Update it to include stop, for example: "For update, delete, and stop, the user is prompted for confirmation before any action is taken."

    ⚠️ This was fixed in e6a0affb but reverted in 2378960f, while the UI change remains in the PR. The docs no longer match the code.


Automated review via Coder Agents

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 37e14971d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

await openBulkActions(canvas, user);
await user.click(await body.findByRole("menuitem", { name: /stop/i }));

const confirmButton = await body.findByTestId("confirm-button");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Query Stop confirmations by role and name

In both newly changed stop flows, the confirmation control is a real button visibly named Stop, so locating it through confirm-button bypasses the semantic/accessibility contract and would keep passing if the button lost its accessible name. Scope the query to the dialog and use findByRole("button", { name: "Stop" }), including in the mixed-state story.

AGENTS.md reference: site/AGENTS.md:L26-L27

Useful? React with 👍 / 👎.

Comment thread site/src/pages/WorkspacesPage/BatchStopConfirmation.tsx Outdated

@aqandrew aqandrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM except for the Codex comment about workspaceCount being misleading. I'm good with merging this once that's addressed!

Comment thread site/src/pages/WorkspacesPage/BatchStopConfirmation.tsx Outdated
@jakehwll
jakehwll requested a review from a team as a code owner July 29, 2026 04:07
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

Docs preview

Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here.

@jakehwll
jakehwll requested a review from aqandrew July 29, 2026 04:10
Comment thread docs/user-guides/workspace-management.md Outdated

@aqandrew aqandrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nooice

@jakehwll
jakehwll enabled auto-merge (squash) July 29, 2026 04:18
@jakehwll
jakehwll merged commit d072aa7 into main Jul 29, 2026
26 checks passed
@jakehwll
jakehwll deleted the jakehwll/batch-stop-confirmation branch July 29, 2026 04:26
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants