Repository navigation
improve: choose an automation's model and reasoning with the chat composer's pickers - #201218
Conversation
…ckers The automation editor's tray now renders the session composer's model and reasoning controls, fed by the automation form instead of a session. Model choices show catalog names and provider icons; reasoning offers the levels the selected model supports and falls back to Default when a new model drops the chosen level. Default stays the empty payload value, and saved models or levels the catalog does not list are kept on save. Removes the free-text reasoning field and its suggestion list, the custom model entry, and the configured-model suggestion helper they used. Co-authored-by: vyctorbrzezowski <[email protected]>
The tray's model trigger kept the provider's brand color and Chat's smaller chevrons. Chat neutralizes its provider mark only inside its own composer (New Session keeps brand color on purpose), so the tray now gives the mark its label's color and sizes, strokes and tones the chevrons like the schedule selects beside them. Co-authored-by: vyctorbrzezowski <[email protected]>
…poser's pickers Worked on by: - @vyctorbrzezowski Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: b4b5d708-d315-491d-b56a-790b45cc9fe6
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThis PR replaces automation model and reasoning inputs with the chat composer's shared pickers. Example: Create an automation using anthropic/claude-opus-4.5 with reasoning off.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 4 items remain Keep open for focused repair: this useful, maintainer-directed improvement introduces a Settings label regression and fails concrete repository gates. Priority: P3 Before merge
Findings
Agent review detailsHow this fits togetherThe Control UI automation editor projects the model catalog into shared chat controls, writes selections into its existing form, and submits the unchanged cron payload contract. flowchart LR
A[Agent model catalog] --> B[Automation form adapter]
B --> C[Shared model and effort pickers]
C --> D[Automation form]
D --> E[Existing cron payload builder]
E --> F[Gateway cron methods]
Technical reviewBest possible solution: Keep the shared-picker adapter and unchanged cron payload owner, while restoring the shared label, breaking the type cycle, and resolving the suppression and asset-budget failures. Do we have a high-confidence way to reproduce the issue? This is a UI improvement request; current-main source and before screenshots establish the existing raw-reference and free-text controls, while exact-head CI independently demonstrates the reported review defects. Is this the best way to solve the issue? Reusing the chat controls and New Session draft helpers is the appropriate ownership boundary, with focused repairs needed before the implementation is ready. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4f08bdfc2118. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +75, Tests +24. Total +99 across 26 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 18, 2026, 8:44 AM ET / 13:44 UTC. |
Use the existing catalog owner and keep delivery options available before an agent is chosen. Preserve the shared chat overlay and avoid new startup work. Co-authored-by: vyctorbrzezowski <[email protected]>
Pick up the already-landed correction to stale New Session branch suggestion assertions without changing the reviewed model picker diff. Co-authored-by: vyctorbrzezowski <[email protected]>
Remove the agent barrel re-export left unused by #201218. Sessions continue using the watcher directly. Keep the OpenAI client-version floor private; tests read the canonical bundled Codex package pin instead of a test-only production export, while the existing contract still verifies equality. Follow up #201130 by @obviyus and #201218 by @roboclaw-bot, with @vyctorbrzezowski. Runtime model discovery and agent selection are unchanged. Validation: all three Knip export scans report zero entries; 57 OpenAI and version-contract tests, 36 UI unit/browser tests, the agent-switch roster E2E, check:changed, and Codex autoreview through P2 pass. No scan ignores or baseline exceptions. Production LOC: -1. Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]>
…poser's pickers (openclaw#201218) Reuse the chat composer's model and reasoning pickers in the automation editor, while preserving saved overrides. Maintainer-approved asset exception: generated raw CSS size only. Two separate New Session mobile geometry failures reproduced identically on the exact CI base and candidate (composer height 214 to 176 px after agent readiness, and keyboard viewport bottom 876.140625 > 874). The intermittent Chat transcript shard passed its targeted rerun. All other checks and security review were verified on the reviewed head. CI: https://github.com/openclaw/openclaw/actions/runs/44323299861 Co-authored-by: vyctorbrzezowski <[email protected]>
Remove the agent barrel re-export left unused by openclaw#201218. Sessions continue using the watcher directly. Keep the OpenAI client-version floor private; tests read the canonical bundled Codex package pin instead of a test-only production export, while the existing contract still verifies equality. Follow up openclaw#201130 by @obviyus and openclaw#201218 by @roboclaw-bot, with @vyctorbrzezowski. Runtime model discovery and agent selection are unchanged. Validation: all three Knip export scans report zero entries; 57 OpenAI and version-contract tests, 36 UI unit/browser tests, the agent-switch roster E2E, check:changed, and Codex autoreview through P2 pass. No scan ignores or baseline exceptions. Production LOC: -1. Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]>
Remove the agent barrel re-export left unused by #201218. Sessions continue using the watcher directly. Keep the OpenAI client-version floor private; tests read the canonical bundled Codex package pin instead of a test-only production export, while the existing contract still verifies equality. Follow up #201130 by @obviyus and #201218 by @roboclaw-bot, with @vyctorbrzezowski. Runtime model discovery and agent selection are unchanged. Validation: all three Knip export scans report zero entries; 57 OpenAI and version-contract tests, 36 UI unit/browser tests, the agent-switch roster E2E, check:changed, and Codex autoreview through P2 pass. No scan ignores or baseline exceptions. Production LOC: -1. Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> (cherry picked from commit c9f03ee) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit c70c0ea043f8dd7913a3f8120854f4bff27506f0)
What Problem This Solves
When you create or edit an automation, the model and reasoning controls under the prompt looked and behaved unlike the chat composer's: the model menu listed raw refs such as
openai/gpt-5.5, and reasoning was a free-text field where you had to know valid words likelow.User Impact
User impact: the automation editor now uses the same model picker (names, provider icons, provider rail, search) and the same reasoning Effort slider as the chat composer, so choosing a model and a level works the same way in both places.
Why This Change Was Made
The chat model controls already work with a draft target that has no session; the New Session page uses them that way. The automation editor now feeds the same component from the automation form, reusing the New Session draft helpers for the Default model and for reasoning levels that change with the model. The shared chat components gained two optional props that chat doesn't set: trigger ids, so the "can't add yet" list can focus the pickers, and menu placement, so the menus open below the tray instead of being clipped above it. The tray gives the pickers its own ink: the provider mark follows the label and the chevrons use the schedule selects' size, stroke and tone, because chat neutralizes its provider mark only inside its own composer (New Session keeps brand color on purpose). The superseded reasoning field, its suggestion list, the custom model entry, the configured-model suggestion helper, and their strings and styles are removed.
This PR merges cleanly with the schedule tray PR #201214. It conflicts with the agent picker PR #201213 in
view-editor.tsx,view-props.ts,view-suggestions.tsxandview.test-support.tsbecause both remove suggestion lists, so whichever lands second needs a small rebase (checked withgit merge-tree).Model choices come from the automation's effective agent. If its owner is not resolved yet, the controls keep a generic Default and preserve saved overrides while delivery options remain available.
Evidence
Real Control UI production build with a mocked Gateway: 25 automations (long names, a failed run, paused rows) and a 10-model catalog across three providers, each model with its own reasoning levels. Before is
9d6f4a94adf5(main); after is this branch. Desktop 1280×900, cropped to the editor; phone 390×900.Clean comparison
Before, tray closed: the model shows "Default" and reasoning is grey "low" text.
After, tray closed: the chat composer's GPT-5.5 and Low pickers.
Before, model menu: raw model refs.
After, model menu: the chat composer's menu with names, the provider rail and search.
Before, reasoning: a focused text field (Chromium screenshots don't render the native suggestion popup).
After, reasoning: the Effort slider with GPT-5.5's levels.
Annotated comparison
Chat composer for comparison
This PR doesn't change the chat composer; before and after are pixel-identical in the composer region.
Dark theme and phone
On a phone, the menus open as the chat composer's mobile sheet.
Checks run
model: anthropic/claude-opus-4.5, thinking: off.tsgo:ui, oxlint, stylelint, oxfmt, i18n verify and the Control UI controller guard.Size and gaps
Production code: +208/−133 lines, which includes the new 120-line adapter. Tests: +195/−171. Removed: the configured-model suggestion helper and its test, the thinking suggestion list, and the custom-model and reasoning-field strings and styles. Not run locally: full lint, the full UI e2e suite and WebKit; CI covers them. Not captured: the chat composer at phone width, whose pickers live in a separate mobile surface.
Current revision: models follow the automation agent
The sidebar remains on Clawd while the automation targets Writer. The controls show Writer's default model and reasoning, then open the same menu below the schedule tray. Synthetic Gateway in Chromium at 1280 × 900, exact published head
3c921b9dcae.The combined preview passed 221 focused tests and 12 Chromium scenarios. Separate real-Gateway checks passed for model search during a catalog refresh, preserving edits across catalog failure and recovery, and saving and running an automation for its owner. The paired combined build kept Chat's request count and cut its compressed JavaScript by 216 bytes; only raw CSS was above the paired limit.
Worked on by
Work sessions
Linked for team reference; these sessions aren’t public.