{#if graphState.error}
{:else if graphState.loading}
{:else if !displayTree}
No task tree available for this goal.
{:else}
Task Hierarchy
{#if taskStats}
{taskStats.completed} / {taskStats.total} completed
{/if}
{#if graphState.selectedNodeDetail}
Node Details
clearSelection()}>✕
{#if graphState.selectedNodeDetail.outgoing_edges} {@const dependsOnEdges = graphState.selectedNodeDetail.outgoing_edges.filter(([edge]) => edge.edge_type === 'dependson')} {#if dependsOnEdges.length > 0}
Dependencies
{#each dependsOnEdges as [edge, depNode] (edge.id)}
selectNode(depNode.id)}> {depNode.title} ({depNode.id})
{/each}
{/if} {/if} {#if graphState.selectedNodeDetail.incoming_edges && graphState.selectedNodeDetail.incoming_edges.length > 0}
Incoming Edges
{#each graphState.selectedNodeDetail.incoming_edges as [edge, sourceNode] (edge.id)}
{edge.edge_type}: {sourceNode.title} ({sourceNode.id})
{/each}
{/if} {#if graphState.selectedNodeDetail.outgoing_edges && graphState.selectedNodeDetail.outgoing_edges.length > 0}
Outgoing Edges
{#each graphState.selectedNodeDetail.outgoing_edges as [edge, targetNode] (edge.id)}
{edge.edge_type}: {targetNode.title} ({targetNode.id})
{/each}
{/if}
{:else}
Select a node to view details
{/if}
{#if graphState.readyTasks.length > 0}
Ready Tasks
{#each graphState.readyTasks as task (task.id)}
selectNode(task.id)} >
{task.title}
{#if nextTask && task.id === nextTask.id}
Next
{/if}
{/each}
{/if} {/if}