Skip to content

Edit agents through a tabbed settings layout - #87

Open
nicolomagnante-cmd wants to merge 1 commit into
mainfrom
agents/tabbed-edit-settings
Open

nicolomagnante-cmd wants to merge 1 commit into
mainfrom
agents/tabbed-edit-settings

Conversation

@nicolomagnante-cmd

Copy link
Copy Markdown
Contributor

Motivation

Editing an existing agent reused the four-step create stepper. Users editing an agent almost always want to change one specific setting, but the stepper forced them to click Continue through earlier sections to reach it.

What changes

Editing now presents the four configuration sections as a settings-style layout instead of a stepper:

  • Left category railInput · Output · Agent context · Prompt, each directly selectable. No step gating; jump straight to the section you need.
  • Per-section "Save changes" — persists the agent in place (PUT /api/agents/:id) and shows a "Changes saved." confirmation, instead of navigating away. Sections with validation problems are flagged in the rail, and saving from a valid section jumps to any blocking section.
  • Done returns to the agent detail page.
  • Creating a new agent keeps the sequential stepper unchanged.

Also adds a settings shortcut (gear) to each row of the agents list linking straight to the edit page.

Implementation notes

  • Single component (agent-create.tsx) still serves both create and edit, keyed on the agentId route param. The shared CreateDraft state, validation helpers, and saveAgent() are reused unchanged — only the navigation chrome differs between modes (isEditing).
  • No API or schema changes.

Files

  • apps/control-plane/src/pages/agent-create.tsx — conditional settings rail + footer for edit mode; submit split into a reusable persistAgent().
  • apps/control-plane/src/pages/agents.tsx — per-row settings shortcut.
  • apps/control-plane/src/styles.css.agentEditLayout / .agentEditNav* and list action styles.

Checks

pnpm typecheck · pnpm lint · pnpm test (717 passed) · vite build — all green. Rendered and clicked through all four sections with no runtime errors.

Editing an existing agent reused the four-step create stepper, forcing
users to click Continue through sections just to change one setting.

Editing now renders the four sections (Input, Output, Agent context,
Prompt) as a settings-style left rail, each directly selectable with no
step gating. A per-section "Save changes" action persists the agent in
place and shows a saved confirmation; invalid sections are flagged in the
rail. Creating a new agent keeps the sequential stepper unchanged.

Also adds a settings shortcut on each row of the agents list linking
straight to the edit page.
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