Skip to content

feat(site/src): choose an organization when creating a project - #30181

Merged
jaaydenh merged 274 commits into
mainfrom
project-create-organization-select
Oct 6, 2026
Merged

jaaydenh merged 274 commits into
mainfrom
project-create-organization-select

Conversation

@jaaydenh

@jaaydenh jaaydenh commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #29583, the sidebar PR at the top of f0ssel's #30377 → #30378 → #30379 → #29583 stack. Merge after #29583.

The project creation modal now has a required Organization dropdown after Project name and Description, and it creates the project in the organization you choose. Until now the sidebar always used the default organization, or the first accessible organization when there was no default, and never showed the choice. That organization is still preselected, and the dropdown appears even when there is only one organization. The create copy is now Create a project, Project name, and Create project. Create project stays disabled until the form has been edited, so it no longer flashes enabled while the initial validation runs.

The selected organization goes only into the URL (/api/experimental/organizations/{organizationId}/chats/projects). The request body is still limited to name, description, and icon, so the backend is unchanged. Creation is blocked when no organization is available or the selected one has been removed. Editing a project is unchanged: it has no organization field, and it keeps the existing labels, Save button, and update request.

This builds on the ChatProjectDialog from #30377 and keeps its validation: code-point length limits, trimmed values, and Save disabled for an edit that changes nothing. ChatProjectFormValues gains an optional organizationId, which the dialog sets only when creating.

OrganizationAutocomplete now forwards aria-invalid and aria-describedby to its trigger, which lets FormField link its error and description text to the dropdown. The hidden emoji picker that IconField preloads is now inert, so its controls are no longer in the tab order.

The ChatProjectDialog stories cover the default, open dropdown, single organization, no available organizations, unavailable selection, invalid name, submitting, mutation error, edit, and narrow viewport states. They replace #30377's NewProject, EditProject, and SaveError stories, which covered the same states.

# Conflicts:
#	docs/reference/api/schemas.md
# Conflicts:
#	coderd/database/db2sdk/db2sdk.go
#	coderd/database/dbauthz/dbauthz.go
#	coderd/database/dbmetrics/querymetrics.go
#	coderd/database/dbmock/dbmock.go
#	coderd/database/modelmethods.go
#	coderd/database/querier.go
#	coderd/database/querier_test.go
#	coderd/database/queries.sql.go
…ories

# Conflicts:
#	coderd/database/dbauthz/dbauthz.go
#	coderd/database/dbmetrics/querymetrics.go
#	coderd/database/querier.go
#	coderd/database/querier_test.go
#	coderd/database/queries.sql.go
#	coderd/x/chatd/memory_extract_internal_test.go
#	coderd/x/chatd/projectmemory_extract.go
…olidation

# Conflicts:
#	coderd/database/dbauthz/dbauthz.go
#	coderd/database/dbmetrics/querymetrics.go
#	coderd/database/querier.go
#	coderd/x/chatd/memory_extract.go
…emories

Memory permissions now derive from the project owner and ACL, memory tools
and the extractor use scope-neutral names, and the extraction cursor table
is chat_memory_cursors.
…onsolidation

Drops personal memory: consolidation now runs only for project memory and
its journal follows the project ACL.
The chat sharing popover now takes a chat or project target, and the
project page shows a Share control to users who may share it.
Sharing (#29597) is parked; memory permissions follow the project owner
only and the memory migration returns to 000599.
…onsolidation

Sharing is out of the stack; the consolidation migration returns to 000600.
Sharing (#29597) is parked; the sharing popover is chat-only again.
…ers-resync

# Conflicts:
#	site/src/pages/AgentsPage/components/ChatsSidebar/chats/ChatsPanel.tsx
…ct folder review feedback

- Show an empty state when every visible chat is filed in a project.
- Reuse the chat list empty-state copy for empty folders.
- Make the projects loading and error props required.
- Rename ProjectDialogMode to ProjectDialogState.
- Add mock prefixes to new test fixtures.
- Add stories for loading, error, and empty emoji-icon folder states.
…lar empty state when every chat is in a project

Project chats live only in their folders, so the Chats section uses its
usual empty-state copy when nothing outside a project remains.
…folders open when navigating between projects

A folder that was open because its project was active now stays open
when the user opens a chat in another project. Only an explicit toggle
collapses a folder.
…t folders with the chat list

The Projects section no longer has its own bounded scroll area. It sits
in the sidebar's scroll area above the Chats section, so expanding a
folder pushes the chats down.
…coder/coder into f0ssel/chat-projects-ui-folders

# Conflicts:
#	site/src/pages/AgentsPage/components/ChatsSidebar/chats/ChatsPanel.tsx
…s empty state while projects load

When every chat belongs to a project, those chats are held back until
the project list loads. The Chats section showed "No agents yet" in the
meantime, which falsely told users their chats did not exist.
… into tmp-30181

# Conflicts:
#	site/src/pages/AgentsPage/components/ChatsSidebar/ChatsSidebar.test.tsx
#	site/src/pages/AgentsPage/components/ChatsSidebar/ChatsSidebar.tsx
#	site/src/pages/AgentsPage/components/ChatsSidebar/dialogs/ChatProjectDialog.test.tsx
#	site/src/pages/AgentsPage/components/ChatsSidebar/dialogs/ChatProjectDialog.tsx
…the project dialog compilable by the React Compiler
Base automatically changed from f0ssel/chat-projects-ui-folders to main October 6, 2026 15:57
@jaaydenh
jaaydenh merged commit c28dc3c into main Oct 6, 2026
27 checks passed
@jaaydenh
jaaydenh deleted the project-create-organization-select branch October 6, 2026 16:14
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 6, 2026
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