From 164941cbd591b46f69a034bb9b86521fd7700ddb Mon Sep 17 00:00:00 2001 From: soryu Date: Mon, 19 Jan 2026 17:40:25 +0000 Subject: Remove 'task' type contract --- makima/src/server/handlers/contract_chat.rs | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'makima/src/server/handlers/contract_chat.rs') diff --git a/makima/src/server/handlers/contract_chat.rs b/makima/src/server/handlers/contract_chat.rs index 7e7b476..0f794c1 100644 --- a/makima/src/server/handlers/contract_chat.rs +++ b/makima/src/server/handlers/contract_chat.rs @@ -2795,10 +2795,20 @@ fn analyze_phase_readiness(contract: &crate::db::models::ContractWithRelations) } let ready = total_tasks > 0 && done_tasks == total_tasks; + + // For simple contracts, execute is the terminal phase - suggest completion + if ready && contract.contract.contract_type == "simple" { + suggestions.push("Mark the contract as completed".to_string()); + } + PhaseReadinessAnalysis { ready, summary: if ready { - "All tasks completed. Ready for Review phase.".to_string() + if contract.contract.contract_type == "simple" { + "All tasks completed. Contract can be marked as completed.".to_string() + } else { + "All tasks completed. Ready for Review phase.".to_string() + } } else if total_tasks == 0 { "No tasks created yet. Create and complete tasks before reviewing.".to_string() } else { @@ -2815,12 +2825,19 @@ fn analyze_phase_readiness(contract: &crate::db::models::ContractWithRelations) if review_files == 0 { suggestions.push("Create review checklist or release notes".to_string()); + } else { + // Review documentation exists - suggest completion + suggestions.push("Mark the contract as completed".to_string()); } PhaseReadinessAnalysis { - ready: false, - summary: "Review is the final phase. Contract can be marked as complete when review is done.".to_string(), - reasons: vec!["Review phase is the final phase".to_string()], + ready: review_files > 0, + summary: if review_files > 0 { + "Review documentation complete. Contract can be marked as completed.".to_string() + } else { + "Review phase needs documentation before completion.".to_string() + }, + reasons: vec!["Review is the final phase".to_string()], suggestions, } } -- cgit v1.2.3