Skip to content

feat(site/src): manage project agent definitions from the project panel - #178

Merged
ibetitsmike merged 8 commits into
mainfrom
mike/agent-definitions-ui-10-project
Nov 11, 2026
Merged

ibetitsmike merged 8 commits into
mainfrom
mike/agent-definitions-ui-10-project

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Xum opened this PR on behalf of @ibetitsmike.

Part of #75.

Adds project agent definitions to the Agents project page, behind the fork-agent-definitions experiment, on the project routes from #77 (/api/v2/chats/fork/organizations/{organization}/projects/{project}/agent-definitions).

  • Details panel: the project details panel gets an Agent definitions row next to Skills, showing a count such as "2 agents, 1 disabled". The row and its request exist only while the experiment is on. The two rows share a small local CountRow.
  • Dialog: the row opens ProjectAgentDefinitionsDialog, which reuses ForkAgentDefinitionsTable (and its editor dialog) inside the project skills dialog's frame. Members with project.permissions.update, the signal ProjectSkillsDialog uses and the same ActionUpdate check the server makes for writes, get New agent definition, Edit, Delete and the Enabled switch. Other project members see the list read-only.
  • Scopes: AgentDefinitionScope becomes a discriminated union with a project tier carrying projectId. One scopeEndpoints switch picks the user, organization or project API, so the existing create, update, delete and toggle mutations work unchanged. Pending toggles are keyed by the hashed query key, so two projects never share state. The table gets project copy for its description, empty state and delete message.
  • Docs: the pstack adapter doc says how to reach the dialog and who gets write controls.

Tests: the query tests cover the project tier (each project its own scope, list, get and create through the project routes, update and delete without touching another project's cache). The dialog tests cover write and read-only access. The panel tests cover opening the dialog from the row and making no request while the experiment is off. Stories show the dialog list, read-only and empty states, and the panel row loaded, loading and failed.

Checks: tsc, biome, oxlint, knip, lint:check, lint:compiler, lint:circular-deps, unit tests (170) and story tests (139) pass locally.

UAT on the fork UI UAT server (local Vite at head 552368da96 proxying to it), project uat-w10-proj with a project admin, a plain project member and an org member outside the project:

  • The project admin opens the row, then creates, edits, disables and deletes a definition in the dialog, and the server reflects each step.
  • The row count follows the server.
  • The plain member sees the definition read-only (no New, no row menu, no switch), and the API refuses the member's delete with 404.
  • The outsider gets no row, and the API returns 404.

Not tested live: a chat in the project spawning the definition, which needs a model turn and a workspace; #77 covers it server-side.

@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum commented on behalf of @ibetitsmike.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T06:32:43.303110Z 2dcaf9c Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9581467713

ℹ️ 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".

@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum commented on behalf of @ibetitsmike.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 64f0c4d606

ℹ️ 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".

…nt definitions story its own data and cover the row's error state
@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum commented on behalf of @ibetitsmike.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: c0f68e94ee

ℹ️ 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".

@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum commented on behalf of @ibetitsmike.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8cb6aeea68

ℹ️ 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".

Comment thread docs/fork/pstack-adapter.md Resolved
…ating dialog JSDoc and address the reader in the project definitions guidance
@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum commented on behalf of @ibetitsmike.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1bc7636a6f

ℹ️ 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".

@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum commented on behalf of @ibetitsmike.

@ibetitsmike
ibetitsmike marked this pull request as ready for review November 11, 2026 05:54
…s-ui-10-project

# Conflicts:
#	docs/fork/pstack-adapter.md
#	site/src/api/forkAgentDefinitions.ts
#	site/src/api/queries/forkAgentDefinitions.test.ts
#	site/src/api/queries/forkAgentDefinitions.ts
@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum commented on behalf of @ibetitsmike.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 2dcaf9c952

ℹ️ 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".

@ibetitsmike
ibetitsmike merged commit 896f09d into main Nov 11, 2026
9 checks passed
@ibetitsmike
ibetitsmike deleted the mike/agent-definitions-ui-10-project branch November 11, 2026 07:05
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) merged this on behalf of @ibetitsmike.

Merge evidence for head 2dcaf9c952a1db4bfc4c254f73bc47abbc0d94e1 (main e661171d15 merged in, no force push):

ibetitsmike added a commit that referenced this pull request Nov 11, 2026
…el (#178)

* feat(site/src): manage project agent definitions from the project panel

* docs: describe managing project agent definitions from the project panel in the pstack adapter

* refactor(site/src/pages/AgentsPage/components/ProjectPage): drop the restating CountRow comment

* test(site/src/pages/AgentsPage/components/ProjectPage): give each agent definitions story its own data and cover the row's error state

* docs(docs/fork): point the personal delete message reference at its shifted lines

* docs(site/src/pages/AgentsPage/components/ProjectPage): drop the restating dialog JSDoc and address the reader in the project definitions guidance

* test(site/src/pages/AgentsPage/components/ProjectPage): prefix the project definitions story fixture with mock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant