diff options
| author | soryu <soryu@soryu.co> | 2026-01-19 17:40:25 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-01-19 17:40:25 +0000 |
| commit | 164941cbd591b46f69a034bb9b86521fd7700ddb (patch) | |
| tree | a11f4dc7196f6e00c7d52da1cfc6aa982cce60aa /makima/src/server/handlers/contract_chat.rs | |
| parent | 0833fb1f30c0c3b920157deb882e0e902c3af02a (diff) | |
| download | soryu-164941cbd591b46f69a034bb9b86521fd7700ddb.tar.gz soryu-164941cbd591b46f69a034bb9b86521fd7700ddb.zip | |
Remove 'task' type contract
Diffstat (limited to 'makima/src/server/handlers/contract_chat.rs')
| -rw-r--r-- | makima/src/server/handlers/contract_chat.rs | 25 |
1 files changed, 21 insertions, 4 deletions
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, } } |
