Repository navigation
feat(site/src): move chats between projects from the chat menu - #30895
ibetitsmike wants to merge 3 commits into
Conversation
The chat menu (sidebar, top bar, project page) gets a Move to project submenu with the projects of the chat's organization, a check mark and aria-current on the current one, and Remove from project. It shows only for the owner of a root chat that is not archived, with the chat-projects experiment, and it is off with the Archive agent hint while the chat or a subagent runs. moveChatToProject updates the cached chat lists and the chat entity optimistically, and its rollback restores only project_id. Other tabs follow project_change watch events: a move keeps updated_at, so project_id is taken only from that kind, and the open chat refetches. The project page drops a chat that moved away. The composer's project picker no longer says "Can't move to a project later".
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eab509f362
ℹ️ 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".
…ject item keyboard reachable Radix keeps disabled menu items out of keyboard focus, so while the chat or a subagent ran, keyboard and screen reader users could not reach "Move to project" or the hint its aria-describedby names. The trigger now only looks disabled and its submenu refuses to open while blocked.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96bcfd3375
ℹ️ 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 |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
…oject menu The menu reads one organization's projects, so a filter in the component replaces the grouping selector and its lodash import.
The chat menu in the sidebar, the top bar and the project page gets a Move to project submenu. It lists the projects of the chat's organization, marks the current one with a check mark and
aria-current, and ends with Remove from project.Stack (moving chats between projects, bottom first):
project_idWhy: this is the first way for a user to move a chat, through the API from #30894.
chat-projectsexperiment. While the chat or a subagent runs, it looks disabled and does not open, as the API would return 409. It stays keyboard focusable, so keyboard and screen reader users reach the Archive agent hint it names.moveChatToProjectupdates the cached lists and the chat entity at once. Its rollback restores onlyproject_id, so it keeps the fields that watch events wrote while the request ran. A refused move shows the server message in a toast, even after the menu closes.project_changewatch event. A move keepsupdated_at, soproject_idcomes only from that event, and the open chat refetches so the last event cannot win over the committed project. First list fetches that started before the move restart.What to scrutinize: the
project_changebranch inAgentsPageLayout.tsxandmergeWatchedChatSummary()inapi/queries/chats.ts.Pixel: new
ChatTopBarsubmenu stories,ProjectPageChatMovedToAnotherProject, and theChatsSidebarmenus without Move to project (archived, shared, subagent) andMoveToProjectOffWhileSubagentRuns, which focuses the blocked item. The openCompactProjectSelectorstories lose the hint.Testing
make pre-commitpasses. Vitest passes on the 5 touched specs (437 tests), and the Storybook tests of the 4 touched story files pass (134).AgentsPageLayout.test.tsxends on the older project when two moves arrive in reverse order and it does not refetch. TheresetUnloadedChatListstests fail when the project list family or the unloaded-only check is removed.disabledor the open guard is removed.aria-currenton the current project, whichsite/AGENTS.mdleaves to the stories.