From bdc0480e621ca4975b7de0db405cbc1b67170e0e Mon Sep 17 00:00:00 2001 From: Tyler Wince Date: Wed, 4 Mar 2026 20:20:21 -0700 Subject: [PATCH] fix(ui): render sub-goals in goal detail tree --- ui/src/components/GoalTree.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/components/GoalTree.tsx b/ui/src/components/GoalTree.tsx index fe20ee64..116b1668 100644 --- a/ui/src/components/GoalTree.tsx +++ b/ui/src/components/GoalTree.tsx @@ -92,7 +92,8 @@ function GoalNode({ goal, children, allGoals, depth, goalLink, onSelect }: GoalN } export function GoalTree({ goals, goalLink, onSelect }: GoalTreeProps) { - const roots = goals.filter((g) => !g.parentId); + const goalIds = new Set(goals.map((g) => g.id)); + const roots = goals.filter((g) => !g.parentId || !goalIds.has(g.parentId)); if (goals.length === 0) { return

No goals.

;