From b3de779d87450033f1e0361144c621a1d5f1dbf8 Mon Sep 17 00:00:00 2001 From: soryu Date: Mon, 16 Feb 2026 17:59:38 +0000 Subject: Fix contracts page overflow, remove contract link from orders, add directive name (#65) * feat: soryu-co/soryu - makima: Add frontend pick-up-orders button and API integration * WIP: heartbeat checkpoint * feat: soryu-co/soryu - makima: Remove contract link from orders and add directive name to order metadata (frontend) * fix: contracts page overflow - use contained scrolling layout Changed the contracts page to use contained scrolling matching the orders/directives pages, preventing the page from growing beyond viewport height. Co-Authored-By: Claude Opus 4.6 * fix: resolve completion_task_id FK violation and duplicate button The completion_task_id column has an FK to tasks(id), but claim_directive_for_completion was being called with a placeholder UUID that did not exist in the tasks table, causing FK constraint violations. Fix: Create the task FIRST via create_task_for_owner, then use the real task.id when calling claim_directive_for_completion. Applied in all three locations: phase_completion Part 1 (idle directives), Part 3 (verification tasks), and trigger_completion_task (manual PR creation). Also removes a duplicate "Pick Up Orders" button in DirectiveDetail.tsx. * fix: restore Order type changes lost during rebase conflict resolution Re-apply changes from the orders-refactor commit that were dropped when resolving rebase conflicts with --ours: - Replace contractId with directiveName in Order interface - Make directiveId required in CreateOrderRequest - Remove contractId from UpdateOrderRequest - Change listOrders parameter from contractId to search - Remove linkOrderToContract function - Simplify convertOrderToStep to single argument --------- Co-authored-by: Claude Opus 4.6 --- .../frontend/src/components/orders/OrderDetail.tsx | 89 +++------------------- .../frontend/src/components/orders/OrderList.tsx | 8 +- 2 files changed, 16 insertions(+), 81 deletions(-) (limited to 'makima/frontend/src/components') diff --git a/makima/frontend/src/components/orders/OrderDetail.tsx b/makima/frontend/src/components/orders/OrderDetail.tsx index 7f8a95d..9d4c00c 100644 --- a/makima/frontend/src/components/orders/OrderDetail.tsx +++ b/makima/frontend/src/components/orders/OrderDetail.tsx @@ -39,8 +39,7 @@ interface OrderDetailProps { onUpdate: (req: UpdateOrderRequest) => Promise; onDelete: () => void; onLinkDirective: (directiveId: string) => Promise; - onLinkContract: (contractId: string) => Promise; - onConvertToStep: (directiveId: string) => Promise; + onConvertToStep: () => Promise; onRefresh: () => void; } @@ -50,7 +49,6 @@ export function OrderDetail({ onUpdate, onDelete, onLinkDirective, - onLinkContract, onConvertToStep, onRefresh, }: OrderDetailProps) { @@ -61,9 +59,6 @@ export function OrderDetail({ const [editingLabels, setEditingLabels] = useState(false); const [labelsText, setLabelsText] = useState(order.labels.join(", ")); const [showLinkDirective, setShowLinkDirective] = useState(false); - const [showLinkContract, setShowLinkContract] = useState(false); - const [contractIdInput, setContractIdInput] = useState(""); - const [showConvertToStep, setShowConvertToStep] = useState(false); const badge = STATUS_BADGE[order.status] || STATUS_BADGE.open; const currentPriority = PRIORITY_OPTIONS.find((p) => p.value === order.priority) || PRIORITY_OPTIONS[4]; @@ -110,17 +105,6 @@ export function OrderDetail({ setShowLinkDirective(false); }; - const handleLinkContract = async () => { - if (!contractIdInput.trim()) return; - await onLinkContract(contractIdInput.trim()); - setContractIdInput(""); - setShowLinkContract(false); - }; - - const handleConvertToStep = async (directiveId: string) => { - await onConvertToStep(directiveId); - setShowConvertToStep(false); - }; return (
@@ -196,12 +180,9 @@ export function OrderDetail({ {/* Linked entities */} {order.directiveId && ( - )} - {order.contractId && ( - )} {order.directiveStepId && ( @@ -453,67 +434,15 @@ export function OrderDetail({ )}
- {/* Link to Contract */} -
+ {/* Convert to Directive Step */} + {!order.directiveStepId && order.directiveId && ( - {showLinkContract && ( -
- setContractIdInput(e.target.value)} - placeholder="Contract ID..." - className="flex-1 bg-[#0a1628] border border-[rgba(117,170,252,0.2)] rounded px-2 py-1 text-[10px] font-mono text-white" - autoFocus - /> - -
- )} -
- - {/* Convert to Directive Step */} - {!order.directiveStepId && ( -
- - {showConvertToStep && ( -
- {directives.length === 0 ? ( -
- No directives available -
- ) : ( - directives.map((d) => ( - - )) - )} -
- )} -
)} diff --git a/makima/frontend/src/components/orders/OrderList.tsx b/makima/frontend/src/components/orders/OrderList.tsx index 76ac7a7..1d279f7 100644 --- a/makima/frontend/src/components/orders/OrderList.tsx +++ b/makima/frontend/src/components/orders/OrderList.tsx @@ -57,7 +57,8 @@ export function OrderList({ (o) => o.title.toLowerCase().includes(q) || (o.description && o.description.toLowerCase().includes(q)) || - o.labels.some((l) => l.toLowerCase().includes(q)), + o.labels.some((l) => l.toLowerCase().includes(q)) || + (o.directiveName && o.directiveName.toLowerCase().includes(q)), ); }, [orders, search]); @@ -158,6 +159,11 @@ export function OrderList({ /> {o.title} + {o.directiveName && ( + + {o.directiveName} + + )}
-- cgit v1.2.3