Skip to content

feat(site): promote AI settings to a top-level section#25582

Merged
jakehwll merged 1 commit into
mainfrom
jakehwll/DEVEX-355/05-section
May 26, 2026
Merged

feat(site): promote AI settings to a top-level section#25582
jakehwll merged 1 commit into
mainfrom
jakehwll/DEVEX-355/05-section

Conversation

@jakehwll

@jakehwll jakehwll commented May 21, 2026

Copy link
Copy Markdown
Contributor

🤖 This PR was written by Coder Agents on behalf of Jake Howell.

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 / 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.
Stack
  1. feat(site): add UI primitives for the AI settings stack #25579 jakehwll/DEVEX-355/01-primitives, primitives
  2. feat(site): add AI provider API client and query layer #25580 jakehwll/DEVEX-355/02-api, API client and query layer
  3. feat(site): add AI settings provider form components #25581 jakehwll/DEVEX-355/03-components, provider form components
  4. feat(site): add AI settings providers pages and routes #25583 jakehwll/DEVEX-355/04-pages, pages and routes
  5. jakehwll/DEVEX-355/05-section, section reshuffle (this PR)

Replaces #25328 once the stack lands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +11 to +13
<SidebarNavItem href="/ai/settings/governance">
AI Governance
</SidebarNavItem>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +15 to +19
<SidebarNavItem href="/agents/settings/agents">
<div className="flex flex-row items-center gap-1">
Manage Coder Agents <ArrowUpRightIcon size={16} />
</div>
</SidebarNavItem>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

jakehwll commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

@jakehwll jakehwll requested review from aslilac and jeremyruppel May 21, 2026 16:16
@jakehwll jakehwll changed the title feat(site/src/modules): promote AI settings to a top-level section feat(site/src): promote AI settings to a top-level section May 21, 2026
@jakehwll jakehwll force-pushed the jakehwll/DEVEX-355/05-section branch from f0f5566 to a82094b Compare May 21, 2026 16:52
@jakehwll jakehwll force-pushed the jakehwll/DEVEX-355/04-pages branch from 14a62f7 to 3aac253 Compare May 21, 2026 16:52
@jakehwll jakehwll changed the title feat(site/src): promote AI settings to a top-level section feat(site): promote AI settings to a top-level section May 21, 2026
@jakehwll jakehwll force-pushed the jakehwll/DEVEX-355/04-pages branch from 3aac253 to c24e4da Compare May 22, 2026 08:15
@jakehwll jakehwll force-pushed the jakehwll/DEVEX-355/05-section branch from a82094b to 6ddca33 Compare May 22, 2026 08:15
@jakehwll jakehwll force-pushed the jakehwll/DEVEX-355/04-pages branch 2 times, most recently from 2a02336 to e6b7ad4 Compare May 26, 2026 16:29
@jakehwll jakehwll force-pushed the jakehwll/DEVEX-355/05-section branch from 6ddca33 to 954e646 Compare May 26, 2026 16:32
@coder-tasks

coder-tasks Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Documentation Check

No 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:

  • No user-facing documentation explicitly references the old route
  • The deployment sidebar structure is not documented in user guides
  • Existing documentation for AI Governance and AI Gateway setup focuses on backend configuration via environment variables, not UI navigation
  • The route change improves discoverability without affecting documented workflows

Automated review via Coder Agents

Base automatically changed from jakehwll/DEVEX-355/04-pages to main May 26, 2026 16:38
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.
@jakehwll jakehwll force-pushed the jakehwll/DEVEX-355/05-section branch from 954e646 to e4ad5fe Compare May 26, 2026 16:41
@jakehwll jakehwll enabled auto-merge (squash) May 26, 2026 16:41
@jakehwll jakehwll merged commit d80b484 into main May 26, 2026
26 of 28 checks passed
@jakehwll jakehwll deleted the jakehwll/DEVEX-355/05-section branch May 26, 2026 16:50
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants