Repository navigation
fix(ui): persist per-agent settings changes - #117107
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed July 31, 2026, 7:46 PM ET / 23:46 UTC. ClawSweeper reviewWhat this changesThe branch changes Control UI per-agent model, tools, skills, and node-binding configuration writes from legacy array paths to canonical keyed Merge readinessKeep this PR open for normal maintainer review: current main still constructs per-agent UI mutations through the retired Priority: P1 Review scores
Verification
How this fits togetherThe Control UI loads the Gateway configuration snapshot, stages edits in a form draft, and sends the whole serialized draft through flowchart LR
A[Gateway config snapshot] --> B[Control UI runtime config draft]
B --> C[Keyed agent entry resolver]
C --> D[Agent settings and model panels]
C --> E[Node binding and sibling readers]
D --> F[Gateway config.set validation]
E --> F
F --> G[Persisted configuration or visible save error]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +3, Tests +409. Total +412 across 29 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the shared keyed-entry resolver and its Agent/Node callers once the exact-head checks complete, retaining the explicit active-panel error path and the regression coverage for canonical Do we have a high-confidence way to reproduce the issue? Yes—source establishes a direct current-main path: Agent settings stage mutations under Is this the best way to solve the issue? Yes—the shared runtime-config resolver is the best repair boundary because Agents and Nodes otherwise duplicate array-index lookup and mutation policy. Updating only the Tools panel or only rendering an error would leave sibling configuration paths on the retired shape. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 01cd336a635e. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
ClawSweeper before-merge disposition for reviewed head
The draft can move to ready-for-review so GitHub runs the full exact merge-result CI. No merge is authorized in this workstream. |
Closes openclaw#117046 Per-agent model, tool, skill, and node-binding edits in the Control UI were written to the retired `agents.list` shape, so the strict Gateway schema rejected them. Save failures could then be hidden by an immediate roster refresh. Route all affected writers through the canonical keyed `agents.entries` resolver, preserve authored keys, reject unsafe keys, align adjacent cron and swarm readers, and keep failed saves dirty with the Gateway error visible in the active panel. Validated with the exact Testbox changed gate, full CI, 314 focused UI tests, 11 Playwright scenarios, 42 Gateway config tests, clean autoreview, and ClawSweeper review.
Closes #117046
What Problem This Solves
Fixes an issue where users changing per-agent model, tool, skill, or device settings in the Control UI could save to a retired configuration path, so the intended setting would not persist. Save failures could also be obscured by an immediate roster refresh.
Why This Change Was Made
All affected Control UI paths now resolve one canonical
agents.entriestarget through the shared runtime-config capability. The resolver preserves authored agent keys, rejects unsafe keys, and is shared by Agents and Nodes; adjacent cron and swarm readers now consume the same canonical shape. Failed saves remain dirty and render the Gateway error in the active panel.User Impact
Per-agent settings now persist through the current Gateway schema, and validation failures are visible instead of looking like successful saves.
Evidence
node scripts/check-changed.mjson Blacksmith Testbox,coreTests + ui, exit 0 (run).{ "scenario": "agent tools config save", "changedPath": "settings/agents/main/tools", "gateway": "mock", "provider": "mock", "result": "pass", "evidence": "config.set raw used agents.entries.main.tools, omitted agents.list, preserved baseHash, and surfaced INVALID_REQUEST" }