From d7311e40c3326aaeea0918fe870f3cae7163ca15 Mon Sep 17 00:00:00 2001
From: soryu <soryu@soryu.co>
Date: Wed, 21 Jan 2026 19:06:17 +0000
Subject: Add standalone task creation from mesh page (#16)

Allow creating anonymous tasks (tasks without a contract_id) directly
from the mesh page:

- Add 'Create Standalone Task' option in task creation modal step 1
- Update step 2 to handle null selectedContract for standalone tasks
- Show working directory input for standalone tasks
- Update TaskList to show standalone tasks (filter: !parentTaskId && (isSupervisor || !contractId))
- Display 'Standalone Tasks' group header with lightning bolt icon
- Update empty state message to mention standalone tasks

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
---
 makima/frontend/src/components/mesh/TaskList.tsx | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

(limited to 'makima/frontend/src/components/mesh/TaskList.tsx')

diff --git a/makima/frontend/src/components/mesh/TaskList.tsx b/makima/frontend/src/components/mesh/TaskList.tsx
index 80077b6..e3f2862 100644
--- a/makima/frontend/src/components/mesh/TaskList.tsx
+++ b/makima/frontend/src/components/mesh/TaskList.tsx
@@ -95,8 +95,9 @@ export function TaskList({
 
   // Group tasks by contract and filter by status
   const groupedTasks = useMemo(() => {
-    // Separate root tasks (no parent) from subtasks, and only show supervisor tasks
-    const rootTasks = tasks.filter((t) => !t.parentTaskId && t.isSupervisor);
+    // Separate root tasks (no parent) from subtasks
+    // Show supervisor tasks AND standalone tasks (tasks without a contract)
+    const rootTasks = tasks.filter((t) => !t.parentTaskId && (t.isSupervisor || !t.contractId));
 
     // Filter tasks based on contract status
     const filteredTasks = statusFilter === 'all'
@@ -205,8 +206,8 @@ export function TaskList({
         {totalTasks === 0 ? (
           <div className="text-center text-[#9bc3ff] text-sm font-mono opacity-60 py-8">
             {statusFilter === 'all'
-              ? 'No supervisor tasks yet. Create a contract to start orchestrating tasks.'
-              : `No ${statusFilter} supervisor tasks found.`}
+              ? 'No tasks yet. Create a contract or a standalone task to get started.'
+              : `No ${statusFilter} tasks found.`}
           </div>
         ) : (
           <div>
@@ -229,9 +230,17 @@ export function TaskList({
                       </span>
                     </>
                   ) : (
-                    <span className="font-mono text-xs text-[#8b949e] italic">
-                      Unassigned Tasks ({group.tasks.length})
-                    </span>
+                    <>
+                      <svg className="w-4 h-4 text-[#9bc3ff]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
+                        <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 10V3L4 14h7v7l9-11h-7z" />
+                      </svg>
+                      <span className="font-mono text-xs text-[#9bc3ff]">
+                        Standalone Tasks
+                      </span>
+                      <span className="font-mono text-[10px] text-[#8b949e]">
+                        ({group.tasks.length})
+                      </span>
+                    </>
                   )}
                 </div>
 
-- 
cgit v1.2.3

