fix: reset overlay state to None after workflow actions

This commit is contained in:
asepharyana
2026-07-12 18:19:43 +07:00
parent 562509b0e0
commit ab8b098a57
+6
View File
@@ -448,6 +448,9 @@ pub fn apply_action(state: &mut AppStateRest, action: Action) {
crate::dto::chat::message::Role::System, crate::dto::chat::message::Role::System,
format!("{}", message), format!("{}", message),
)); ));
if state.misc.overlay == Overlay::Workflow {
state.misc.overlay = Overlay::None;
}
state.dirty = true; state.dirty = true;
} else if kind == "workflow_error" { } else if kind == "workflow_error" {
state.push_toast(Toast { state.push_toast(Toast {
@@ -460,6 +463,9 @@ pub fn apply_action(state: &mut AppStateRest, action: Action) {
crate::dto::chat::message::Role::System, crate::dto::chat::message::Role::System,
format!("{}", message), format!("{}", message),
)); ));
if state.misc.overlay == Overlay::Workflow {
state.misc.overlay = Overlay::None;
}
state.dirty = true; state.dirty = true;
} else { } else {
state.push_toast(Toast::new(ToastKind::Info, message)); state.push_toast(Toast::new(ToastKind::Info, message));