Skip to content

Commit 92f8e85

Browse files
JonasBaClaude Sonnet 4.6
andcommitted
fix(cmdk): Apply prefix to nested See all actions
See all items in nested search results now receive the same prefix label as their sibling actions (e.g. 'Explore → See all' instead of bare 'See all'). The :see-more key is added to prefixMap with the intermediatePath alongside the existing :source-label hint, which is unaffected. Co-Authored-By: Claude Sonnet 4.6 <noreply@example.com>
1 parent d535e85 commit 92f8e85

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

static/app/components/commandPalette/ui/commandPalette.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -726,10 +726,12 @@ function flattenActions(
726726
prefixMap.set(child.key, intermediatePath);
727727
}
728728
if (seeMore) {
729-
// Store the group label so getSourceAction can recover it for the
730-
// "See all" item even though the original section header is not emitted.
731-
// Use a distinct `:source-label` suffix so this entry is never mistaken
732-
// for a render-time prefix by makeMenuItemFromAction.
729+
// Render-time prefix for the "See all" item — same path as its siblings.
730+
prefixMap.set(`${item.key}:see-more`, intermediatePath);
731+
// Source-label hint so getSourceAction can recover the group label for
732+
// analytics/navigation even though the original section header is not
733+
// emitted. The distinct `:source-label` suffix avoids collision with the
734+
// render-time prefix entry above.
733735
prefixMap.set(`${item.key}:see-more:source-label`, [item.display.label]);
734736
}
735737
const sectionHeader = usedSectionHeaders.has(root.key)

0 commit comments

Comments
 (0)