Skip to content

DEVPROD-44209: Add support for bulk scheduling tasks - #2160

Open
minnakt wants to merge 7 commits into
evergreen-ci:mainfrom
minnakt:DEVPROD-44209
Open

minnakt wants to merge 7 commits into
evergreen-ci:mainfrom
minnakt:DEVPROD-44209

Conversation

@minnakt

@minnakt minnakt commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

DEVPROD-44209

Description

Adds support for scheduling selected tasks. Hidden behind the feature flag.

Screenshots

Screen.Recording.2026-11-25.at.12.15.52.PM.mov

Testing

  • Unit tests
  • e2e tests

@minnakt minnakt changed the title DEVPROD-44209 DEVPROD-44209: Add support for bulk scheduling tasks Nov 25, 2026
@minnakt minnakt added the spruce label Nov 25, 2026
@minnakt
minnakt marked this pull request as ready for review November 25, 2026 17:16
@minnakt
minnakt requested a review from a team as a code owner November 25, 2026 17:16
Comment on lines +55 to +64
refetchQueries: ["VersionTasks"],
});

const [scheduleTasksByFilter] = useMutation<
ScheduleTasksByFilterMutation,
ScheduleTasksByFilterMutationVariables
>(SCHEDULE_TASKS_BY_FILTER, {
onCompleted: (data) => onCompleted(data.scheduleTasksByFilter),
onError,
refetchQueries: ["VersionTasks"],

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.

Did you find these to be necessary? You're nicely returning the updated tasks from the mutation so I was wondering if the cache would update itself to avoid another fetch.

@@ -60,6 +62,7 @@ export const ActionButtons: React.FC<ActionButtonProps> = ({
{canRefreshGitHubStatuses && (
<RefreshGitHubStatuses versionId={versionId} />

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.

I think we had thrown out the idea of moving this into the ... menu where we could also provide a description to make it more usable. Any thoughts there?

useTaskSelectionContext();

return (
<MenuRoot>

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.

We have a ButtonDropdown component that you could maybe use here? It's being migrated to Via in #2125.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll have to add other things in here so I can update it at some point during that time!

return (
<MenuRoot>
<Button data-testid="modify-tasks" isDisabled={selectedCount === 0}>
Modify tasks{selectedCount > 0 && ` (${selectedCount})`}

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.

[nit] Tabular nums for the count here? 😁

I think another point in favor of moving "Refresh statuses" is it wouldn't shift when a task is first checked.

}
if (taskErrors.length > 0) {
dispatchToast.warning(
`Unable to schedule ${taskErrors.length} ${pluralize("task", taskErrors.length)}`,

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.

When the existing "Schedule" button is used, we do some checking to prevent a user from taking that action and show it in the modal. With multiselect, I feel like this warning toast is a lot less clear. Do you think there's any way we could provide some more context, or block the action altogether? Happy to discuss this further, I feel like it's an interesting problem.

image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added a modal and keep the failed rows selected, let me know what you think of it

data-testid="schedule-selected-tasks"
id="schedule-selected-tasks"
onAction={scheduleTasks}
textValue="Schedule tasks"

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.

Do you know the purpose of this prop? I don't see it in the storybook

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

tbh IDK what it does but the Via team was using it 🤷

@minnakt
minnakt requested a review from sophstad November 30, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants