From cc008951dbda26da25f61b35f8bb9b1d5e447f0a Mon Sep 17 00:00:00 2001 From: Gabriel Jablonski Date: Thu, 16 Apr 2026 02:27:16 -0300 Subject: [PATCH] fix(sidebar): improve active child route matching logic (#13121) --- .../dashboard/components-next/sidebar/SidebarGroup.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/javascript/dashboard/components-next/sidebar/SidebarGroup.vue b/app/javascript/dashboard/components-next/sidebar/SidebarGroup.vue index 812da812a..048a99cf8 100644 --- a/app/javascript/dashboard/components-next/sidebar/SidebarGroup.vue +++ b/app/javascript/dashboard/components-next/sidebar/SidebarGroup.vue @@ -158,9 +158,11 @@ const activeChild = computed(() => { return rankedPage ?? activeOnPages[0]; } - return navigableChildren.value.find( - child => child.to && route.path.startsWith(resolvePath(child.to)) - ); + return navigableChildren.value.find(child => { + if (!child.to) return false; + const childPath = resolvePath(child.to); + return route.path === childPath || route.path.startsWith(`${childPath}/`); + }); }); const hasActiveChild = computed(() => {