Repository navigation
Conversation
97427a1 to
02e868b
Compare
a570d03 to
76e31de
Compare
02e868b to
51ababa
Compare
76e31de to
3181dc6
Compare
|
@codex review |
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: 3181dc6e09
ℹ️ 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".
| {onOpenProjectDialog && onDeleteProject && ( | ||
| <ProjectsSection | ||
| projects={projects} | ||
| projectPermissions={projectPermissions} | ||
| expanded={!collapsedSections.Projects} | ||
| onToggle={() => toggleSection("Projects")} | ||
| onCreate={() => onOpenProjectDialog(null)} | ||
| onEdit={onOpenProjectDialog} | ||
| onDelete={onDeleteProject} | ||
| /> |
There was a problem hiding this comment.
Render projects when the chat list is empty
Because ProjectsSection is inside the non-empty branch of isShowingEmptyState, a new user with no chats, or a user whose filters match no chats, cannot see existing projects or the New project button. Move the projects UI outside the chat-empty conditional so project access does not depend on visible chat rows.
AGENTS.md reference: site/AGENTS.md:L11-L11
Useful? React with 👍 / 👎.
| ...(model ? { model_config_id: model } : {}), | ||
| ...(reasoningEffort ? { reasoning_effort: reasoningEffort } : {}), | ||
| ...(selectedProject ? { project_id: selectedProject.id } : {}), |
There was a problem hiding this comment.
Block chat creation until the project lookup completes
When /agents?project=... loads slowly or fails with a non-404 error, the form remains usable while selectedProject is undefined, so submitting silently creates an ordinary chat in the form-selected organization without project_id. Disable creation while the requested project is loading and surface lookup failures rather than falling back to an unscoped chat.
AGENTS.md reference: site/AGENTS.md:L11-L11
Useful? React with 👍 / 👎.
| const defaultOrganizationId = | ||
| organizations.find((organization) => organization.is_default)?.id ?? ""; |
There was a problem hiding this comment.
Fall back to an organization the user can access
For users who are not members of the deployment's default organization, none of the accessible organizations has is_default, so this becomes an empty ID: the projects query is disabled and New project submits organization_id: "", which the API rejects. The existing agents layout explicitly handles this case by falling back to organizations[0]; the project sidebar needs the same fallback or an organization selector.
Useful? React with 👍 / 👎.
| const chatsQuery = useInfiniteQuery({ | ||
| ...infiniteChats({ projectId }), | ||
| enabled: experiments.includes("chat-projects") && Boolean(projectId), | ||
| }); | ||
| const chats = chatsQuery.data?.pages.flat() ?? []; |
There was a problem hiding this comment.
Wire pagination for the project chat list
infiniteChats fetches 50 chats per page, but this page only flattens pages already fetched and never calls fetchNextPage or renders a load-more sentinel. Consequently, projects containing more than 50 accessible root chats permanently omit every chat after the first page.
Useful? React with 👍 / 👎.
| const projectsQuery = useQuery({ | ||
| ...chatProjects(defaultOrganizationId), | ||
| enabled: chatProjectsEnabled && Boolean(defaultOrganizationId), | ||
| }); | ||
| const projects = chatProjectsEnabled ? (projectsQuery.data ?? []) : []; |
There was a problem hiding this comment.
Surface failures from the projects query
When the projects request fails, data ?? [] converts the failure into an empty project list and no error is passed to ChatsPanel, so users see Projects (0) and may attempt to create duplicates without any indication that loading failed. Preserve and render projectsQuery.error, ideally with a retry action, instead of treating an error as a successful empty response.
AGENTS.md reference: site/AGENTS.md:L11-L11
Useful? React with 👍 / 👎.
| const isNameValid = memoryNamePattern.test(name); | ||
| const isDescriptionValid = description.length <= 150; | ||
| const isBodyValid = new TextEncoder().encode(body).length <= 8192; |
There was a problem hiding this comment.
Require a nonblank memory description
The server normalizes the description and rejects it when empty, but this validator considers an empty or whitespace-only description valid, enabling Save and sending a request guaranteed to return 400. Include a nonblank check here and present it as field validation so both create and edit dialogs match the API contract.
Useful? React with 👍 / 👎.
| expect( | ||
| screen.queryByRole("button", { name: "Edit" }), | ||
| ).not.toBeInTheDocument(); | ||
| expect(screen.getByRole("link", { name: "New chat" })).toBeInTheDocument(); |
There was a problem hiding this comment.
Replace DOM-presence assertions with behavior coverage
These assertions make DOM presence the test outcome, which FE1 explicitly reserves for Storybook visual coverage. Keep the auth request assertion as the Vitest behavior check and cover the permitted and denied rendered states in stories instead of using toBeInTheDocument.
AGENTS.md reference: site/AGENTS.md:L7-L7
Useful? React with 👍 / 👎.
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.
51ababa to
3f85d61
Compare
3181dc6 to
217be16
Compare
Note
Superseded by #29583, which carries the minimal folder-based UI for this stack.
Warning
Experiment, work in progress. Stacked on #29297 (consolidation) -> #29291 (personal memory) -> #29301 (project memory) -> #29242 (chat projects). Behind the
chat-projectsexperiment, off by default. Not ready for review.All frontend for the chat projects and memory stack. The four PRs beneath this one are backend only (plus generated TypeScript types).
authcheckresult for the project's organization and creator; project page at/agents/projects/:projectId; new chat in project; Move to project from the chat menu./agents/settings/memorywith the personal memory toggle and the per-organization memory list. The memory components serve both scopes.Behavior is covered by Vitest; no Storybook stories are added.
Screenshots
Feature screenshots are on the backend PRs (#29242, #29301, #29291, #29297). These cover UI states specific to this PR.
Member sees no project actions on a project another user created

Admin sees Edit and Delete

Projects fail to load: compact error with Retry

Project page paginates chats with Load more

Project lookup fails on

/agents?project=...: chat creation blockedMemory description is required

Generated with Coder Agents on behalf of @f0ssel.