# Multi-Agent Task Management UI — Implementation Plan > **Unifying `auto_task`, `tasks`, `designer` → Draggable Multi-Agent Windows** --- ## 1. High-Level Vision (from Screenshots) The user wants a **desktop-like environment** with these elements: ### Layout Components ``` ┌──────┬──────────────────────────────────────────────────────┐ │ │ [Tasks ⚙ 👤] ← Top Left Mini Bar (fixed) │ │ SIDE │ │ │ BAR │ ┌─────────────────────┐ ┌────────────────────────┐ │ │ │ │ PRIMARY WINDOW │ │ SECONDARY WINDOW │ │ │ (far │ │ "Tasks" │ │ "Agents & Workspaces" │ │ │ left)│ │ Tabs: │ │ (can be minimized) │ │ │ │ │ - // DASHBOARD │ │ │ │ │ /chat│ │ - // TASK #N │ │ Agent cards, quota │ │ │/drive│ │ │ │ monitors, workspace │ │ │ etc. │ │ PLAN|BUILD|REVIEW| │ │ assignment │ │ │ │ │ DEPLOY|MONITOR tabs │ │ │ │ │ │ │ │ │ │ │ │ │ │ Draggable task cards│ │ │ │ │ │ │ with sub-tasks, │ │ │ │ │ │ │ logs, output, chat │ │ │ │ │ │ └─────────────────────┘ └────────────────────────┘ │ │ │ │ │ │ ┌───────────────────────────────────────────────┐ │ │ │ │ // Chat (shared chat at bottom) │ │ │ │ │ TIP: Describe your project... │ │ │ │ └───────────────────────────────────────────────┘ │ │ ├──────────────────────────────────────────────────────┤ │ │ [Taskbar: open windows] [Clock] [Date] │ └──────┴──────────────────────────────────────────────────────┘ ``` ### Key Rules from User Request 1. **Sidebar** → Far left (already exists in `desktop.html`, keep it) 2. **Top-left mini bar** → Fixed bar with "Tasks" label, ⚙ Settings icon, 👤 Account icon. **Remove Mantis logo**. 3. **Where it reads "Mantis" → read "Tasks"** (generic rename throughout) 4. **Primary Window: "Tasks"** → Two tabs: - **// DASHBOARD** — Overview with Task #N agent card, DNA info, tokens, activity - **// TASK #N** (project view) — PLAN | BUILD | REVIEW | DEPLOY | MONITOR pipeline tabs, with draggable task cards showing sub-tasks, logs, output 5. **Secondary Window: "Agents & Workspaces"** → Shows agent roster, quota monitors, workspace assignments. Can be minimized. 6. **Chat panel** → Shared at bottom of task view, project-scoped 7. **All windows** → Draggable, resizable, use existing `WindowManager` 8. **VibCode integration** → Multi-draggable agents like the designer canvas --- ## 2. Codebase Inventory & Current State ### Frontend (botui/ui/suite) | File/Dir | Purpose | Lines | Status | |----------|---------|-------|--------| | `desktop.html` | Main desktop shell, sidebar, tabs, workspace | 281 | ✅ Keep as shell | | `js/window-manager.js` | Window open/close/drag/minimize/maximize | 296 | 🔧 Extend | | `tasks/tasks.html` | Current task list + detail panel | 318 | 🔄 Refactor into new primary window | | `tasks/tasks.js` | Task JS (3297 lines) | 3297 | 🔄 Refactor (heavy) | | `tasks/tasks.css` | Task styles (70k+) | ~2400 | 🔄 Refactor/extend | | `tasks/autotask.html` | AutoTask standalone UI | 484 | 🔄 Merge into primary window | | `tasks/autotask.js` | AutoTask JS (2201 lines) | 2201 | 🔄 Merge | | `tasks/autotask.css` | AutoTask styles | ~1200 | 🔄 Merge | | `tasks/progress-panel.html` | Floating progress panel | 133 | 🔄 Keep as sub-component | | `tasks/progress-panel.js` | Progress panel JS | ~550 | ✅ Keep | | `tasks/intents.html` | Intents listing | ~400 | 🔄 Merge | | `designer.html` | Visual .bas designer (node canvas) | 2718 | 📎 Reference for drag patterns | | `designer.js` | Designer JS (nodes, connections, drag) | 921 | 📎 Reference for drag | | `designer.css` | Designer styles | 500 | 📎 Reference | | `partials/tasks.html` | Alternative tasks partial | 318 | 🔄 Will be replaced by new entry | ### Backend (botserver/src) | File/Dir | Purpose | Lines | Status | |----------|---------|-------|--------| | `auto_task/autotask_api.rs` | AutoTask CRUD + execution API | 2302 | ✅ Keep (API stable) | | `auto_task/task_types.rs` | AutoTask data types | 423 | ✅ Keep | | `auto_task/task_manifest.rs` | Manifest tracking (progress tree) | 977 | ✅ Keep | | `auto_task/app_generator.rs` | App generation from LLM | 3587 | ✅ Keep | | `auto_task/intent_classifier.rs` | Intent classification | 1200+ | ✅ Keep | | `auto_task/intent_compiler.rs` | Intent → plan compilation | 900+ | ✅ Keep | | `auto_task/mod.rs` | Routes + WebSocket handlers | 293 | 🔧 Add new agent/workspace endpoints | | `tasks/task_api/handlers.rs` | Task CRUD handlers | 393 | 🔧 Extend with agent-aware responses | | `tasks/task_api/html_renderers.rs` | HTML card rendering | 700+ | 🔧 Update HTML to new design | | `tasks/types.rs` | Task data types | 223 | 🔧 Add agent fields | | `tasks/scheduler.rs` | Task scheduler (cron etc.) | 503 | ✅ Keep | | `designer/workflow_canvas.rs` | Workflow design types | 421 | 📎 Reference | | `designer/designer_api/` | Designer API handlers | ~200 | 📎 Reference | --- ## 3. Implementation Phases ### Phase 0: Terminology Rename (Mantis → Tasks/Agent) **Scope**: All UI references **Effort**: ~30 min | What | Where | Change | |------|-------|--------| | "Mantis #1" | All HTML templates | → "Agent #1" | | "MANTIS MANAGER" | Task cards | → "AGENT MANAGER" | | Mantis logo/icon | Top bar, cards | → Remove, use ⚡ or 🤖 icon | | "mantis" CSS classes | tasks CSS | → Rename to `agent-*` | | Variable names | tasks.js, autotask.js | → `agent*` where needed | **Files to modify**: - `botui/ui/suite/tasks/tasks.html` — template references - `botui/ui/suite/tasks/tasks.js` — variable names - `botui/ui/suite/tasks/tasks.css` — class names - `botui/ui/suite/tasks/autotask.html` — template references - `botui/ui/suite/tasks/autotask.js` — variable names - `botserver/src/tasks/task_api/html_renderers.rs` — server-rendered HTML --- ### Phase 1: Top-Left Mini Bar (Fixed) **Scope**: New component added to `desktop.html` **Effort**: ~45 min Create a fixed top-left panel (anchored above sidebar) matching screenshot: ``` ┌──────────────────────┐ │ Tasks ⚙️ 👤 │ └──────────────────────┘ ``` #### 1.1 New file: `botui/ui/suite/partials/minibar.html` ```html
Tasks
``` #### 1.2 CSS additions in `desktop.html