devtools: Add cancel task operation to scheduled tasks

Renames useTriggerScheduledTask to useScheduledTasksOperations and adds
cancelTask alongside triggerTask, with shared isLoading/error state. Adds
CancelScheduledTask type to devtools-common and cancelScheduledTask to the
DevToolsApi interface and client, hitting the existing scheduler cancel
endpoint. The ScheduledTasksContent UI now shows both trigger and cancel
buttons per task row.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
This commit is contained in:
Fredrik Adelöw
2026-03-11 16:47:24 +01:00
parent 57fee86920
commit 85f38c29d1
7 changed files with 108 additions and 31 deletions
+1
View File
@@ -18,6 +18,7 @@ export {
devToolsTaskSchedulerCreatePermission,
} from './permissions';
export type {
CancelScheduledTask,
ScheduledTasks,
TaskApiTasksResponse,
TriggerScheduledTask,
+5
View File
@@ -133,3 +133,8 @@ export type ScheduledTasks = {
export type TriggerScheduledTask = {
error?: string;
};
/** @alpha */
export type CancelScheduledTask = {
error?: string;
};