Repository navigation
feat(site): add the agent definition editor dialog - #101
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.
@codex review |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e44b2d2e2b
ℹ️ 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".
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a7501310d
ℹ️ 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.
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ec5bf030a
ℹ️ 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
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5dc236da8
ℹ️ 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
|
…s-ui-3-editor-dialog
… types, and stories from frontend review
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 576e468ed6
ℹ️ 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. Nice work! 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". |
|
@codex review
|
|
Codex Review: Didn't find any major issues. What shall we delve into next? 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". |
Closing and reopening only to make GitHub recompute the merge ref against current main ( |
The merge ref now points at current main ( |
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. Based on
mainnow that #94 has merged.Adds the dialog that creates and edits one agent definition. Nothing opens it yet; the next PR wires it to the personal agent definitions page.
useSkillEditorContextand theSkillEditorModetype are exported,SkillEditorFormtakes an optionalbuildContentthat the size limit, the size meter, and the submitted content use (default SKILL.md),SkillEditorDescriptionFieldtakes an optionalplaceholder, the size error now says "Content must be ... or smaller.", and a body that is only HTML comments counts as empty, because the server strips them before it requires a body.agentDefinitionMarkdown.tsparses the front-matter as ayamlDocument and saves by setting name, description, and model in place, only when the user changed them, so an unchanged field stays as written (a block-scalar description, an alias). The fields read the document's resolved values, so an alias or a<<merge key reads as the server reads it, and they show line breaks as spaces because they are single-line inputs (a description is checked against its size limit before that). Other keys and all comments, inline ones included, are kept. YAML may re-indent other keys, for example sequence items, but their values stay the same. Aliases of an owned value are filled in with that value (keeping its tag and the alias's comments) before it changes, so they keep it, and an owned field that is itself an alias keeps its comments when it changes. A plain value that YAML 1.1 would read as another type, such as a date, or cannot convert, such as*sonnet, is quoted, because the server's decoder still reads those forms.yaml2.8.3 was already in the lockfile as a transitive dependency and is now a direct one.Stories cover create, edit, submitting, import error, submit error, loading, load error, and retrying.
ForkAgentDefinitionEditorDialog.test.tsximports and submits in create and edit mode, saves a model-only change, revalidates the size after a model change and shows its error on the untouched body, blocks a comment-only body, ignores Escape from the moment Save is clicked, and keeps every field's opening values when the initial values refresh.agentDefinitionMarkdown.test.tschecks that saving rewrites the form's fields and keeps other keys and comments, including an inline comment on an owned key. It also checks that uniformly indented front-matter is rebuilt as valid YAML, that values YAML would read as another type (including YAML 1.1 dates) are quoted, that aliases of a changed or removed owned value keep it, that an owned field set through an alias or a merge key reads and stays that way, that replaced aliases keep tags and comments, that an oversized multiline description is rejected, that a multiline description shows on one line and stays as written, and that front-matter which is not a mapping is rejected.Checks:
tsc,biome,oxlint,knip,lint:compiler,lint:circular-deps, and the folder's Vitest tests and the dialog's Storybook story tests pass locally. UI UAT runs on the wiring PR, where the dialog is reachable.