feat(site): promote AI settings to a top-level section#25582
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0f55661ce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <SidebarNavItem href="/ai/settings/governance"> | ||
| AI Governance | ||
| </SidebarNavItem> |
There was a problem hiding this comment.
Gate AI Governance link by deployment-config permission
AISettingsSidebarView now always renders the AI Governance entry, but the target route is wrapped in DeploymentConfigProvider (router.tsx) which immediately fetches deployment config and renders an error when that call is forbidden (DeploymentConfigProvider.tsx). A user who has viewAnyAIProvider but lacks viewDeploymentConfig can now click this sidebar item and land on an error state instead of a permitted page, so this nav item should be conditionally shown (or the route should enforce permission up front).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in the amended commit. AISettingsSidebar now reads permissions from useAuthenticated() and threads it into AISettingsSidebarView, which gates the AI Governance entry behind permissions.viewDeploymentConfig. Users with only viewAnyAIProvider no longer see the link.
Reply from Coder Agents on behalf of Jake Howell.
| <SidebarNavItem href="/agents/settings/agents"> | ||
| <div className="flex flex-row items-center gap-1"> | ||
| Manage Coder Agents <ArrowUpRightIcon size={16} /> | ||
| </div> | ||
| </SidebarNavItem> |
There was a problem hiding this comment.
Hide Manage Coder Agents link for non-admin AI viewers
The new Manage Coder Agents cross-link is rendered unconditionally in the AI settings sidebar, but /agents/settings/agents is permission-gated by RequirePermission with editDeploymentConfig in AgentSettingsAgentsPage.tsx. Users who can view AI providers without deployment-edit rights will see this link and be routed to an unauthorized page, which is a regression from the previous deployment sidebar behavior where this link was gated by permissions.editDeploymentConfig.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in the amended commit. The Manage Coder Agents cross-link is now gated by permissions.editDeploymentConfig, mirroring the RequirePermission check on /agents/settings/agents and the previous deployment-sidebar behavior.
Reply from Coder Agents on behalf of Jake Howell.
f0f5566 to
a82094b
Compare
14a62f7 to
3aac253
Compare
3aac253 to
c24e4da
Compare
a82094b to
6ddca33
Compare
2a02336 to
e6b7ad4
Compare
6ddca33 to
954e646
Compare
Documentation CheckNo documentation changes are needed for this PR. This PR reorganizes the UI routing to move AI Governance and related settings from the sidebar to a dedicated section. This is a UX improvement that makes AI settings more discoverable. Analysis:
Automated review via Coder Agents |
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.
954e646 to
e4ad5fe
Compare

Linear: DEVEX-355
Fifth and final PR in a 5-PR stack splitting #25328. Surfaces the AI settings section in the dashboard chrome and moves the existing AI Governance page out of
/deployment.Navbar/NavbarView/DeploymentDropdowngain acanViewAISettingsprop sourced from theviewAnyAIProviderpermission added in PR 2. The deployment dropdown gets a new AI entry that links to/ai/settings.DeploymentSidebarViewdrops the AI-related entries that now live under/ai/settings.AISettingsSidebarViewexpands to include AI Governance and a cross-section link to Manage Coder Agents.router.tsxremoves the/deployment/ai-governanceroute and mounts the matching/ai/settings/governancechild route under the new AI settings layout.ChatsSidebarsettings panel repoints the Providers link from/deployment/ai-providersto/ai/settings.Stack
Replaces #25328 once the stack lands.