feat(frontend): boutons cancel/retry des tâches de fond (B8)

Câble l'action utilisateur sur les commandes Tauri B8 :

- port WorkStateGateway : ajout de cancelBackgroundTask/retryBackgroundTask
  (le read-model se rafraîchit via l'événement domaine backgroundTaskChanged ;
  retry rejoue sous un NOUVEL id de tâche).
- adapter Tauri : invoke cancel_background_task/retry_background_task.
- adapter mock : no-ops (le refresh réel est piloté par les événements).
- ProjectWorkStatePanel (BackgroundTaskRow) : état busy + affichage d'erreur
  + refresh après action.
- test ProjectsView.ls7 : stub de gateway complété.

Build vert : npm run build (tsc --noEmit + vite build), vitest 449 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 14:53:32 +02:00
parent 8cac1470ac
commit c179f93a26
5 changed files with 77 additions and 7 deletions

View File

@ -666,6 +666,16 @@ export interface PermissionGateway {
export interface WorkStateGateway {
/** Reads the current per-agent live/offline and idle/busy state for a project. */
getProjectWorkState(projectId: string): Promise<ProjectWorkState>;
/**
* Cancels a running/pending background task by id. The read-model refreshes
* through the `backgroundTaskChanged` domain event.
*/
cancelBackgroundTask(taskId: string): Promise<void>;
/**
* Re-runs a failed/cancelled background task under a **new** task id (the
* original id is never reused).
*/
retryBackgroundTask(taskId: string): Promise<void>;
}
/** One paginated page request over a conversation transcript (LS7). */