From cfe3ea0aae878ae8f591acdc33a48332ac875b9e Mon Sep 17 00:00:00 2001 From: soryu Date: Thu, 29 Jan 2026 02:24:48 +0000 Subject: fix: Remove mistaken red team UI from VN frontend (#47) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add Red Team UI to makima/frontend contract creation - Add redTeamEnabled and redTeamPrompt state to contracts page - Add "Enable Red Team Monitoring" checkbox with description - Add conditional "Custom Review Criteria" textarea when enabled - Include redTeamEnabled/redTeamPrompt in CreateContractRequest - Reset red team fields when canceling contract creation - Add redTeamEnabled to ContractSummary and Contract types - Add redTeamEnabled/redTeamPrompt to CreateContractRequest type - Add Red Team badge (🔍) to ContractList for enabled contracts Co-Authored-By: Claude Opus 4.5 * fix: Remove mistaken red team UI from VN frontend PR #39 accidentally added red team UI code to the wrong frontend directory (frontend/ instead of makima/frontend/). The correct implementation is already in makima/frontend/. This commit removes the mistaken changes: - Delete ContractCreateModal.tsx (was added by mistake) - Revert ContractList.tsx to remove red team badge and create modal - Revert ContractDetail.tsx to remove red team tab and notifications - Revert types.ts to remove contract/task types - Revert pc98.css to remove red team styling Co-Authored-By: Claude Opus 4.5 * [WIP] Heartbeat checkpoint - 2026-01-29 02:18:40 UTC --------- Co-authored-by: Claude Opus 4.5 --- frontend/src/components/ContractList.tsx | 61 ++++++++++---------------------- 1 file changed, 18 insertions(+), 43 deletions(-) (limited to 'frontend/src/components/ContractList.tsx') diff --git a/frontend/src/components/ContractList.tsx b/frontend/src/components/ContractList.tsx index 253b44f..77012db 100644 --- a/frontend/src/components/ContractList.tsx +++ b/frontend/src/components/ContractList.tsx @@ -1,6 +1,5 @@ -import React, { useEffect, useState, useCallback } from 'react' +import React, { useEffect, useState } from 'react' import { Link } from 'react-router-dom' -import { ContractCreateModal } from './ContractCreateModal' interface ContractSummary { id: string @@ -13,35 +12,32 @@ interface ContractSummary { task_count: number repository_count: number created_at: string - // Red team fields - red_team_enabled?: boolean } export function ContractList() { const [contracts, setContracts] = useState([]) const [loading, setLoading] = useState(true) const [error, setError] = useState(null) - const [showCreateModal, setShowCreateModal] = useState(false) - const fetchContracts = useCallback(async () => { - try { - setLoading(true) - const response = await fetch('/api/v1/contracts') - if (!response.ok) { - throw new Error(`Failed to fetch contracts: ${response.statusText}`) + useEffect(() => { + async function fetchContracts() { + try { + setLoading(true) + const response = await fetch('/api/v1/contracts') + if (!response.ok) { + throw new Error(`Failed to fetch contracts: ${response.statusText}`) + } + const data = await response.json() + setContracts(data.contracts || []) + } catch (err) { + setError(err instanceof Error ? err.message : 'Unknown error') + } finally { + setLoading(false) } - const data = await response.json() - setContracts(data.contracts || []) - } catch (err) { - setError(err instanceof Error ? err.message : 'Unknown error') - } finally { - setLoading(false) } - }, []) - useEffect(() => { fetchContracts() - }, [fetchContracts]) + }, []) if (loading) { return ( @@ -61,15 +57,7 @@ export function ContractList() { return (
-
-

Contracts

- -
+

Contracts

{contracts.length === 0 ? (

No contracts found

) : ( @@ -77,14 +65,7 @@ export function ContractList() { {contracts.map((contract) => (
  • -

    - {contract.name} - {contract.red_team_enabled && ( - - 🔍 - - )} -

    +

    {contract.name}

    {contract.description &&

    {contract.description}

    }
    Phase: {contract.phase} @@ -97,12 +78,6 @@ export function ContractList() { ))} )} - - setShowCreateModal(false)} - onCreated={fetchContracts} - />
    ) } -- cgit v1.2.3