Repository navigation
feat(site/src): add the chat project page - #30379
Conversation
|
/coder-agents-review |
|
Chat: Review posted | View chat Review history
deep-review v0.13.0 | Round 9 | Last posted: Round 9, 58 findings (1 P1, 1 P2, 13 P3, 34 P4, 9 Nit), APPROVE. Review Finding inventoryFinding inventory: PR #30379Findings
Downgrade gate notes (R1):
Downgrade gate notes (R3):
Downgrade gate notes (R4):
Downgrade gate notes (R5):
Downgrade gate notes (R7):
Contested and acknowledgedRound logRound 1Full panel (round 1). Netero first pass: 1 P2, 4 P3, 2 P4, 1 Nit, 1 Note; no P0, panel proceeded. Law not run (effective additions 596). Panel: ging-ts, ging-react, nami, pariston, mafuuu, bisky, gon, leorio, wildcard knov. Gon's agent lost the workspace connection while writing; resumed the same agent to write the file. Totals: 1 P2, 10 P3, 12 P4, 4 Nit, 2 Note. Reviewed against f9b5713..2bc038d. Round 2 updateBLOCKED. CRF-21 silent (comment still duplicated at AgentCreatePage.test.tsx:241-242, thread resolved without reply). 26 findings claimed fixed in 30fd661, unverified by panel. No review panel. Reviewed against b2e7ea8..30fd661. Round 3Churn guard PROCEED (CRF-21 fixed in 4d5db6e). Restructure round (new ProjectComposerFooter.stories.tsx; page rewritten into a keyed wrapper), full panel: ging-ts, ging-react, nami, pariston, mafuuu, bisky, gon, leorio, wildcard knov. Netero advisory: re-raised CRF-3, CRF-5; new CRF-30, CRF-31. Panel: re-raised CRF-4 (Mafuuu), CRF-25 (Gon); new 1 P1, 1 P3, 4 P4, 2 Nit, 1 Note, 3 OOS. Netero verified CRF-2, 6, 10, 13 by mutation; Bisky verified CRF-14 to CRF-17. Reviewed against b2e7ea8..4d5db6e. Round 4Churn guard PROCEED (14 addressed in 4188f73, b684e19). Restructure round (ProjectComposerFooter.tsx and AgentsPageLayout.stories.tsx newly in the PR diff; form props changed to Round 5Churn guard PROCEED (8 addressed in 8fa8a8b and a PR description edit; CRF-44 partly fixed, re-raised). Fix round (no files added, no exported signature changed since R4). Panel: zoro, gon, mafuuu, leorio (raised R4 findings touched), ging-ts, ging-react, nami, bisky (changed-file specialists), wildcard chopper. Netero re-raised CRF-44. New: 1 P3, 2 P4, 1 Nit, 2 Note. Ging-React observed lint:compiler now passes (CRF-41 no longer reproduces). Reviewed against 59355bb..8fa8a8b. Round 6Churn guard PROCEED (5 addressed in b9f3f88). Fix round. Panel: bisky, chopper, gon (raised R5 findings touched), ging-ts, ging-react, nami, wildcard meruem. Netero: CRF-63; verified CRF-44, 57, 58 by mutation. New: 4 P4, 1 Nit (plus CRF-63). Reviewed against 8da1221..b9f3f88. Round 7Churn guard PROCEED (5 addressed). Fix round; AgentsPageLayout.tsx and its test newly in the diff (6dfc393), so added nami, ging-react, hisoka for that file. Panel: bisky, gon, meruem, nami, ging-ts, ging-react, hisoka, wildcard kite. Netero: CRF-68. New: 1 P3 (convergent), 1 P4 (Netero), 1 Note. Reviewed against eb8a483..6e06900. Round 8Churn guard PROCEED (CRF-68, CRF-69 addressed in aae451f). Fix round. Panel: meruem, hisoka, kite (raised CRF-69), bisky, nami, wildcard zoro. Netero: CRF-71; verified CRF-68 and CRF-69 by mutation (Meruem, Hisoka, Kite, Zoro reproduced). New: 2 P4 (one convergent), 1 Note. Reviewed against eb8a483..aae451f. Round 9Churn guard PROCEED (CRF-71, CRF-72 addressed in 1277fc4). Fix round. Panel: bisky, zoro (raised CRF-72), nami, ging-react, wildcard knov. Netero: no findings; verified both fixes by mutation (Bisky, Nami also). No new findings. No open in-scope findings remain. Reviewed against eb8a483..1277fc4. About deep-reviewCRF = Coder Review Finding (P0-P4, Nit, Note)
|
…its own file Keeps it next to ProjectComposerHeader instead of inside AgentCreatePage.
There was a problem hiding this comment.
This PR adds the /agents/projects/:projectId page, which locks the new-chat form to the project's organization and sends project_id on create. Findings: 1 P2, 10 P3, 12 P4, 4 Nit.
Six of the seven comments the PR adds or edits restate the code next to them or repeat a fact documented elsewhere, and one is out of date; the inline comments give rewrites.
Notes:
site/src/router.tsx:899: nothing in the tree links to the new route yet (buildAgentProjectPathhas no callers), so it is reachable only by typed URL until #29583.site/src/pages/AgentsPage/AgentCreatePage.tsx:402:AgentCreateFormkeepskey="draft"on/agentsand on every project page, so draft text typed under one project carries over to another project and to the plain new-chat page.
🤖 This review was automatically generated with Coder Agents.
Count project field limits in code points like the server, show save errors with ErrorAlert and server field validations, disable Save for an unchanged edit, fall back to the folder glyph when a project icon fails to load, invalidate chat entities and searches when a project is deleted, and add tests and stories for the dialog and icon.
…r lock Scope text and attachment drafts per destination instead of per organization, keep the lock fixed per mount, and never save choices made while locked as the user's defaults.
Remount the page per project, show a not-found message instead of redirecting, and move the page tests onto renderWithAuth.
|
/coder-agents-review |
There was a problem hiding this comment.
Commit 30fd661 addresses 26 of the 27 findings from the first review. A review panel has not checked those fixes yet, because one finding has no fix and no reply: the test comment at AgentCreatePage.test.tsx:241-242 still repeats the production comment above the "Loading project" loader, and its thread was resolved without a reply. Delete the test comment, or reply on the thread explaining why it should stay. The full review resumes after that.
🤖 This review was automatically generated with Coder Agents.
|
/coder-agents-review |
Key the form on the project so its lock and drafts are fixed per mount, derive the denial kind once, and keep MCP and reasoning choices made in a project out of the user's defaults.
Save was disabled only by the caller's isSubmitting, which turns on after Formik's async validation, so a double-click sent two saves (and would create two projects). The dialog now also waits on its own pending submit, and awaits a promise returned by onSubmit.
…to tmp-ui-form # Conflicts: # site/src/pages/AgentsPage/components/ChatsSidebar/dialogs/ChatProjectDialog.tsx
|
@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: 1277fc425b
ℹ️ 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".
…to the dialog The dialog keeps Save disabled until the returned promise settles, so the edit can't be sent twice.
…DOM in the project page tests The project page tests asserted presence, absence, and attributes of rendered elements, which FE1 leaves to the story screenshots. They now check requests, navigation, and the props the page hands to the form. The reopened-after-failed-save state moves to a ProjectComposerFooter story.
…to f0ssel/chat-projects-ui-data
…on for the organization selector The ProjectComposer story covers the hidden selector visually; the test keeps asserting the persisted organization and workspace values.
…d text in project page tests The prefill tests read the stub form's rendered text, and the history test read the edit dialog's input value. They now check the prefill prop handed to the form and the name sent in the PATCH request.
…n while the form is locked A project page cleared the user's saved organization when that organization had been revoked. Gate the persistence effect on isUserOrgSelectionActive so a lock neither writes nor removes it.
…ough the submit payload Replace DOM-absence checks in the per-project draft test with the onCreateChat message and file IDs, and query the Attach workspace trigger by role instead of a non-null closest() lookup.
…stories, assert submits in tests Move the project denial copy checks from Vitest into Pixel stories (unlisted organization, product-wide, no permitted organization) and drop the assertion-only play function. Assert the project draft, MCP, and loading tests through the onCreateChat payload instead of rendered output.
…30377) - Experiment (`chat-projects`). First of four stacked PRs split out of #29583, which is now the sidebar on top of this stack. - API client and React Query factories for chat projects (`chatProjects.ts`, keys colocated), `MockChatProject`, `ChatProjectIcon`, the create/edit `ChatProjectDialog` (Formik; the caller owns the mutation), and `buildAgentProjectPath`. - `getDefaultOrganizationId` now returns `undefined` instead of `""` when there is no default organization, so the sidebar in #29583 can tell "no default organization" apart and fall back to another one. Its two existing callers already fall back either way and behave the same. - `getFormHelpers` accepts an optional `measureLength`, so the length counter can count something other than UTF-16 units. Existing callers keep the default `value.length`. - Field limits count code points after trimming, matching the server, with a live counter near the limit. Save stays disabled for an edit that changes nothing once trimmed. The caller resets its mutation before opening the dialog so an old save error doesn't reappear. Stack: **this PR** → #30378 → #30379 → #29583 --- Generated with Coder Agents on behalf of @f0ssel. --------- Co-authored-by: Jaayden Halko <jaayden.halko@gmail.com>
# 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
- Experiment (`chat-projects`). Second of four stacked PRs split out of #29583. - `AgentCreateForm` takes a `project` (its ID and organization) and `header`/`footer` slots. The form remounts when the project changes. - The organization is pinned to the project's and its selector is hidden. The organization, workspace, and MCP servers chosen in a project are never saved as the user's defaults. Submits carry `projectId` so the caller can't forget it. - Text and attachment drafts are kept per project, so a project's draft never shows up in another project's composer or the plain one. `useFileAttachments` takes an optional `storageKey` for this. - When the project's organization isn't permitted, the form names it in a project-specific denial, but only when chats are otherwise allowed; otherwise the product-wide denial stays. - `ProjectComposerHeader` shows the project's name and description above the composer (stories: `ProjectComposer`, `ProjectComposerOrganizationDenied`). Stack: #30377 → **this PR** → #30379 → #29583 --- Generated with Coder Agents on behalf of @f0ssel. --------- Co-authored-by: Jaayden Halko <jaayden.halko@gmail.com>
chat-projects). Third of four stacked PRs split out of feat: add chat project folders to the sidebar #29583./agents/projects/:projectId: the new-chat page framed by the project, with the form locked to the project's organization and created chats joining the project. An "Edit project" button opens the project dialog./agents. Drafts are scoped to the project./agentsdraft only when clicked on/agentsitself. Clicking it from any other route (a project, a chat, settings, automations, board) keeps that draft; settings, automations, and board previously cleared it.AgentsPageLayout.stories.tsx.Stack: #30377 → #30378 → this PR → #29583
Generated with Coder Agents on behalf of @f0ssel.