Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(site): show Manage agents link to organization model admins - #28637

Merged
ethanndickson merged 1 commit into
mainfrom
fix/agents-sidebar-manage-link
Aug 26, 2026
Merged

fix(site): show Manage agents link to organization model admins#28637
ethanndickson merged 1 commit into
mainfrom
fix/agents-sidebar-manage-link

Conversation

@ethanndickson

Copy link
Copy Markdown
Member

The Agents settings panel only showed the Manage agents link to users with editDeploymentConfig, even though the Coder Agents page it links to (/ai/settings/coder-agents) already admits organization model admins, as does the AI settings sidebar. Organization model admins had no way to discover the page from the Agents settings panel.

Gate the link on a new canAccessCoderAgentsSettings helper (deployment edit access or any chat model config access), threaded as a separate canManageAgentSettings prop through AgentsPageLayout, ChatsSidebar, and SettingsPanel. isAdmin is left untouched because it also controls API-key item visibility and the provider configs query.

Refs CODAGT-74.

Implementation plan (Coder Agents)

Bug: hidden Manage agents link

Current behavior:

  • AgentsPageLayout.tsx defines agents administration as permissions.editDeploymentConfig and threads it as isAdmin through ChatsSidebar.
  • SettingsPanel.tsx shows Manage agents only when isAdmin.
  • CoderAgentsPage.tsx already allows organization model administrators, and fix: move organization model overrides from Models to Coder Agents settings #28473 explicitly intended the page and sidebar entry to support deployment access or organization model access.

Design:

  • Add canAccessCoderAgentsSettings(permissions) in site/src/modules/permissions/index.ts, defined as deployment edit access or canAccessAnyChatModelConfig(permissions).
  • Add a separate canManageAgentSettings prop through AgentsPageLayout, ChatsSidebar, and SettingsPanel.
  • Do not widen isAdmin, because it also controls API-key visibility and provider queries.

Tests:

  • ChatsSidebar story where isAdmin is false and organization model access is true: the link appears and the API-key item stays hidden.
  • AgentsPageLayout story with MockNoPermissions plus editAnyChatModelConfig: the link appears through the full permission-driven flow.
  • The plain-member denial stories stay green.

Generated by Coder Agents on behalf of @ethanndickson.

@linear-code

linear-code Bot commented Aug 26, 2026

Copy link
Copy Markdown

CODAGT-74

@ethanndickson
ethanndickson marked this pull request as ready for review August 26, 2026 13:32
The Agents settings panel gated the Manage agents link on
editDeploymentConfig, but the Coder Agents page it links to already
admits organization model admins. Gate the link on a new
canAccessCoderAgentsSettings helper (deployment edit access or any
chat model config access) threaded as a separate prop, leaving
isAdmin untouched for API-key visibility and provider queries.
@ethanndickson
ethanndickson force-pushed the fix/agents-sidebar-manage-link branch from bcc671c to 05e4151 Compare August 26, 2026 13:32
@ethanndickson
ethanndickson enabled auto-merge (squash) August 26, 2026 13:42
@ethanndickson
ethanndickson merged commit 0c0e605 into main Aug 26, 2026
26 checks passed
@ethanndickson
ethanndickson deleted the fix/agents-sidebar-manage-link branch August 26, 2026 13:45
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants