From dd741bd1889360f3075024441da01b0726e3a7ec Mon Sep 17 00:00:00 2001 From: "blinkagent[bot]" <237617714+blinkagent[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 19:23:13 +0000 Subject: [PATCH] fix(site): only highlight Providers item on exact match in AI settings sidebar (#25700) ## Problem When visiting `/ai/settings/governance`, both **AI Governance** and **Providers** items in the AI settings subnav appear highlighted as active. ## Cause `SettingsSidebarNavItem` is built on react-router's ``, which by default treats a link as active when the current URL **starts with** the link's `to` path. Since `/ai/settings/governance` starts with `/ai/settings`, the Providers item is also marked active. ## Fix Pass `end` on the Providers nav item so it only matches when the path is exactly `/ai/settings` (the index route). The `SettingsSidebarNavItem` component already supports this prop for exactly this case. Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com> --- site/src/modules/management/AISettingsSidebarView.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site/src/modules/management/AISettingsSidebarView.tsx b/site/src/modules/management/AISettingsSidebarView.tsx index 894c824656..3e83c23ea7 100644 --- a/site/src/modules/management/AISettingsSidebarView.tsx +++ b/site/src/modules/management/AISettingsSidebarView.tsx @@ -22,7 +22,9 @@ const AISettingsSidebarView: FC = ({ AI Governance )} - Providers + + Providers + {permissions.editDeploymentConfig && (