feat(workstate): UI des délégations en file par agent (Lot B frontend)

Affiche les tickets en attente dans `ProjectWorkStatePanel` à partir du
snapshot de file exposé par le read-model : type de domaine et adaptateur
mock alignés sur le DTO `camelCase`, panneau enrichi (requester, aperçu de
tâche, position FIFO), hook de lecture mis à jour.

Tests verts : workstate.test.tsx + projects.test.tsx (2 fichiers / 17),
`tsc --noEmit` OK.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 18:52:23 +02:00
parent cc7d99a63e
commit c60060494d
5 changed files with 300 additions and 41 deletions

View File

@ -149,6 +149,26 @@ export type WorkBusyState =
| { state: "idle" }
| { state: "busy"; ticket: string; sinceMs: number };
/** FIFO status for an input/ticket currently tracked by the backend queue. */
export type TicketWorkStatus = "inProgress" | "queued";
/** Who produced an input/ticket in the work-state read-model. */
export type TicketWorkSource =
| { kind: "human" }
| { kind: "agent"; agentId: string };
/** One queued or in-progress input/ticket for an agent. */
export interface AgentTicketState {
ticketId: string;
conversationId: string;
position: number;
status: TicketWorkStatus;
source: TicketWorkSource;
requesterLabel: string;
taskPreview: string;
taskLen: number;
}
/** One agent row in the project work-state read-model. */
export interface AgentWorkState {
agentId: string;
@ -156,6 +176,7 @@ export interface AgentWorkState {
profileId: string;
live?: LiveWorkSession;
busy: WorkBusyState;
tickets: AgentTicketState[];
}
/** Minimal read-only live-state surface for a project. */