🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(ui): hide project-level routes in project overview main menu, disable active project in cmd+k menu (#5303)
Marc Klingenfe00afa62789
diff --git a/web/src/components/command-k-menu.tsx b/web/src/components/command-k-menu.tsxindex 58f3f8cc30..9c659ba3e4 100644--- a/web/src/components/command-k-menu.tsx+++ b/web/src/components/command-k-menu.tsx@@ -36,16 +36,21 @@ export function CommandKMenu({);const navItems = mainNavigation- .flatMap((item) => [- {- title: item.title,- url: item.url,- },- ...(item.items?.map((child) => ({- title: `${item.title} > ${child.title}`,- url: child.url,- })) ?? []),- ])+ .flatMap((item) => {+ if (item.items) {+ // if the item has children, return the children and not the parent+ return item.items.map((child) => ({+ title: `${item.title} > ${child.title}`,+ url: child.url,+ }));+ }+ return [+ {+ title: item.title,+ url: item.url,+ },+ ];+ }).filter((item) =>Boolean(item.url) && // no empty urls@@ -114,6 +119,7 @@ export function CommandKMenu({key={item.url}value={item.title}keywords={item.keywords}+ disabled={item.active}onSelect={() => {router.push(item.url);capture("cmd_k_menu:navigated", {@@ -176,6 +182,7 @@ export const useNavigationItems = () => {org.projects.map((proj) => ({title: `${org.name} > ${proj.name}`,url: getProjectPath(proj.id),+ active: router.query.projectId === proj.id,keywords: ["project",org.name.toLowerCase(),diff --git a/web/src/components/layouts/routes.tsx b/web/src/components/layouts/routes.tsxindex 4d3e29f5d2..4bb1400f9c 100644--- a/web/src/components/layouts/routes.tsx+++ b/web/src/components/layouts/routes.tsx@@ -59,7 +59,7 @@ export const ROUTES: Route[] = [},{title: "Tracing",- pathname: "",+ pathname: `/project/[projectId]/traces`,icon: ListTree,items: [{@@ -83,7 +83,7 @@ export const ROUTES: Route[] = [{title: "Evaluation",icon: Lightbulb,- pathname: "",+ pathname: `/project/[projectId]/annotation-queues`,entitlements: ["annotation-queues", "model-based-evaluations"],projectRbacScopes: ["annotationQueues:read", "evalJob:read"],items: [