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/frontend/src | |
| parent | 0833fb1f30c0c3b920157deb882e0e902c3af02a (diff) | |
| download | soryu-164941cbd591b46f69a034bb9b86521fd7700ddb.tar.gz soryu-164941cbd591b46f69a034bb9b86521fd7700ddb.zip | |
Remove 'task' type contract
Diffstat (limited to 'makima/frontend/src')
| -rw-r--r-- | makima/frontend/src/components/contracts/AutopilotPanel.tsx | 5 | ||||
| -rw-r--r-- | makima/frontend/src/lib/api.ts | 47 | ||||
| -rw-r--r-- | makima/frontend/src/routes/contracts.tsx | 22 |
3 files changed, 3 insertions, 71 deletions
diff --git a/makima/frontend/src/components/contracts/AutopilotPanel.tsx b/makima/frontend/src/components/contracts/AutopilotPanel.tsx index cf42e44..1a13773 100644 --- a/makima/frontend/src/components/contracts/AutopilotPanel.tsx +++ b/makima/frontend/src/components/contracts/AutopilotPanel.tsx @@ -129,11 +129,6 @@ export function AutopilotPanel({ contract, onUpdate }: AutopilotPanelProps) { } }, [contract.id, contract.version, onUpdate]); - // Don't show panel for task-type contracts (they don't have supervisors) - if (contract.contractType === "task") { - return null; - } - return ( <div className="space-y-3"> <div className="flex items-center justify-between"> diff --git a/makima/frontend/src/lib/api.ts b/makima/frontend/src/lib/api.ts index daa2b5c..78e52cd 100644 --- a/makima/frontend/src/lib/api.ts +++ b/makima/frontend/src/lib/api.ts @@ -1417,7 +1417,7 @@ export async function deleteAccount( // ============================================================================= /** Contract type determines the workflow and required documents */ -export type ContractType = "simple" | "specification" | "task"; +export type ContractType = "simple" | "specification"; export type ContractPhase = "research" | "specify" | "plan" | "execute" | "review"; export type ContractStatus = "active" | "completed" | "archived"; export type RepositorySourceType = "remote" | "local" | "managed"; @@ -1428,16 +1428,12 @@ export function getValidPhases(contractType: ContractType): ContractPhase[] { if (contractType === "simple") { return ["plan", "execute"]; } - if (contractType === "task") { - return ["execute"]; - } return ["research", "specify", "plan", "execute", "review"]; } /** Get default initial phase for a contract type */ export function getDefaultPhase(contractType: ContractType): ContractPhase { if (contractType === "simple") return "plan"; - if (contractType === "task") return "execute"; return "research"; } @@ -2081,47 +2077,6 @@ export async function deleteRepositoryHistory(id: string): Promise<void> { } // ============================================================================= -// Adhoc Task Types (for one-off tasks without supervisor overhead) -// ============================================================================= - -/** Request payload for creating an adhoc (one-off) task */ -export interface AdhocTaskRequest { - /** Name/description of the task */ - name: string; - /** The plan/instructions for the task */ - plan: string; - /** Repository URL (optional) */ - repositoryUrl?: string; - /** Base branch to work from */ - baseBranch?: string; -} - -/** Response for adhoc task creation */ -export interface AdhocTaskResponse { - contract: ContractSummary; - task: Task; -} - -/** - * Create an adhoc (one-off) task without supervisor overhead. - * This creates a minimal "task" type contract with a single task. - * The contract auto-archives when the task completes. - */ -export async function createAdhocTask( - data: AdhocTaskRequest -): Promise<AdhocTaskResponse> { - const res = await authFetch(`${API_BASE}/api/v1/tasks/adhoc`, { - method: "POST", - body: JSON.stringify(data), - }); - if (!res.ok) { - const errorText = await res.text(); - throw new Error(`Failed to create adhoc task: ${errorText || res.statusText}`); - } - return res.json(); -} - -// ============================================================================= // History Types // ============================================================================= diff --git a/makima/frontend/src/routes/contracts.tsx b/makima/frontend/src/routes/contracts.tsx index cd385f9..d2b6b1b 100644 --- a/makima/frontend/src/routes/contracts.tsx +++ b/makima/frontend/src/routes/contracts.tsx @@ -474,20 +474,6 @@ function ContractsPageContent() { <button type="button" onClick={() => { - setContractType("task"); - setInitialPhase("execute"); - }} - className={`flex-1 px-3 py-2 font-mono text-xs uppercase transition-colors ${ - contractType === "task" - ? "bg-[#0f3c78] text-[#dbe7ff] border border-[#75aafc]" - : "bg-[#0d1b2d] text-[#8b949e] border border-[#3f6fb3] hover:border-[#75aafc]" - }`} - > - Task - </button> - <button - type="button" - onClick={() => { setContractType("simple"); setInitialPhase("plan"); }} @@ -515,9 +501,7 @@ function ContractsPageContent() { </button> </div> <p className="mt-1 font-mono text-xs text-[#8b949e]"> - {contractType === "task" - ? "Execute: One-off adhoc task with no supervisor (auto-archives on completion)" - : contractType === "simple" + {contractType === "simple" ? "Plan → Execute: Simple workflow with a plan document" : "Research → Specify → Plan → Execute → Review: Full specification-driven development with TDD"} </p> @@ -540,9 +524,7 @@ function ContractsPageContent() { ))} </select> <p className="mt-1 font-mono text-xs text-[#8b949e]"> - {contractType === "task" - ? "Task contracts always start in Execute phase" - : contractType === "simple" + {contractType === "simple" ? "Start in Plan to define what to build, or Execute if already planned" : "Skip earlier phases if you already have requirements defined"} </p> |
