From aef9c46c5608c8e455d49d31d790a4cc483706b9 Mon Sep 17 00:00:00 2001 From: soryu Date: Thu, 29 Jan 2026 01:10:43 +0000 Subject: Fix Red Team UI visibility by adding red_team_enabled to ContractSummary The Red Team toggle was implemented in the frontend but not visible because the backend API's ContractSummary response struct was missing the red_team_enabled field. The frontend relies on this field to: 1. Show the red team badge in the contract list view 2. Show the red team badge and tab in the contract detail view Changes: - Add red_team_enabled field to ContractSummary struct in models.rs - Update list_contracts_for_owner SQL query to include red_team_enabled - Update get_contract_summary_for_owner SQL query to include red_team_enabled - Update all fallback ContractSummary constructions in contracts.rs handler Co-Authored-By: Claude Opus 4.5 --- makima/src/db/models.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'makima/src/db/models.rs') diff --git a/makima/src/db/models.rs b/makima/src/db/models.rs index 91564c8..4411747 100644 --- a/makima/src/db/models.rs +++ b/makima/src/db/models.rs @@ -1641,6 +1641,9 @@ pub struct ContractSummary { /// When true, tasks do not auto-execute completion actions and work stays in worktrees. #[serde(default)] pub local_only: bool, + /// Whether red team monitoring is enabled for this contract. + #[serde(default)] + pub red_team_enabled: bool, pub file_count: i64, pub task_count: i64, pub repository_count: i64, -- cgit v1.2.3