Skip to content

feat: let organization members list the plugin packs they may enable - #224

Merged
ibetitsmike merged 173 commits into
mainfrom
mike/plugin-packs-11a-member-pack-list
Nov 12, 2026
Merged

ibetitsmike merged 173 commits into
mainfrom
mike/plugin-packs-11a-member-pack-list

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Xum opened this PR on behalf of @ibetitsmike.

Ordinary organization members can enable plugin packs on their chats and chat projects, but they could not list the packs to enable. GET /api/v2/chats/fork/organizations/{organization}/plugin-packs reads the organization skill object that packs reuse, which plain members cannot read, and the denial comes back as a 404. The project dialog (#212) and the chat pill (#213) then showed only packs that were already enabled.

This adds GET /api/v2/chats/fork/organizations/{organization}/available-plugin-packs. It returns only id, name and commit_sha for each installed pack, the same ForkEnabledPluginPack rows the enablement endpoints already return. Source URLs, host allowlists and pack files stay admin-only. The route sits behind the same fork-plugin-packs experiment gate as the other plugin pack routes, and the handler checks organization membership before its system-restricted query, so a user outside the organization gets 404 even with a site-wide role that can read every organization. ForkPluginPackToggles now lists packs from this endpoint, so the 403/404 "only enabled packs" fallback is gone.

Validation (on b737035, except the docs tests, last run on 810e44f before the membership fix, which changed no routes):

  • go build ./coderd/... ./enterprise/... ./codersdk/..., go vet ./codersdk/ ./coderd/, go test -run 'TestForkPluginPackEnablement|TestForkPluginPacks|TestForkChatRoutes' ./coderd/ and the EndpointsDocumented/TestSwagger tests in ./coderd/coderdtest and ./enterprise/coderd/coderdenttest pass in a container.
  • biome check, tsc, the affected Vitest files, oxlint and lint:compiler pass on the site changes in a container.

Fixes #215. Stacked on #213.

…manage-ui

# Conflicts:
#	site/src/pages/AISettingsPage/ForkPluginPacksPage/ForkPluginPacksPage.test.tsx
#	site/src/pages/AISettingsPage/ForkPluginPacksPage/ForkPluginPacksTableView.stories.tsx
…11a-member-pack-list

# Conflicts:
#	site/src/api/queries/forkPluginPackEnablement.ts
#	site/src/pages/AgentsPage/components/ForkPluginPackToggles.tsx
#	site/src/pages/AgentsPage/components/ProjectPage/ForkProjectPluginPacksDialog.stories.tsx
…mpty list on refetch error

Cover Retry with a Vitest test and add a story with the organization picker.
@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum requested this review on behalf of @ibetitsmike.

@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: 314c946d06

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

@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum requested this review on behalf of @ibetitsmike.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 99745221d8

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

…chat-pill

# Conflicts:
#	site/src/api/queries/forkPluginPackEnablement.ts
#	site/src/pages/AgentsPage/components/ForkPluginPackToggles.test.tsx
@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum requested this review on behalf of @ibetitsmike.

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

ℹ️ 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 coderd/fork_plugin_pack_enablement.go Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum requested this review on behalf of @ibetitsmike.

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

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

Base automatically changed from mike/plugin-packs-11-chat-pill to main November 12, 2026 03:29
…-member-pack-list

# Conflicts:
#	site/src/pages/AgentsPage/components/ForkComposerSlot.test.tsx
#	site/src/pages/AgentsPage/components/ForkPluginPackToggles.test.tsx
@ibetitsmike
ibetitsmike merged commit 52c2534 into main Nov 12, 2026
9 checks passed
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum merged this PR on behalf of @ibetitsmike.

Lead merge check on head 8ee072ae4a: fork-ci run 43148622361 (pull_request) green; the PR diff against main has the same patch-id (c8767742d1) as the Codex-reviewed diff 03a6fbcba1..b737035538 (review 5868293459, one polish finding answered and resolved); 0 open threads; frontend-deep-review r7; behind fork-plugin-packs. Fixes #215.

@ibetitsmike
ibetitsmike deleted the mike/plugin-packs-11a-member-pack-list branch November 12, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(coderd,site): ordinary members get 404 listing plugin packs and cannot discover packs to enable

1 participant