Skip to content

feat(site): toggle and delete personal agent definitions - #94

Merged
ibetitsmike merged 7 commits into
mainfrom
mike/agent-definitions-ui-2-toggle-delete
Nov 10, 2026
Merged

ibetitsmike merged 7 commits into
mainfrom
mike/agent-definitions-ui-2-toggle-delete

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Xum opened this PR on behalf of @ibetitsmike.

Part of #75. Follows #84.

Adds row actions to the personal agent definitions page:

  • An Enabled switch per row replaces the read-only status. It sends PATCH {enabled} to the user-tier route, shows the new value on the row and disables that switch while its request runs (each row separately), and reports a failure in a toast with the server's message and detail.
  • A row menu with Delete… opens a confirm dialog that names only the personal definition, since organization, project, and workspace definitions with the same name still resolve. A failed delete shows the server error inside the dialog, and the dialog stays open until the request settles so the error cannot be dismissed unseen. A successful delete closes it and shows a toast. The list refetches after a delete either way, because a 404 or a lost response can mean the definition is already gone; if the refetched list no longer has it, the dialog closes as a success. When the last row goes, focus moves to the table.

Both requests carry their organization in the mutation variables, so one that settles after an organization switch releases and refetches its own organization's list. A successful toggle or delete is also written into the cached list, so it stays visible if the refetch fails.

The create and edit dialog comes in the next PR.

UAT on the fork UI UAT server, as a member user, through this branch's Vite dev server:

Scenario Result
Turn a definition off: PATCH {"enabled":false} 200, switch stays off after reload Pass
Delete from the row menu: confirm dialog, DELETE 204, toast, row gone after reload Pass
Flag off: no sidebar link, direct URL redirects to /agents/settings Pass
Failed delete (injected 500), Escape pressed while it runs: dialog stays open and shows the error Pass
Delete the only row with the keyboard: personal-scope copy, DELETE 204, focus lands on the table Pass
Delete whose response is lost (server deletes, browser gets 500): dialog closes with the success toast Pass

Checks: tsc, biome lint, oxlint, knip, lint:compiler, lint:circular-deps, and the page's Vitest tests pass locally.

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum posted this on behalf of @ibetitsmike.

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 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-10T03:07:34.907592Z 0941556 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: ee007b06bf

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

Xum posted this on behalf of @ibetitsmike.

@codex review

@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: c4960a32f6

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

Xum posted this on behalf of @ibetitsmike.

@codex review

@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: f3501e0a23

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

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.
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum posted this on behalf of @ibetitsmike.

@codex review

@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: 2f57a6f9de

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

A toggle or delete the server accepted stays visible even if the
reconciling refetch fails.
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum posted this on behalf of @ibetitsmike.

@codex review

@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: a17d5fd5b9

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

…ion is gone

A delete whose response was lost can still have committed, so the
refetched list decides whether the dialog closes.
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum posted this on behalf of @ibetitsmike.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 0941556b18

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

Xum (AI agent) closed and reopened this on behalf of @ibetitsmike.

Closing and reopening only to make GitHub recompute the merge ref against current main (0298da5976) and run fork-ci on it. The head is unchanged.

@ibetitsmike ibetitsmike reopened this Nov 10, 2026
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) closed and reopened this again on behalf of @ibetitsmike.

The merge ref now points at current main (0298da5976), but the run started by the first reopen was queued against the old merge ref. This second reopen starts fork-ci on the recomputed merge. The head is unchanged.

@ibetitsmike ibetitsmike reopened this Nov 10, 2026
@ibetitsmike
ibetitsmike merged commit dad3acc into main Nov 10, 2026
21 of 28 checks passed
@ibetitsmike
ibetitsmike deleted the mike/agent-definitions-ui-2-toggle-delete branch November 10, 2026 04:08
@ibetitsmike

Copy link
Copy Markdown
Owner Author

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

Merge evidence for head 0941556b185f8b1f0851ccdf509f6c749584108d:

  • fork-ci pull_request run 42751676784 passed; its build job checked out Merge 0941556b18 into 0298da5976 (current main). All checks green. Run 42746994437 had also passed on this head.
  • Codex on this exact head: no major issues. Rounds 3 to 5 raised 8 P2s, all fixed with tests that fail on the prior code, replied to and resolved; 0 unresolved review threads. Merge state CLEAN.
  • UAT round 8 PASS at this head as a member user: navigation, list, toggle persists, delete, flag off, Escape during a failing delete, keyboard focus after deleting the last row, and a delete whose response was lost. The org picker scenario was skipped (single-org deployment). Seeded uat-w10-* data was cleaned up.
  • Local: tsc, biome, oxlint, knip, lint:compiler, lint:circular-deps and the page Vitest suite (11/11) pass.

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