Skip to content

refactor(site): move the composer layout out of AgentCreateForm - #30291

Merged
jaaydenh merged 267 commits into
mainfrom
chat-project-page/composer-frame
Oct 6, 2026
Merged

jaaydenh merged 267 commits into
mainfrom
chat-project-page/composer-frame

Conversation

@jaaydenh

@jaaydenh jaaydenh commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

AgentCreateForm no longer takes the header/footer slots added in #30378, and no longer owns the page wrapper. The centered max-w-3xl wrapper moves into AgentCreateFormFrame, which the new-chat page, the project page, and the board draft wrap around the form. The project page renders its existing ProjectComposerHeader and ProjectComposerFooter (#30379) around the form inside the frame, so nothing changes visually. The form keeps its project prop, per-project drafts, and remount per project from #30378.

ChatDiffStats (from ChatTreeNode) and ProjectActionsMenuItems (from ProjectFolders) are moved into their own files unchanged so the redesigned project page can reuse them.

Most of the AgentCreateForm.tsx diff is re-indentation; review with whitespace hidden.


Stack (merge top to bottom). #30377 through #29583 are f0ssel's split of the original #29583, and this stack sits on #29583:

Sidebar project list with create, edit, and delete gated on the
authcheck result, a project page at /agents/projects/:projectId, new
chat in project, and move-to-project from the chat menu. Behind the
chat-projects experiment.
Collapsed memory rows expand to show the description, body, and edit
and delete controls. Delete failures surface an error alert.
Adds /agents/settings/memory with the personal memory toggle and the
per-organization memory list, and generalizes the project memory
components to serve both scopes.
Summarizes the newest successful consolidation run in one line under
the memory list.
# 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.
# Conflicts:
#	site/src/pages/AgentsPage/components/ChatsSidebar/dialogs/ChatProjectDialog.stories.tsx
#	site/src/pages/AgentsPage/components/ChatsSidebar/dialogs/ChatProjectDialog.test.tsx
#	site/src/pages/AgentsPage/components/ChatsSidebar/dialogs/ChatProjectDialog.tsx
…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.
Base automatically changed from f0ssel/chat-projects-ui-folders to main October 6, 2026 15:57
jaaydenh added a commit that referenced this pull request Oct 6, 2026
- Experiment (`chat-projects`). Top of a four-PR stack: #30377 (data
layer and project dialog) → #30378 (form organization lock) → #30379
(project page) → **this PR** (sidebar).
- **Review only the sidebar diff:**
[`f0ssel/chat-projects-ui-page...f0ssel/chat-projects-ui-folders`](f0ssel/chat-projects-ui-page...f0ssel/chat-projects-ui-folders)
(11 files). GitHub can't retarget this PR onto #30379 because #30291 is
stacked on it, so the PR view shows the whole stack against `main` until
the lower PRs merge.
- **Sidebar:** a Projects section above Chats lists the user's projects
from every organization; new projects are created in the default
organization, and an empty list says "No projects yet". An owned,
unpinned chat in a project lives in its folder instead of the date
sections. Folder menu: New chat, Edit project, Delete project.
- Chats join a project only at creation; there is no move. Memory has no
UI.

<details>
<summary>Screenshots (taken before the Oct 5 review changes)</summary>

![Sidebar
folders](https://raw.githubusercontent.com/coder/coder/f0ssel/chat-projects-assets/v3/pr1-02-sidebar-folders.png)
![Folder
menu](https://raw.githubusercontent.com/coder/coder/f0ssel/chat-projects-assets/v3/pr1-05-folder-menu.png)

</details>

<details>
<summary>Review history</summary>

The Sep 30 review threads, and where each was addressed (commit
`d9082fdf7c`):

| Thread | Change |
|---|---|
| `AgentCreatePage` JSDoc | Removed (now in #30379) |
| `ChatsSidebar` dialog trigger ref, `document.activeElement`,
`requestAnimationFrame`; `ProjectFolders` refs | Removed. Dialogs no
longer restore focus by hand; the block is regrouped into state,
create/edit and delete |
| `rowMenuEvents.ts` indirection; `ChatTreeNode` change | File deleted,
`ChatTreeNode` matches `main`, the guards are inline in `ProjectFolders`
|
| `projectChats` story fixture | Renamed `mockProjectChats` |
| `resolveOrganization` readability | Split into blank-line-separated
steps, nested ternary replaced with `if`/`else` (now in #30378) |
| `ProjectComposerHeader` vs footer location | The footer moved to its
own `ProjectComposerFooter.tsx` next to the header (#30379) |

Also fixed from the Sep 23 review and a re-audit of all of it: a
finished project delete no longer closes a newer delete dialog
(regression test added); the project-specific denial copy shows only
when chats are otherwise allowed; the sidebar lists the API's projects
without refiltering by owner; stale comments and fixture organizations
are corrected. The work is split into four PRs to address the size
finding.

</details>

---
Generated with Coder Agents on behalf of @f0ssel.

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Jaayden Halko <jaayden.halko@gmail.com>
@jaaydenh
jaaydenh merged commit 7d1191c into main Oct 6, 2026
27 checks passed
@jaaydenh
jaaydenh deleted the chat-project-page/composer-frame branch October 6, 2026 16:17
@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.

4 participants