Repository navigation
feat: add chat projects API - #29242
Conversation
Docs previewCheck off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. |
fca955e to
1970f72
Compare
1970f72 to
d6ed44c
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6ed44cbf1
ℹ️ 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".
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
fbb6176 to
9471d67
Compare
…cts experiment Adds a lightweight chat_projects table and a nullable chats.project_id binding so agent chats can be grouped inside an organization-scoped project. Chats stay independent by default; deleting a project detaches its chats instead of deleting them. Backend: chat_project RBAC resource (org members read/create, creators and org admins update/delete), audited CRUD under /api/experimental/chats/projects, project_id on chat create/update and list filter, codersdk client methods. Frontend: experiment-gated Projects sidebar section with create/edit/ delete dialogs, /agents/projects/:projectId page, new-chat-in-project via ?project=, and a Move to project action in the chat menus.
Single-project responses previously scanned the organization's project list to recover chat_count. A dedicated count query shares the list predicate, and the converter now requires the count so no response can silently report zero.
9471d67 to
aef0902
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aef090294b
ℹ️ 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".
Silently dropping project_id returned every chat as if it were the project's contents. The list now fails the same way create and update do.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6149fa0d3
ℹ️ 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".
# Conflicts: # docs/reference/api/schemas.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9ac776630
ℹ️ 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".
…ct name and description length
# Conflicts: # docs/admin/security/audit-logs.md
…-access and gate project binding on the experiment only
# Conflicts: # coderd/database/queries.sql.go # coderd/rbac/roles.go # docs/reference/api/chats.md # docs/reference/api/schemas.md
- Move chat project CRUD under /api/experimental/organizations/{organization}/chats/projects
and keep a user-scoped list at /api/experimental/chats/projects.
- Identify projects by ID only: drop the per-owner name unique index and
409 handling, and break list-order ties by ID.
- Return field-specific validation errors.
- Report unreadable or foreign projects on chat creation as 404.
Listing is user-scoped like chats, so the projects page loads every
project in one request. Create, get, update, and delete stay under
/api/experimental/organizations/{organization}/chats/projects.
Renumber the chat projects migration to 000605 after main added 000604. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Renumber the chat projects migration to 000606 after main added 000605. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Count a user's projects across organizations under a per-owner advisory lock so concurrent creates cannot overshoot, and answer 409 at the cap. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
chat-projects(off by default). First of three stacked PRs: feat: add shared project memory API for chats in a project #29301 (memory), feat: add chat project folders to the sidebar #29583 (UI). This PR is API only; the screenshots below are from the UI in feat: add chat project folders to the sidebar #29583./api/experimental/organizations/{organization}/chats/projects/{project}.GET /api/experimental/chats/projectslists the caller's projects across all organizations.project_idon chat create and as a chat list filter. A chat joins a project only at creation; there is no move.iconURL (usually an emoji image under/emojis) is capped at 256 characters and audited.owner_id. Members may only create their own, and a chat can only be bound to a project its owner owns. An unreadable or foreign project on chat create answers 404 so IDs cannot be probed; a project from another organization answers 400.agents-accessrole next to chats (after feat: restore agents-access as a default organization role #30004), so whoever can use Coder Agents can use projects. Owners and org admins reach every project.Examples
Create a project in an organization:
{ "id": "7c0e4a3e-5b1f-4f7d-9a51-2f3c8f6d2b10", "organization_id": "bb640d07-ca8a-4869-b6bc-ae61ebb2fda1", "owner_id": "0ed9befc-4911-4ccf-a8e2-559bf72daa94", "name": "Platform", "description": "Infra and deploy work", "icon": "/emojis/1f680.png", "created_at": "2026-09-30T15:04:05Z", "updated_at": "2026-09-30T15:04:05Z" }List the caller's projects across organizations with
GET /api/experimental/chats/projects(an array of the object above). Update withPATCH .../chats/projects/{project}and any ofname,description,icon; delete withDELETE, which detaches its chats.Create a chat in the project, and list only its chats:
At the limit:
Screenshots (UI from #29583)
Generated with Coder Agents on behalf of @f0ssel.