Skip to content

feat: pick an automation's agent from a list with avatars - #201213

Merged
vyctorbrzezowski merged 3 commits into
mainfrom
openclaw/automations-agent-select
Nov 18, 2026
Merged

vyctorbrzezowski merged 3 commits into
mainfrom
openclaw/automations-agent-select

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

When you create or edit an automation, the Agent field is a plain text box: you have to know and type an agent's id (such as roboclaw), with no names or avatars to recognize.

User Impact

User impact: in a new or edited automation, the Agent row is now a list of the Gateway's agents with their avatars and names, picked with one click.

  • Default leaves agent selection to the Gateway. It replaces the Advanced "Clear agent override" toggle, which did the same thing.
  • An agent the Gateway no longer has shows as "Not found" and is kept when you save, until you pick another agent.
  • One available agent: the row stays hidden for an inherited choice and stays visible when an existing override can be cleared.
  • Phones: the list opens as a bottom sheet.

Why This Change Was Made

The row now uses the same agent picker as Settings and the rest of the app; that shared picker is unchanged. The data and save path are unchanged: picking an agent saves its id, Default saves no agent (as the old toggle did), and a stored id is kept until you change it. Removed: the agent suggestion list, the "main or ops" placeholder, the typing help text and the clear-agent toggle.

Accepted edge cases:

  • The row waits for the agent list before it appears, so one-agent Gateways never see it flash and vanish.

This PR and the model/reasoning picker PR both remove suggestion lists from the same four editor files, so whichever lands second needs a small rebase (checked with git merge-tree).

Evidence

The Agent row on a new automation. Mocked Gateway with 25 automations and four agents: Roboclaw (default, custom avatar), Ayaan (generated avatar), a long-named agent, and Ops (emoji avatar). Before = 9d6f4a94adf5 (main); after = this branch. Desktop 1280×900 at 2×, light theme unless noted.

The row, closed and opened

Before After
Before: Agent is a text field holding roboclaw After: Agent picker showing Roboclaw's avatar and name
Before: opening the field shows only the focused text box After: menu listing Default (Roboclaw) and every agent with avatars

Headless Chromium doesn't draw the browser's suggestion popup, so the "before, opened" frame shows only the focused field.

Clean comparison (full frame)

Before

Before: new automation with the Agent text field

After

After: new automation with the Agent picker

Before, opened

Before: Agent text field focused

After, opened

After: Agent menu open with avatars

Annotated comparison

Before

Typed agent id highlighted

After

Agent picker trigger highlighted

Before, opened

Text field with no agent list highlighted

After, opened

Agent menu with avatars highlighted

Other states

State Before After
Dark theme, opened Before: dark text field focused After: dark agent menu with avatars
Phone (390 px), opened Before: phone text field After: agent bottom sheet
Agent no longer on the Gateway Before: legacy-bot as plain text After: legacy-bot with a Not found badge
One agent on the Gateway Before: Agent text field After: only the Runs in row

Read-only (no manage access) and long-name states were also captured and checked: both controls dim together when read-only, and a long agent name fits on desktop and truncates with an ellipsis on a phone.

Checked:

  • The Agent and "Runs in" controls share size, text size, radius, background, right edge and vertical center on desktop and phone.
  • A new end-to-end test (4 cases) fails on main and passes here: picking an agent creates the automation for it, a missing agent shows "Not found" and Default clears it, and a one-agent Gateway shows no Agent row.
  • UI typecheck, lint, stylelint, format, i18n verify and the 39 cron unit test files pass.

Clearing an explicit agent when only one is available

Before: the original PR revision (a664e7d29925) hid the Agent row even for a saved override. After: the row remains visible and Default can clear it (dfb857bfe76e). Desktop Chromium with synthetic Gateway data; the original comparisons above show main versus the initial picker implementation.

Before

The editor has a Runs in row but no control to clear its explicit agent

After

The editor shows its saved agent with an avatar and keeps the Runs in row

Annotated comparison

Before After
The Agent control is missing The explicit agent can be cleared

The open menu offers Default without claiming a specific agent

The new browser regression failed on the previous head because the picker was absent and passes on the repaired head. The test verifies that choosing Default sends agentId: null in cron.update. All four picker cases passed.

Worked on by

Work sessions

Linked for team reference; these sessions aren’t public.

roboclaw-bot and others added 2 commits November 18, 2026 12:55
The automation editor's Agent row was a text field: people had to know and
type an agent id. It now uses the shared agent picker, showing each agent's
avatar and name, a Default choice that leaves the agent to the Gateway, and
a stored id that is no longer on the Gateway as Not found until changed.
Default replaces the Advanced "Clear agent override" toggle, and the row is
left out when the Gateway has one agent.

Co-authored-by: vyctorbrzezowski <[email protected]>
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 51ba790a-e921-41af-be86-7fc7e04b387e
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

