Skip to content

feat(ui): add row menu with create-from-existing for agents, templates, harnesses - #3661

Open
toreysoloio wants to merge 7 commits into
kagent-dev:mainfrom
toreysoloio:toreysoloio/rowActionsMenu
Open

toreysoloio wants to merge 7 commits into
kagent-dev:mainfrom
toreysoloio:toreysoloio/rowActionsMenu

Conversation

@toreysoloio

Copy link
Copy Markdown
Contributor

🤖 written by Claude (start)

Closes #3615

Testing

  1. Open the Agents page and use the ⋯ menu on a row in each tab (Agents, Agent templates, Harnesses): it offers Edit (Open on templates), Create new … from this, and Delete, which still asks before deleting.
  2. Choose Create new … from this. The form opens prefilled from that resource with a -copy name; save it and confirm the copy appears in the list.
  3. Open /harnesses/new?from=kagent/nope (likewise /agents/new and /agent-templates/new): you get a blank form with an alert saying the source could not be loaded.

Release note

The Agents, Agent templates and Harnesses lists now have a row menu with "Create new … from this", which opens the create form prefilled from that resource.

🤖 written by Claude (end)

…sting

Agents, agent templates and harnesses lists now offer edit, delete and
"create new from this" in one row menu. The create item opens the
existing new form prefilled from ?from=namespace/name; a source that
cannot be loaded falls back to a blank form with an alert.

Row clicks now ignore anything outside the row's own markup, so portalled
modals and dropdowns no longer activate the row.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Torey Scheer <87029548+toreysoloio@users.noreply.github.com>
@github-actions github-actions Bot added the enhancement New feature or request label Nov 12, 2026
@toreysoloio

toreysoloio commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Before/after on a real kagent cluster (base build vs this PR, same data). Reel and screenshots below.

  • Row menu (agents, templates, harnesses): the separate edit/open and delete icons become one ⋯ menu with Edit or Open, "Create new … from this", and Delete.
  • Create from existing: ?from=namespace/name on the new agent, template and harness forms opens them prefilled as <name>-copy; before, the parameter was ignored.
  • Missing copy source: the harness form shows a "not found" alert above a blank form instead of nothing.
  • Delete confirmation: now a modal naming the resource; clicking its backdrop no longer navigates into the row.

No database or query code changed, so no benchmark.

reel.mp4

Screenshots

Before: agents list row actions before-01-agents-row-menu
Before: templates list row actions before-02-templates-row-menu
Before: harnesses list row actions before-03-harnesses-row-menu
Before: new agent from ?from=kagent/assistant before-04-copy-agent
Before: new template from ?from=kagent/support-triage before-05-copy-template
Before: new harness from ?from=kagent/kagent-default before-06-copy-harness
Before: new harness from a missing source before-07-copy-source-missing
Before: delete confirmation on a template row before-08-delete-confirm
After: agents list row actions after-01-agents-row-menu
After: templates list row actions after-02-templates-row-menu
After: harnesses list row actions after-03-harnesses-row-menu
After: new agent from ?from=kagent/assistant after-04-copy-agent
After: new template from ?from=kagent/support-triage after-05-copy-template
After: new harness from ?from=kagent/kagent-default after-06-copy-harness
After: new harness from a missing source after-07-copy-source-missing
After: delete confirmation on a template row after-08-delete-confirm

🤖 written by Claude

toreysoloio and others added 2 commits November 12, 2026 14:52
- Keep the copy form mounted when a failed copy source loads late, and say
  in the alert that it loaded but was not applied so edits are kept. Shared
  CopyNotice and useMountedBlank across the agent, template and harness forms.
- Show the harness "not found" alert for a missing copy source.
- copyName stays within 63 characters and never ends in a non-alphanumeric.
- Show the disabled-delete reason inline; restore the row-click popover and
  dropdown guards.
- Extract DeleteConfirmModal shared by the menu and DeleteResourceButton,
  mounted only while open; keep Popconfirm open until the delete settles.
- Shrink the single-icon actions column.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Torey Scheer <87029548+toreysoloio@users.noreply.github.com>
- Move copyName, useMountedBlank, copyPath and copySource out of the row
  menu into table/copyFrom.ts.
- useMountedBlank no longer reports blank once the copy source is dropped,
  so a plain new form never shows the late-load warning.
- Fold the harness "not found" alert into CopyNotice.
- Remove the unused disabled-delete props from RowActionsMenu.
- Hoist the agent/copy base in AgentFormPage; add a force-reset regression
  test for the delete modal.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Torey Scheer <87029548+toreysoloio@users.noreply.github.com>
@toreysoloio
toreysoloio marked this pull request as ready for review November 12, 2026 20:04
toreysoloio and others added 4 commits November 12, 2026 15:12
The modal was unmounted the instant it closed, so antd never ran its exit
animation. Keep it mounted until afterClose, which still resets its state
for the next open.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Torey Scheer <87029548+toreysoloio@users.noreply.github.com>
Also name the agent form's copy-source gating once instead of twice.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Torey Scheer <87029548+toreysoloio@users.noreply.github.com>
…onsMenu

Signed-off-by: Torey Scheer <87029548+toreysoloio@users.noreply.github.com>

# Conflicts:
#	ui/src/pages/AgentTemplatesPage.tsx
… row menus

Row menus take a rowActions contribution as data, so the host draws each as a
real menu item with keyboard navigation, per-row visibility and contained
failures. Validated at boot, including across extensions, and documented.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Torey Scheer <87029548+toreysoloio@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add button to create agent/agenttemplate/harness from existing

1 participant