-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(webapp): add Abort button to bulk actions list rows #4144
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
carderne
merged 6 commits into
main
from
feature/tri-11607-add-row-action-menu-ellipsis-with-abort-to-the-bulk-actions
Jul 3, 2026
+179
−17
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
905826f
feat(webapp): add Abort button to bulk actions list rows
carderne ac634e7
format
carderne d3daaca
feat(webapp): confirm before aborting a bulk action
carderne eb6aad4
feat(webapp): label bulk action abort buttons "Abort…"
carderne 883be7f
format
carderne e6e8e98
chore(webapp): add server-changes for bulk action abort from list
carderne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| area: webapp | ||
| type: improvement | ||
| --- | ||
|
|
||
| Abort an in-progress bulk action directly from the bulk actions list, with a confirmation step before it runs. |
59 changes: 59 additions & 0 deletions
59
apps/webapp/app/components/runs/v3/AbortBulkActionDialog.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| import { NoSymbolIcon } from "@heroicons/react/24/solid"; | ||
| import { DialogClose } from "@radix-ui/react-dialog"; | ||
| import { Form, useNavigation } from "@remix-run/react"; | ||
| import { Button } from "~/components/primitives/Buttons"; | ||
| import { DialogContent, DialogHeader } from "~/components/primitives/Dialog"; | ||
| import { FormButtons } from "~/components/primitives/FormButtons"; | ||
| import { Paragraph } from "~/components/primitives/Paragraph"; | ||
| import { SpinnerWhite } from "~/components/primitives/Spinner"; | ||
|
|
||
| type AbortBulkActionDialogProps = { | ||
| // The abort action route to POST to (the bulk action detail path). | ||
| formAction: string; | ||
| // Fired on submit so a parent controlling the Radix Dialog can close it | ||
| // without wrapping the submit button in `DialogClose` — that wrapper races | ||
| // submit (close fires first, unmounts the form, and the abort POST never | ||
| // lands). Optional so uncontrolled call sites still type-check. | ||
| onAbortSubmitted?: () => void; | ||
| }; | ||
|
|
||
| export function AbortBulkActionDialog({ | ||
| formAction, | ||
| onAbortSubmitted, | ||
| }: AbortBulkActionDialogProps) { | ||
| const navigation = useNavigation(); | ||
|
|
||
| const isLoading = navigation.formAction === formAction && navigation.formMethod === "POST"; | ||
|
|
||
| return ( | ||
| <DialogContent key="abort"> | ||
| <DialogHeader>Abort this bulk action?</DialogHeader> | ||
| <div className="flex flex-col gap-3 pt-3"> | ||
| <Paragraph> | ||
| Aborting stops this bulk action from processing any remaining runs. Runs it has already | ||
| processed won't be affected. | ||
| </Paragraph> | ||
| <FormButtons | ||
| confirmButton={ | ||
| <Form action={formAction} method="post" onSubmit={() => onAbortSubmitted?.()}> | ||
| <Button | ||
| type="submit" | ||
| variant="danger/medium" | ||
| LeadingIcon={isLoading ? SpinnerWhite : NoSymbolIcon} | ||
| disabled={isLoading} | ||
| shortcut={{ modifiers: ["mod"], key: "enter" }} | ||
| > | ||
| {isLoading ? "Aborting..." : "Abort bulk action"} | ||
| </Button> | ||
| </Form> | ||
| } | ||
| cancelButton={ | ||
| <DialogClose asChild> | ||
| <Button variant={"tertiary/medium"}>Close</Button> | ||
| </DialogClose> | ||
| } | ||
| /> | ||
| </div> | ||
| </DialogContent> | ||
| ); | ||
| } | ||
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.