fix: surface reviewer response failures

This commit is contained in:
2026-08-14 12:06:25 +02:00
parent 25b2835e73
commit db1a81cfa6
8 changed files with 166 additions and 3 deletions
+1
View File
@@ -235,6 +235,7 @@ test("an error-level info event flags the current phase", () => {
expect(useSessionStore.getState().phaseError).toBe("F4");
// the message still lands in stepMessages
expect(useSessionStore.getState().stepMessages.at(-1)).toEqual({ level: "error", text: "boom" });
expect(useSessionStore.getState().toasts.at(-1)).toEqual({ level: "error", text: "boom" });
});
test("a non-error info event does not set phaseError", () => {
+6 -1
View File
@@ -167,7 +167,12 @@ export const useSessionStore = create<SessionState>((set) => ({
];
// An error during the active phase marks that phase red until the next gate.
return e.level === "error"
? { stepMessages, activityLog, phaseError: st.currentPhase }
? {
stepMessages,
activityLog,
phaseError: st.currentPhase,
toasts: [...st.toasts, { level: "error", text: e.text }],
}
: { stepMessages, activityLog };
}
if (e.type === "system_event") {