Repository navigation
feat(site/src): add the chat projects data layer and project dialog - #30377
Conversation
|
/coder-agents-review |
|
Chat: Review posted | View chat Review history
deep-review v0.13.0 | Round 7 | Last posted: Round 7, 47 findings (12 P3, 26 P4, 9 Nit), APPROVE. Review Finding inventoryFindings
Contested and acknowledgedRound logRound 1Netero first pass: 4 P3, 1 Nit, 2 Note. No P0; proceeded to panel. Round 2Churn guard: PROCEED, 15/15 round 1 findings author fixed in c69403e (CRF-12 by documenting full replace; CRF-21 in PR description). Round 3Churn guard: PROCEED, 13/13 round 2 findings author fixed in eb24d35 (CRF-31 by documenting the caller reset; Meruem accepts). Round 4Churn guard: PROCEED, 10/10 round 3 findings author fixed in b5292db. The commit adds a measureLength option to the shared getFormHelpers. Round 5Churn guard: PROCEED, 6/6 round 4 findings author fixed in e2a8992 (CRF-70 in PR description). Round 6Churn guard: PROCEED, 3/3 round 5 findings author fixed in 2f65531. Round 7Churn guard: PROCEED, no open findings. New commit e4a2471 adds @public tags for knip and switches a type import to React.ComponentProps for oxlint. About deep-reviewCRF = Coder Review Finding (P0-P4, Nit, Note)
|
There was a problem hiding this comment.
This PR adds the chat projects API client, React Query factories, ChatProjectDialog, ChatProjectIcon, and buildAgentProjectPath, and changes getDefaultOrganizationId to return undefined. Findings: 9 P3, 5 P4, 1 Nit. The missing role="alert" and the missing error detail on the save error paragraph have one fix: render ErrorAlert in place of the <p>.
Out of scope (needs a ticket or explicit acceptance by a human):
site/src/modules/dashboard/useDashboard.ts:16:getDefaultOrganizationNamereturns""when there is no default organization, so its callers cannot tell a missing organization from a real name.coderd/chat_projects.go:286:postChatProjectandpatchChatProjecttrimnameandiconbut notdescription, so API clients and the web dialog store different values for the same input.coderd/chat_projects.go:278: the chat project length limits are unexported Go constants, so every client copies them by hand and nothing flags a copy when the server limit changes.
Notes:
site/src/api/queries/chatProjects.ts:9: no code in this PR calls the new exports; the stacked PRs consume them.site/src/pages/AgentsPage/AgentSettingsUserAgentsPage.tsx:18: the description saysgetDefaultOrganizationIdhas one other caller; it has two. Both keep their behavior.site/src/api/queries/chatProjects.ts:16:chatProject(id)returnsnullfor a project an org admin can read but does not own, because the list endpoint filters by owner.site/src/modules/dashboard/useDashboard.ts:20:getDefaultOrganizationIdnow returnsundefinedfor a missing default organization while the adjacentgetDefaultOrganizationNamereturns"".
🤖 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.
|
/coder-agents-review |
There was a problem hiding this comment.
All 15 findings from the previous review are fixed in c69403e. This round has 2 P3, 9 P4, and 2 Nit, most of them in the fixes: the code-point length check dropped the live counter, the dirty check and the schema compare untrimmed values, and the new tests and stories leave some fixes unpinned.
No new out-of-scope items. The three from the previous review still need a ticket or explicit acceptance by a human.
🤖 This review was automatically generated with Coder Agents.
|
/coder-agents-review |
There was a problem hiding this comment.
All 13 findings from the previous review are fixed in eb24d35. This round has 1 P3, 4 P4, and 5 Nit. Most come from the withCharacterCount counter and the isUnchanged check: each normalizes the value differently from the schema and trimValues. Deriving the trimmed value once and using it for the counter, validation, the unchanged check, and submit would fix the counter mismatch, the missing icon counter, and the unchanged-check mismatch together.
Out of scope (needs a ticket or explicit acceptance by a human):
site/src/utils/formUtils.ts:61:getFormHelperscountsmaxLengthin UTF-16 units, so every other form that uses it shows wrong counts for emoji and other non-BMP characters.site/src/utils/formUtils.ts:61: themaxLength - 30counter threshold is an unnamed literal shared by every form, so the counter distance cannot be found or changed from one place.
Notes:
site/src/pages/AgentsPage/components/ChatsSidebar/dialogs/ChatProjectDialog.tsx:39: name and description show "This cannot be longer than N characters. (count/N)", the icon shows the schema's "Icon cannot be longer than 256 characters.", and the server sends "Name must be at most 64 characters." The counter and icon fixes decide which wording survives.
🤖 This review was automatically generated with Coder Agents.
|
/coder-agents-review |
There was a problem hiding this comment.
All 10 findings from the previous review are fixed in b5292db. This round has 5 P4 and 1 Nit, mostly tests that still pass when a fix is reverted, plus documentation of the shared getFormHelpers change, which every form in site/ uses.
Out of scope (needs a ticket or explicit acceptance by a human):
site/src/utils/formUtils.ts:61:getFormHelpersstill countsmaxLengthin UTF-16 units by default, so other forms show wrong counts for emoji and other non-BMP characters.
Notes:
site/src/pages/AgentsPage/components/ChatsSidebar/dialogs/ChatProjectDialog.tsx:37: themaxCharactersschema message is never displayed, because all three fields pass the samemaxLengthandmeasureLengthtogetFieldHelpersand the counter error wins. The schema test still gates Save.site/src/utils/formUtils.ts:59: a non-string field value now measures as 0 instead of skipping the counter, so a caller withmaxLengthunder 30 would show(0/N). No current caller does.
🤖 This review was automatically generated with Coder Agents.
Name the getFormHelpers counter margin and document measureLength.
|
/coder-agents-review |
There was a problem hiding this comment.
All 6 findings from the previous review are fixed in e2a8992. This round has 3 P4: one untested option on the icon field and two small issues in the getFormHelpers change.
Out of scope (needs a ticket or explicit acceptance by a human):
site/src/utils/formUtils.ts:61:getFormHelpersstill countsmaxLengthin UTF-16 units by default, so other forms show wrong counts for emoji and other non-BMP characters.
🤖 This review was automatically generated with Coder Agents.
|
/coder-agents-review |
There was a problem hiding this comment.
The three findings from the previous review are fixed in 2f65531, and this round found nothing new. No findings remain open.
Out of scope (needs a ticket or explicit acceptance by a human):
site/src/modules/dashboard/useDashboard.ts:16:getDefaultOrganizationNamereturns""when there is no default organization, so its callers cannot tell a missing organization from a real name.coderd/chat_projects.go:286: the server trimsnameandiconbut notdescription, so API clients and the web dialog store different values for the same input.coderd/chat_projects.go:278: the chat project length limits are unexported Go constants, so the client copies them by hand.site/src/utils/formUtils.ts:61:getFormHelperscountsmaxLengthin UTF-16 units by default, so other forms show wrong counts for emoji and other non-BMP characters.
🤖 This review was automatically generated with Coder Agents.
|
/coder-agents-review |
There was a problem hiding this comment.
The commit since the previous review (e4a2471) adds @public tags for knip and changes a type import for oxlint, with no behavior change. This round found nothing new, and no findings remain open.
Out of scope (needs a ticket or explicit acceptance by a human):
site/src/modules/dashboard/useDashboard.ts:16:getDefaultOrganizationNamereturns""when there is no default organization, so its callers cannot tell a missing organization from a real name.coderd/chat_projects.go:286: the server trimsnameandiconbut notdescription, so API clients and the web dialog store different values for the same input.coderd/chat_projects.go:278: the chat project length limits are unexported Go constants, so the client copies them by hand.site/src/utils/formUtils.ts:61:getFormHelperscountsmaxLengthin UTF-16 units by default, so other forms show wrong counts for emoji and other non-BMP characters.
Notes:
site/src/api/queries/chatProjects.ts:14: the@publictags onchatProjectsandChatProjectFormValuesare needed while only the stacked PRs use them. After #29583 imports them, the tags would stop knip from reporting the exports if those imports are later removed, so the stack can drop them once they have callers.
🤖 This review was automatically generated with Coder Agents.
… project is deleted Deleting a project invalidated every query under the chat entities family, which refetched each open chat's loaded message pages, ACL, prompts, debug runs, and diffs. Only the chat entities carry project_id, so invalidate those alone.
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 f0ssel/chat-projects-ui-data
|
@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: ee19de5e75
ℹ️ 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".
…nd icon checks into stories
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 58abf36f28
ℹ️ 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".
…the project dialog open while a save is pending
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4120aef426
ℹ️ 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".
… the API field error check into a story
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2a247452f5
ℹ️ 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".
…rt submit outcomes instead of field DOM state
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. 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". |
chat-projects). First of four stacked PRs split out of feat: add chat project folders to the sidebar #29583, which is now the sidebar on top of this stack.chatProjects.ts, keys colocated),MockChatProject,ChatProjectIcon, the create/editChatProjectDialog(Formik; the caller owns the mutation), andbuildAgentProjectPath.getDefaultOrganizationIdnow returnsundefinedinstead of""when there is no default organization, so the sidebar in feat: add chat project folders to the sidebar #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.getFormHelpersaccepts an optionalmeasureLength, so the length counter can count something other than UTF-16 units. Existing callers keep the defaultvalue.length.Stack: this PR → #30378 → #30379 → #29583
Generated with Coder Agents on behalf of @f0ssel.