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

Skip to content

fix(site): remove member-facing Models nav item - #28772

Merged
ethanndickson merged 1 commit into
mainfrom
nav-p642
Aug 31, 2026
Merged

fix(site): remove member-facing Models nav item#28772
ethanndickson merged 1 commit into
mainfrom
nav-p642

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Aug 31, 2026

Copy link
Copy Markdown
Member

Members with model access but no AI settings permissions got a dedicated top-level Models item in the navbar. The chat model selector already shows which models are available, so this removes the dashboard entry point entirely.

Also drops the per-organization chat models fan-out the navbar performed on every dashboard load just to decide whether to render the link. Admins still reach the models page via Admin settings → AI.

@ethanndickson ethanndickson changed the title fix(site/src/modules/dashboard/Navbar): move member Models link into settings dropdown fix(site/src/modules/dashboard/Navbar): remove member-facing Models entry point Aug 31, 2026
@ethanndickson ethanndickson changed the title fix(site/src/modules/dashboard/Navbar): remove member-facing Models entry point fix(site): remove member-facing Models nav item Aug 31, 2026
@ethanndickson
ethanndickson marked this pull request as ready for review August 31, 2026 09:52
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-31T10:04:26.600722Z c22a5c3 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: c22a5c36c0

ℹ️ 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 thread site/src/modules/dashboard/Navbar/Navbar.tsx
Comment thread site/src/modules/dashboard/Navbar/NavbarView.stories.tsx
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

re: Preserve AI Navigation for organization model admins

Not a real issue - the premise that org-scoped model admins have canViewSiteWideAISettings === false is incorrect.

canViewSiteWideAISettings includes canAccessAnyChatModelConfig(permissions), which checks viewAnyChatModelConfig / createAnyChatModelConfig / etc. Despite living in the site-wide Permissions object, these are any_org: true authorization checks (site/permissions.json):

"viewAnyChatModelConfig": {"object": {"resource_type": "chat_model_config", "any_org": true}, "action": "read"}

Per the RBAC policy (coderd/rbac/policy.rego) and rbac.Object.AnyOrgOwner docs, an any_org check passes if the actor holds the permission in any single organization. So a user whose only model-management grant is org-scoped still gets canAccessAnyChatModelConfig === true → canViewSiteWideAISettings === true → canViewAISettings === true, and the Admin settings → AI entry renders for them. Their navbar path into /ai/settings is unchanged by this PR.

The removed link's own gating confirms this: canViewModels = !canViewAISettings && ... meant the Models link never rendered for org model admins in the first place - they were already covered by the dropdown. The only users losing the entry point are plain members with zero model-config permissions, which is the intended behavior (they see available models in the chat model selector).

Folding accessible-model orgs into the canViewAISettings gate would regress the original complaint by surfacing the Admin settings dropdown for every member of any org with models.

re: Add Storybook Coverage for the removed Models entry

Declining this one. The deleted stories existed solely to exercise the canViewModels prop, which this PR removes from NavbarView and MobileMenu entirely - after this change, "member with model access" is not a representable state at the component level, so there is no code path left for a story to cover.

A negative assertion ("Models is absent") wouldn't guard a live invariant: the link isn't conditionally hidden, the code is deleted. Such a story only fails if someone deliberately reintroduces the feature (and would update the story anyway), or false-fails if an unrelated "Models" entry is legitimately added later.

The "neighboring navigation stays available" concern is already covered: ForMember / Member render the exact member state with adminPermissions: {}, and the ForAdmin / OrgAdmin / Admin stories open the dropdown and mobile menu through real interactions via play functions. Any regression hiding unrelated entries would fail those existing stories and their snapshots.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: c22a5c36c0

ℹ️ 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".

Members with model access but no AI settings permissions got a
dedicated top-level Models item in the navbar. The chat model selector
already shows available models, so remove the dashboard entry point
entirely. Also drops the per-organization chat models fan-out the
navbar performed on every dashboard load.
@ethanndickson

Copy link
Copy Markdown
Member Author

Pixel failure and changes are unrelated

@ethanndickson
ethanndickson merged commit 3d3b36f into main Aug 31, 2026
26 checks passed
@ethanndickson
ethanndickson deleted the nav-p642 branch August 31, 2026 15:50
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 31, 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