From cbaac2bfa5247ff27b49fcec66690117b566b1b4 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Fri, 24 Apr 2026 11:21:12 +0200 Subject: [PATCH] feat(cmdk): Enter on 'key: value' query submits as attribute facet --- ui/src/components/LayoutShell.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ui/src/components/LayoutShell.tsx b/ui/src/components/LayoutShell.tsx index 7785a438..b0115ff1 100644 --- a/ui/src/components/LayoutShell.tsx +++ b/ui/src/components/LayoutShell.tsx @@ -823,12 +823,18 @@ function LayoutContent() { } else { navigate('/admin/rbac'); } - } else { - const baseParts = ['/exchanges']; - if (scope.appId) baseParts.push(scope.appId); - if (scope.routeId) baseParts.push(scope.routeId); - navigate(`${baseParts.join('/')}?text=${encodeURIComponent(query)}`); + return; } + + const facet = parseFacetQuery(query); + const baseParts = ['/exchanges']; + if (scope.appId) baseParts.push(scope.appId); + if (scope.routeId) baseParts.push(scope.routeId); + if (facet) { + navigate(`${baseParts.join('/')}?attr=${encodeURIComponent(formatAttrParam(facet))}`); + return; + } + navigate(`${baseParts.join('/')}?text=${encodeURIComponent(query)}`); }, [isAdminPage, adminSearchData, handlePaletteSelect, navigate, scope.appId, scope.routeId]); const handleSidebarNavigate = useCallback((path: string) => {