feat(workstate): UI live-state des conversations/délégations (Lot A frontend)
Ajoute le port et l'adaptateur workState (+ mock) côté frontend, le type domaine associé, et la feature `workstate` (panneau ProjectWorkStatePanel + hook useProjectWorkState) consommant le read-model live exposé par le backend. Intègre le panneau dans ProjectsView. Tests verts (workstate + projects). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
17
frontend/src/adapters/workState.ts
Normal file
17
frontend/src/adapters/workState.ts
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Tauri adapter for {@link WorkStateGateway}.
|
||||
*
|
||||
* This is the only frontend place that knows the `get_project_work_state`
|
||||
* command name; features consume the gateway port through DI.
|
||||
*/
|
||||
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
|
||||
import type { ProjectWorkState } from "@/domain";
|
||||
import type { WorkStateGateway } from "@/ports";
|
||||
|
||||
export class TauriWorkStateGateway implements WorkStateGateway {
|
||||
getProjectWorkState(projectId: string): Promise<ProjectWorkState> {
|
||||
return invoke<ProjectWorkState>("get_project_work_state", { projectId });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user