diff options
Diffstat (limited to 'makima/frontend/src/routes')
| -rw-r--r-- | makima/frontend/src/routes/mesh.tsx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/makima/frontend/src/routes/mesh.tsx b/makima/frontend/src/routes/mesh.tsx index fb366a2..cb4a77c 100644 --- a/makima/frontend/src/routes/mesh.tsx +++ b/makima/frontend/src/routes/mesh.tsx @@ -148,9 +148,19 @@ export default function MeshPage() { // Handle task update events from WebSocket const handleTaskUpdate = useCallback(async (event: TaskUpdateEvent) => { - // Refresh task list if we're viewing the list - if (!id) { + // Always refresh task list when a new task is created (e.g., by supervisor) + // This ensures newly spawned tasks appear in the sidebar immediately + const isNewTask = event.updatedFields.includes("created"); + if (isNewTask) { fetchTasks(); + } + + // Refresh task list if we're viewing the list (no specific task selected) + if (!id) { + if (!isNewTask) { + // Only fetch if we didn't already fetch for new task creation + fetchTasks(); + } return; } |
