fix(ui): stream phase progress without gates

This commit is contained in:
2026-08-24 12:10:56 +02:00
parent 36a7a0ab33
commit fa2298653b
10 changed files with 186 additions and 5 deletions
+12
View File
@@ -29,6 +29,18 @@ test("dots carry done / running / pending states around the active phase", () =>
expect(screen.getByTestId("phase-F5")).toHaveAttribute("data-state", "pending");
});
test("phase_started colors a phase even when no human gate was rendered", () => {
const store = useSessionStore.getState();
store.setPhase("F1");
store.applyEvent({ type: "system_event", event: "phase_started", phase: "F2" });
render(<WorkflowBar />);
expect(screen.getByTestId("phase-F1")).toHaveAttribute("data-state", "done");
expect(screen.getByTestId("phase-F2")).toHaveAttribute("data-state", "running");
expect(screen.getByTestId("phase-F3")).toHaveAttribute("data-state", "pending");
});
test("the active dot turns to the error state when phaseError flags it", () => {
const st = useSessionStore.getState();
st.applyEvent({ type: "ui_request", ui_request: { id: "u", widget: "select", phase: "F3_x" } });