Replaces the automation editor’s agent ID text field with the shared avatar picker, including Default and missing-agent choices.

Example: Create an automation for the agent with ID writer and name Writer.

  • Before: Type writer into the Agent field.
  • After: Choose Writer from the agent list.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful, visually demonstrated integration with a concrete patch-caused performance-gate failure.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after browser screenshots show the automation editor’s actual shared avatar trigger and menu with synthetic roster data; browser tests additionally inspect the existing cron RPC payload boundary.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Users must know an agent’s ID instead of recognizing its name and avatar when assigning an automation.
Reason: The maintainer-authored direction reuses an established UI component, removes superseded controls, and preserves historical IDs without adding configuration or storage.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this maintainer-authored PR open: the picker improves agent selection, but its CSS growth causes the required performance check to fail.

Priority: P3
Reviewed head: a664e7d29925bcfc5980d22a3466438b369f4f49

Before merge

  • Reduce the added CSS to satisfy the paired performance budget (P2) - The added picker styling makes the required control-ui-performance check fail on this head. Its paired measurements show raw CSS growing from 1,749,495 to 1,749,733 bytes, exceeding the 64-byte growth allowance by 174 bytes while the base is already over its fixed ceiling. Consolidate or offset the styling within the affected owner and rerun the paired check; the inherited ceiling overage does not explain away this additional growth.

Findings

  • [P2] Reduce the added CSS to satisfy the paired performance budget — ui/src/styles/cron.css:664-668
Agent review details

How this fits together

The Automations editor presents the Gateway agent roster and updates the existing cron form, whose save owner sends agent IDs or explicit clearing through cron RPCs.

flowchart LR
  A[Gateway agent roster] --> B[Automation editor]
  B --> C[Shared avatar picker]
  C --> D[Existing cron form]
  D --> E[Cron save owner]
  E --> F[Gateway cron RPC]
Loading

Technical review

Best possible solution:

Keep the shared-picker integration and existing save owner, while consolidating the added styling enough to satisfy the paired CSS budget.

Do we have a high-confidence way to reproduce the issue?

Current-main source confirms the existing text-field interaction, and the supplied screenshots demonstrate the proposed picker; no target code was executed during this review.

Is this the best way to solve the issue?

Reusing the existing picker and retaining the cron save owner is the smallest coherent implementation; the three added browser cases cover distinct selection, clearing, and single-agent behavior.

Full review comments:

  • [P2] Reduce the added CSS to satisfy the paired performance budget — ui/src/styles/cron.css:664-668
    The added picker styling makes the required control-ui-performance check fail on this head. Its paired measurements show raw CSS growing from 1,749,495 to 1,749,733 bytes, exceeding the 64-byte growth allowance by 174 bytes while the base is already over its fixed ceiling. Consolidate or offset the styling within the affected owner and rerun the paired check; the inherited ceiling overage does not explain away this additional growth.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f7c680434384.

Provenance checked

  • Free-form automation agent selection changes intended behavior with a stated reason (feat(ui): unify agent pickers with avatars #112488: The original shared-picker change explicitly retained Cron’s free-form field because it accepted arbitrary IDs.)
  • Automation editor layout and phone styling keeps the original intent (14b9fc3: The schedule redesign retained the Agent/Runs in card and existing form representation; this patch replaces the Agent control within that structure.)
  • Editor suggestion inventory ownership keeps the original intent (c9db735: Editor inventories were kept out of overview and filter work; removing the retired agent suggestion inventory preserves that intent.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm ui:check-performance:base 9d6f4a9
  • pnpm test:ui:e2e ui/src/e2e/cron-agent-picker.e2e.test.ts
  • pnpm lint:ui:styles
  • git diff --check

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 14b9fc3 adds ui/src/pages/cron/view-editor.tsx:139 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 14b9fc3c8d94; files: ui/src/pages/cron/view-editor.tsx)

PR surface

Source +44, Tests +102. Total +146 across 8 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 6 85 41 +44
Tests 2 103 1 +102
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 188 42 +146

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: This is an agent-selection ergonomics improvement; the observed blocker is a small asset-budget regression.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is an agent-selection ergonomics improvement; the observed blocker is a small asset-budget regression.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 18, 2026, 8:30 AM ET / 13:30 UTC.

@vyctorbrzezowski
vyctorbrzezowski merged commit 5cdce0e into main Nov 18, 2026
153 of 159 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the openclaw/automations-agent-select branch November 18, 2026 13:58
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
…01213)

Use the shared avatar picker to choose an automation's agent, while preserving the Gateway default and existing saved IDs.

Maintainer-approved exception: generated CSS size only. Other required checks and security review were verified on the reviewed head.
CI: https://github.com/openclaw/openclaw/actions/runs/44315721140

Co-authored-by: vyctorbrzezowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants