-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Description
Currently, the user interface for task tracking, as shown in the attached image, presents recent tasks in a flat list. While functional, this linear view becomes increasingly challenging to navigate and understand, especially when dealing with complex, multi-step operations initiated by the orchestrator and its new_task tool. This proposes enhancing the user interface with a dedicated "History" section that provides a hierarchical, visually intuitive representation of task executions, deeply inspired by the principles of Hierarchical Task Analysis (HTA).
Problem Statement
When the orchestrator executes a primary task, it often decomposes it into several inter-dependent subtasks. The current UI lacks a clear visual representation of these parent-child relationships, the sequence of execution, or the conditions under which subtasks are invoked within a larger workflow. This flat structure makes it difficult for users to:
- Trace Lineage: Determine which primary task initiated a specific subtask.
- Understand Workflow Progression: Grasp the overall flow, dependencies, and state of complex operations.
- Debug and Analyze: Pinpoint where an orchestrated workflow might have failed or encountered bottlenecks, especially when the
new_tasktool is repeatedly invoked. - Cognitive Load: The mental effort required to reconstruct the execution hierarchy from a flat list is significant, hindering efficient problem-solving and comprehension.
Proposed Solution: HTA-Inspired Hierarchical History View
A new "History" panel or section that visualizes the executed tasks and their subtasks in a tree-like structure, directly applying HTA principles. This hierarchical view would treat each primary task as a "parental node" (equivalent to a top-level goal in HTA) and any subtasks spawned by that parental task (e.g., via the orchestrator's new_task tool) as "child nodes" nested underneath.
The visualization should adopt a "three file structure visually" metaphor, which aligns well with HTA's typical tree diagrams. This would enable users to:
- Clear Task Hierarchy: Each task could be numbered hierarchically (e.g.,
1. Main Goal,1.1. Subtask A,1.1.1. Action 1,1.2. Subtask B), providing an immediate understanding of relationships. - Expand and Collapse: Allow users to expand and collapse parental tasks to focus on specific parts of a workflow, managing complexity.
- "Plans" for Execution Flow: Optionally, integrate visual or textual cues (analogous to HTA "plans") that describe the sequence or conditions of subtask execution (e.g., "Do 1 then 2 then 3," or "If X, do 2; else do 3"). This would be particularly valuable for understanding orchestrator logic.
- Status Indicators: Visually represent the status (e.g., completed, failed, running, pending) of each node directly within the tree, providing at-a-glance feedback.
- Resource/Context Details: Potentially display key information or resources associated with each task/subtask upon selection, similar to how HTA can show interrelations between tasks and roles, and what resources are needed.
Technical Analysis
Based on a preliminary analysis of the codebase, the following files and directories are relevant to this feature:
webview-ui/src/components/history/: This directory contains the core UI components for the task history.HistoryView.tsx: The main component for the history view. This will need to be modified to render a tree structure instead of a flat list.TaskItem.tsx: The component for a single task item. This will need to be modified to support a hierarchical display, including indentation and expand/collapse functionality.
webview-ui/src/context/ExtensionStateContext.tsx: The context provider for the extension's state. ThetaskHistoryin the state will need to be updated to support a hierarchical structure. This will likely involve adding aparentIdor similar field to theHistoryItemtype.packages/types/src/index.ts: TheHistoryItemtype definition will need to be updated to support a hierarchical structure. This will likely involve adding aparentIdor similar field.
By applying HTA principles to the task history visualization, Roo Code can offer a powerful, intuitive interface that significantly enhances the understanding, debugging, and management of complex, AI-orchestrated workflows. This will transform a flat list of "recent tasks" into a comprehensive "workflow history" that mirrors how complex goals are broken down and executed.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status