fix: surface reviewer response failures
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user