Skip to content

Commit efdfc81

Browse files
committed
fix(shell-docs): drop section headers from per-framework override nav
Per-framework meta.json files (mastra, langgraph, llamaindex, etc.) mirror the root tree's section names ("Getting Started", "Basics"). Passing them through buildFrameworkOverridesNav into the merged sidebar caused duplicate React keys when the merge ran — every root section collided with the override's copy of the same title. The override block is already wrapped in a single "{frameworkName}" section by mergeFrameworkNav, so nested section headers added no information anyway. Drop them at the filter step.
1 parent 56bf99b commit efdfc81

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

showcase/shell-docs/src/lib/docs-render.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,13 @@ export function buildFrameworkOverridesNav(framework: string): NavNode[] {
348348
if (children.length > 0) {
349349
filtered.push({ ...node, children });
350350
}
351-
} else {
352-
filtered.push(node);
353351
}
352+
// Intentionally drop section nodes. Per-framework meta.json files
353+
// tend to mirror the root tree's sections ("Getting Started",
354+
// "Basics", etc.) and flowing them through here would (a) collide
355+
// with root sections of the same name on React keys and (b) double
356+
// up the visual hierarchy — the override block is already wrapped
357+
// in a single `{frameworkName}` section by mergeFrameworkNav.
354358
}
355359
return filtered;
356360
}

0 commit comments

Comments
 (0)