Repository navigation
feat(site/src/pages/AgentsPage/AgentSettingsPage/ForkAgentDefinitionsPage): hide agent definition actions the user cannot take - #159
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.
…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.
…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.
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.
…m:ibetitsmike/coder into mike/agent-definitions-ui-4-editor-wiring
…m:ibetitsmike/coder into mike/agent-definitions-ui-4-editor-wiring
…Page): expect YAML document output
…m:ibetitsmike/coder into mike/agent-definitions-ui-4-editor-wiring
… newer cached definitions
…-definitions-ui-7-access
…age): show tier delete copy and a static read-only status
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a21e2bc89b
ℹ️ 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): extract the enabled cell
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f88326de59
ℹ️ 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
…s-ui-6-tier-scope # Conflicts: # site/src/api/forkAgentDefinitions.ts # site/src/api/queries/forkAgentDefinitions.test.ts # site/src/api/queries/forkAgentDefinitions.ts # site/src/pages/AgentsPage/AgentSettingsPage/ForkAgentDefinitionsPage/ForkAgentDefinitionsPage.test.tsx # site/src/pages/AgentsPage/AgentSettingsPage/ForkAgentDefinitionsPage/ForkAgentDefinitionsTable.tsx # site/src/pages/AgentsPage/AgentSettingsPage/ForkAgentDefinitionsPage/useForkAgentDefinitionEditor.ts
…-scope' into mike/agent-definitions-ui-7-access
…-scope' into mike/agent-definitions-ui-7-access
…s-ui-7-access # Conflicts: # site/src/pages/AgentsPage/AgentSettingsPage/ForkAgentDefinitionsPage/ForkAgentDefinitionsTable.tsx
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 363fa3deef
ℹ️ 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".
…d-only agent definitions
|
@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". |
Merge evidence for head
|
Part of #75.
Prepares the agent definitions table for the organization page, where members read the organization's definitions and only admins change them:
ForkAgentDefinitionsTabletakes an optionalSkillAccess(create,update,delete), the type the skills pages use; organization agent definitions are authorized with the organization skill RBAC object. Withoutcreatethere is no New agent definition, withoutupdatethe Enabled column shows the static Enabled/Disabled icon of the read-only skills table (SkillEnabledStatus, now exported fromSkillEnabledSwitch.tsx) and the row menu has no Edit, withoutdeleteit has no Delete…, and with neither the table has no actions column. The personal page keeps full access.Tests: an organization-scope table toggles through the organization route. A
ReadOnlytable view story shows the member view.Checks:
tsc,biome,oxlint,knip,lint:check,lint:compiler,lint:circular-deps, the folder's Vitest unit tests (76) and the table view story tests (13) pass locally.