Repository navigation
feat(site): create and edit personal agent definitions - #102
Conversation
Carry the organization in toggle and delete variables so a request that settles after an organization switch releases and invalidates its own list, reconcile the list after a failed delete, fall back to the table when the last row's menu button is gone, and describe deletion as removing only the personal definition.
A toggle or delete the server accepted stays visible even if the reconciling refetch fails.
…ion is gone A delete whose response was lost can still have committed, so the refetched list decides whether the dialog closes.
Keep the model and the other front-matter in the dialog and give the skill form a content builder, so the size limit, the meter, and the submitted markdown all use the agent definition file. Block Escape while a save runs, keep standalone front-matter comments, describe the field for agents, document the exported context hook, and test import and submit.
Codex Review Summary: ✅ CompletedThis 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. |
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9db598726d
ℹ️ 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".
…ly bodies The size limit counts the model, which lives outside the skill form, so a model change validates again. The server strips HTML comments before it requires a body, so the form does too. The dialog now submits the name with the content.
…ent-definitions-ui-4-editor-wiring
…itions A create whose response was lost closes the editor when the refetched list shows the new name and the name was not listed before. Reopening a definition seeds the editor from cached data instead of waiting for the refetch. Tighten the API and query JSDoc.
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b643ea42a4
ℹ️ 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".
…ssals, and indented comments The editor keeps the values it opened with as every field's baseline, so refreshed initial values cannot reset some fields and leave others stale. Escape and outside clicks act as Cancel, which the form disables from the moment Save is clicked. Indented front-matter comments after owned keys are kept unless they sit inside that key's block or quoted text. Add stories for the submitting and import error states.
…s-ui-3-editor-dialog
…or-dialog' into mike/agent-definitions-ui-4-editor-wiring
A save writes its response to the definition's cached detail, so a reopened editor shows the saved content even if the refetch fails. Cached content seeds the editor only when it matches the listed definition's id and is at least as new, or a fetch just returned it, so a definition recreated or edited elsewhere waits for its fetch.
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c7f140b1b9
ℹ️ 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".
Hand-classifying front-matter lines lost inline comments on owned keys and produced invalid YAML for indented root keys. Parse the front-matter as a yaml Document and set the owned keys in place, which keeps comments and other keys.
|
@codex review
|
|
Codex Review: Didn't find any major issues. Can't wait for the next one! 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". |
Applies frontend review findings: the editor's state, detail query and create/save mutations move to useForkAgentDefinitionEditor, the stale load error is a flat condition, docs move to the fields they describe, page tests share helpers, and the table view has an editor story.
…ith the chats helper
…ionsPage): rename the editor error display helper
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddab46964e
ℹ️ 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".
…ionsPage): document the editor hook contract
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f65c01bca
ℹ️ 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. Swish! 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". |
…s-ui-4-editor-wiring # Conflicts: # site/src/pages/AgentsPage/AgentSettingsPage/ForkAgentDefinitionsPage/ForkAgentDefinitionEditorDialog.stories.tsx # site/src/pages/AgentsPage/AgentSettingsPage/ForkAgentDefinitionsPage/ForkAgentDefinitionEditorDialog.tsx
Closing and reopening only to make GitHub recompute the merge ref against current main ( |
The merge ref now points at current main ( |
Merge evidence for head
|
Part of #75. Stacked on #101; retarget to
mainonce it merges.Wires the agent definition editor from #101 into the personal agent definitions page:
POSTto the user-tier route. A row menu Edit… loads the definition withGETand saves withPATCH {content}.useForkAgentDefinitionEditor. Timestamps are compared withcompareUpdatedAtInstantsfromapi/queries/chats.ts, now exported, to keep sub-millisecond precision.Limits:
UAT on the fork UI UAT server, as a member user, through this branch's Vite dev server:
POSTsends name and description, the server accepts it, toast, row appearsGETtoolsandreadonlyfront-matter: both keep their valuesPOST409, the error shows in the dialog, which stays open.mdfile: fills the fields, create keepstoolsandmodelGETfails: cached values load and the save goes throughPATCHheld: the dialog stays open with Cancel disabled, then closes as saveddescription:: a description edit keeps the comment, which YAML moves to the end of thedescriptionlineGET: the reopened editor shows the saved description/agents/settingsPATCHPOST409 while every list refetch hangs: the error shows at once and Cancel is enabledChecks:
tsc,biome,oxlint,knip,lint:compiler,lint:circular-deps, and the folder's Vitest tests pass locally.