From e4ad5fe9fb8d011f067790dac5241f75928a836b Mon Sep 17 00:00:00 2001 From: Jake Howell Date: Thu, 21 May 2026 16:09:31 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20feat(site/src/modules):=20promot?= =?UTF-8?q?e=20AI=20settings=20to=20a=20top-level=20section?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Surfaces the AI settings section in the dashboard chrome and moves the existing AI Governance page out of /deployment: - Navbar / NavbarView / DeploymentDropdown gain a canViewAISettings prop sourced from the viewAnyAIProvider permission added in PR 2. The deployment dropdown gets a new AI entry that links to /ai/settings. - DeploymentSidebarView drops the AI-related entries that now live under /ai/settings. - AISettingsSidebarView expands to include AI Governance and a cross-section link to Manage Coder Agents. - router.tsx removes the /deployment/ai-governance route and mounts the matching /ai/settings/governance child route under the new AI settings layout. - ChatsSidebar settings panel repoints the Providers link from /deployment/ai-providers to /ai/settings. --- .../dashboard/Navbar/DeploymentDropdown.tsx | 22 ++++++++++++----- site/src/modules/dashboard/Navbar/Navbar.tsx | 2 ++ .../dashboard/Navbar/NavbarView.stories.tsx | 8 +++++++ .../modules/dashboard/Navbar/NavbarView.tsx | 5 +++- .../modules/management/AISettingsSidebar.tsx | 7 ++++-- .../management/AISettingsSidebarView.tsx | 24 ++++++++++++++++++- .../management/DeploymentSidebarView.tsx | 13 +--------- .../ChatsSidebar/settings/SettingsPanel.tsx | 7 +++--- site/src/router.tsx | 8 +++---- 9 files changed, 67 insertions(+), 29 deletions(-) diff --git a/site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx b/site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx index 70c81f21dd2..6517feca268 100644 --- a/site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx +++ b/site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx @@ -15,8 +15,9 @@ interface DeploymentDropdownProps { canViewOrganizations: boolean; canViewAuditLog: boolean; canViewConnectionLog: boolean; - canViewHealth: boolean; canViewAIBridge: boolean; + canViewAISettings: boolean; + canViewHealth: boolean; } export const DeploymentDropdown: FC = ({ @@ -24,16 +25,18 @@ export const DeploymentDropdown: FC = ({ canViewOrganizations, canViewAuditLog, canViewConnectionLog, - canViewHealth, canViewAIBridge, + canViewAISettings, + canViewHealth, }) => { if ( !canViewAuditLog && !canViewConnectionLog && !canViewDeployment && !canViewOrganizations && - !canViewHealth && - !canViewAIBridge + !canViewAIBridge && + !canViewAISettings && + !canViewHealth ) { return null; } @@ -53,8 +56,9 @@ export const DeploymentDropdown: FC = ({ canViewOrganizations={canViewOrganizations} canViewAuditLog={canViewAuditLog} canViewConnectionLog={canViewConnectionLog} - canViewHealth={canViewHealth} canViewAIBridge={canViewAIBridge} + canViewAISettings={canViewAISettings} + canViewHealth={canViewHealth} /> @@ -64,9 +68,10 @@ export const DeploymentDropdown: FC = ({ const DeploymentDropdownContent: FC = ({ canViewDeployment, canViewAuditLog, - canViewHealth, canViewConnectionLog, canViewAIBridge, + canViewAISettings, + canViewHealth, }) => { return (