From 9e286c146e29e714b3b209b4d948d75cce179b05 Mon Sep 17 00:00:00 2001 From: soryu Date: Wed, 21 Jan 2026 17:32:49 +0000 Subject: Enforce phaseguard --- makima/src/server/handlers/mesh_supervisor.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'makima/src/server') diff --git a/makima/src/server/handlers/mesh_supervisor.rs b/makima/src/server/handlers/mesh_supervisor.rs index 6cdbba6..668ea7b 100644 --- a/makima/src/server/handlers/mesh_supervisor.rs +++ b/makima/src/server/handlers/mesh_supervisor.rs @@ -1589,8 +1589,9 @@ pub async fn ask_question( ).await; } - // If non_blocking mode is enabled, return immediately with the question_id - if request.non_blocking { + // If non_blocking mode or phaseguard is enabled, return immediately with the question_id + // Phaseguard questions persist until answered (no timeout) and are displayed by the frontend + if request.non_blocking || request.phaseguard { return ( StatusCode::OK, Json(AskQuestionResponse { @@ -1622,8 +1623,8 @@ pub async fn ask_question( ).into_response(); } - // Check timeout (skip timeout if phaseguard is enabled - wait indefinitely) - if !request.phaseguard && start.elapsed() >= timeout_duration { + // Check timeout + if start.elapsed() >= timeout_duration { // Remove the pending question on timeout state.remove_pending_question(question_id); -- cgit v1.2.3