Skip to content

feat: show the prebuilds user in the Workspaces Owner filter - #31827

Merged
ethanndickson merged 3 commits into
mainfrom
ethan/prebuilds-owner-filter
Nov 12, 2026
Merged

ethanndickson merged 3 commits into
mainfrom
ethan/prebuilds-owner-filter

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Closes CLIENT-267

All prebuilt workspaces belong to the prebuilds system user, and the docs tell admins to find them with owner:prebuilds. However, the Owner filter on the Workspaces page never offers prebuilds, as its options come from GET /api/v2/users, which hides system users. There was no way to ask for them either, as the users search rejected include_system:true.

So, the users search now accepts include_system:true, and the Owner filter sends it. Without the term, /users behaves exactly as before, and you still only get back users you're allowed to read.

The other endpoints that share the users search (org members, group members and the MCP ACL picker) now accept the term too, but they still hide system users. The template ACL picker reuses the /users handler, so it'll list prebuilds if you ask for it.

image

@linear-code

linear-code Bot commented Nov 6, 2026

Copy link
Copy Markdown

CLIENT-267

@ethanndickson
ethanndickson marked this pull request as ready for review November 6, 2026 03:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 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-11-06T03:20:37.849767Z 5195e84 Draft marked ready
ℹ️ 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.

Prebuilt workspaces belong to the `prebuilds` system user, but the
Owner filter gets its options from the users API, which hides system
users. The users search now accepts `include_system:true`, and the
Owner filter sends it.

Closes CLIENT-267
@ethanndickson
ethanndickson force-pushed the ethan/prebuilds-owner-filter branch from b521651 to 5368e17 Compare November 12, 2026 12:28
@ethanndickson
ethanndickson temporarily deployed to main November 12, 2026 12:28 — with GitHub Actions Inactive
@coderagents

coderagents Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Documentation Check

Blocking

  • docs/templates/extending-templates/prebuilt-workspaces.md (open) - The page that teaches admins how to find prebuilt workspaces documents only the owner:prebuilds search term. This PR adds include_system:true to the Workspaces page's Owner filter query, which makes the prebuilds system user selectable from the Owner filter dropdown, a second and easier path to the same outcome that the page never mentions. Add a sentence at line 102 noting you can also select prebuilds as an owner from the Owner filter dropdown.
  • docs/admin/users/index.md (open) - This PR adds include_system as a new accepted token on the general users search (/api/v2/users, used by the Users page and the Workspaces Owner filter). The "User filtering" section enumerates this query's syntax (status, role, login_type, service_account, and so on) but has no entry for include_system. Add a bullet after service_account (around line 201): "include_system - Can be true to include system users, such as the prebuilds user, in the results. Defaults to false."
Findings for agents
- id: coverage-1
  merged_with: learner-1
  persona: coverage
  class: missing
  blocking: true
  file: docs/templates/extending-templates/prebuilt-workspaces.md
  line: 102
  quote: "![A prebuilt workspace in the dashboard](../../images/admin/templates/extend-templates/prebuilt/prebuilt-workspaces.png) _Note the search term `owner:prebuilds`._"
  evidence:
    - site/src/pages/WorkspacesPage/filter/categoryOptions.tsx:118-123
    - docs/templates/extending-templates/prebuilt-workspaces.md:100-102
  rule: null
  problem: This PR adds `include_system:true` to the Workspaces page's Owner filter query, which makes the `prebuilds` system user (and other system users) selectable from the dropdown. The page that teaches admins how to find prebuilt workspaces documents only the `owner:prebuilds` search term and never mentions this new dropdown path.
  fix: In the sentence at line 102, add something like "You can also select `prebuilds` as an owner directly from the Owner filter dropdown." alongside the existing note about the `owner:prebuilds` search term.
  verified: true

- id: coverage-2
  persona: coverage
  class: missing
  blocking: true
  file: docs/admin/users/index.md
  line: 200-201
  quote: "- `service_account` - Can be either `true` to only include service accounts or `false` to filter them out.\n  If omitted, both service and regular accounts and are returned."
  evidence:
    - coderd/searchquery/search.go:232
    - coderd/users.go:406
    - docs/admin/users/index.md:167-201
  rule: null
  problem: This PR adds `include_system:true` as a new accepted token on the general users search (`/api/v2/users`, used by the Users page and the Workspaces Owner filter). The conceptual guide at docs/admin/users/index.md enumerates this endpoint's filter syntax (status, role, login_type, service_account, etc.) and is now incomplete: it has no entry for include_system, the only prose documentation of this query's grammar.
  fix: Add a bullet to the filter list in docs/admin/users/index.md (after service_account, around line 201): "- `include_system` - Can be `true` to include system users, such as the `prebuilds` user, in the results. Defaults to `false`."
  verified: true

Automated review via Coder Agents. Reply to a finding's thread with the reason if the finding is wrong.

@ethanndickson
ethanndickson merged commit 73cf6bf into main Nov 12, 2026
28 of 29 checks passed
@ethanndickson
ethanndickson deleted the ethan/prebuilds-owner-filter branch November 12, 2026 23:59
@ethanndickson
ethanndickson temporarily deployed to main November 12, 2026 23:59 — with GitHub Actions Inactive
@ethanndickson
ethanndickson temporarily deployed to docs-preview November 12, 2026 23:59 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 12, 2026

This branch was previously deployed

2 inactive deployments
main — 5368e17e Deployed Nov 12, 2026 by ethanndickson via cla #255411
docs-preview — 5368e17e Deployed Nov 12, 2026 by ethanndickson via cleanup #16
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