Skip to content

fix(ui): keep the selected agent across Settings pages - #148667

Merged
Patrick-Erichsen merged 3 commits into
mainfrom
codex/claw-831-settings-agent-selector
Sep 15, 2026
Merged

Patrick-Erichsen merged 3 commits into
mainfrom
codex/claw-831-settings-agent-selector

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Choosing Research in Models and then opening Agents resets the selection to Clawd. Settings pages also repeat the same agent picker.

User Impact

Choose an agent once in the Settings sidebar and retain it across Models, Memory, Skills, Agents, and Profile's agent GitHub summary. The selector uses an avatar, name, and chevron without a Default badge. Its menu heading shares New Chat’s small, muted uppercase styling. Keyboard focus, mobile navigation, browser history, chat selection, and global defaults keep their existing meanings.

Why This Change Was Made

A separate Settings instance of the existing selection capability owns the choice. Pages consume it, duplicate controls are removed, and stale results cannot replace newer choices. Empty or system-only rosters disable agent actions while global model defaults remain editable. Escape closes the menu and restores focus without leaving Settings. Both Control UI guides now explain the independent Settings and chat selections.

There is no persisted schema, vector metadata, retention, permission, or Gateway protocol change. Memory changes only select the existing request target and reject stale UI results.

Evidence

  • Baseline-failing browser regressions cover cross-page selection retention. New regressions also failed before the Profile GitHub targeting and desktop/mobile Escape fixes, then passed afterward.
  • Final focused run: 132 tests pass. Broader Profile/GitHub run: 96 tests pass. These sets overlap. An earlier collection failure was resolved by regenerating Vitest's task-local transformed-module cache through its supported clear-cache command, with unchanged assertions.
  • Affected bundled browser run: 88/89 pass, including real-Gateway agent-file saves. The remaining catalog-publication case fails during CLI dashboard setup before browser entry, identically on untouched baseline 78520903d42; it is a local baseline blocker. The final three-file browser rerun passes all 15 cases, including both Escape cases.
  • Production UI build and final check-changed run passed (exit 0), including type checks, formatting, i18n, dead exports, repository guards and core lint. Targeted UI lint and stylesheet checks also passed.
  • Independent review found no actionable P0–P2 findings. Captures show the real UI with isolated synthetic Gateway state at desktop and mobile sizes.
  • Updated manual inventory: 34 rows; 28 pass, 3 fail, 3 partial. The nine formerly partial rows now comprise 5 passes, 3 failures and 1 partial result. Actual iOS simulator entry/navigation passes; two native-device pages remain partial for untested controls. Passes cover recorded actions and stated service boundaries. Migration-specific verification passed; broader Settings defects and untested service/hardware controls are recorded separately below.

Remaining-control verification

The broader checks confirmed one pre-existing defect: empty object entries in Talk providers, Communications TTS personas/providers, and nested Skills disappear when autosave prunes the empty draft. Talk reproduces on original baseline 78520903d424 as well. The repair is open in PR #148745, with passing targeted tests and real-Gateway before/after proof. No known selector regression remains.

Notification correction: the earlier overlapping-save script used Playwright selectOption while the preference stack was inert, bypassing the existing save lock. Fresh trusted desktop/mobile pointer and keyboard checks preserve the accepted edit in real Gateway SQLite and after reload. No user-reachable lost update was established, and no notification code change is being made. The earlier classification as an ordinary-user defect was incorrect.

All hosted CI jobs passed on 24a42d5d465d56bfdb9697a7c5ff4288d40c1eb4 (run 34922083986). The maintainer approved landing the selector migration after accepting this scope distinction. Some advanced/generated controls, external-service authentication, and hardware actions remain unverified; the checklist below records those limits.

After Add Entry After autosave
Talk provider draft appears Talk provider draft disappears

Actual iOS app on an isolated iPhone simulator: Research stays selected while navigating from Settings to Appearance (cropped captures). The same selection check passed for Models, Agents, Memory and Skills, then returning to Clawd. This verifies native navigation, not all destination controls or physical hardware.

Native Settings Native Appearance
Native Settings Research Native Appearance Research retained

Menu heading polish

Settings now uses the shared New Chat heading style. Inspected on desktop, laptop, tablet, and phone; all seven computed style properties match and Escape restores trigger focus. The focused browser run passes all 9 cases, including the migrated default-agent ownership check. Independent delta review found no actionable P0–P2 issues. Incremental check-changed against the prior reviewed head 055bbbc85a2 passed. The default comparison against newer origin/main stops on unrelated workboard max-lines entries; no ratchet exceptions were changed.

Heading before Heading after
Settings menu heading before Settings menu heading after
Models before Models after
Models before Models after
Agent retention and mobile navigation
Before: Agents resets to Clawd After: Research stays selected
Agents before Agents after
Mobile before Mobile after
Mobile before Mobile after

Interaction recording captured before the menu-heading polish above:

settings-option-a-interaction.mp4
Manual page-by-page checklist and coverage limits
# Destination Result Observed behavior / limit
01 Ask OpenClaw Pass Its assistant session remains independent of Settings selection.
02 Profile Pass Personal writes retain profile ID; GitHub summary/link follow Research. External login unexecuted.
03 Appearance Pass Available controls, public theme import/clear, advanced/custom fields and real preference/config persistence passed. No physical camera capture.
04 Notifications Pass Real browser delivery and persistence pass. Trusted desktop/mobile inputs respect the save lock; the earlier scripted overlap bypassed it and was not a valid user-flow failure.
05 This device Partial Actual iOS app page and Research retention pass; capability controls and physical hardware remain untested.
06 Device permissions Partial Actual iOS app page and Research retention pass; grant/revoke and physical-device actions remain untested.
07 Gateway Pass Synthetic replacement clears old selection until the new roster arrives.
08 Channels Partial Real loopback Telegram wizard, probe, pairing and saves pass; advanced generated fields and other-service setups remain untested.
09 Communications Fail Real transcript capture/store/library/export pass; new TTS persona/provider entries disappear during autosave.
10 Talk Fail Wake/global scalar saves persist; provider Add Entry disappears before human editing. Exact baseline reproduces it.
11 Devices Pass Real policy/node SQLite, bindings, token rotation, setup grants, decode/expiry/revoke pass. Node transport emulated; no host execution.
12 Cloud workers Pass Real profile/pool/repository/retention persistence and synthetic item actions pass. No cloud allocation or real image deletion.
13 Agents Pass Seven tabs, history and Research file/tool/skill writes; late save acknowledgement leaves Clawd unchanged.
14 Models Pass Credential requests use Research; model defaults stay global; empty roster disables agent actions.
15 Plugins Pass Installed/discovery/detail tabs and representative settings preserve plugin/global scope; no installation.
16 Skills Settings Pass Selected-agent reads, key-owned updates and stale-result rejection; no actual installation/import.
17 MCP Pass Server enable/disable remains global; no server process or OAuth.
18 Memory Pass Four tabs, search/detail, global dream settings and stale-result rejection; import remains separately owned.
19 Automation Pass Four tabs and reversible cron edit stay global; no hook delivery.
20 Privacy & Security Pass Global controls retain scope; reader controls disabled; pairing cancelled.
21 Secrets Pass Synthetic entry write retains secret name, with no agent field; external persistence untested.
22 Approvals Pass History/grant identity retained; synthetic revoke targets exact grant ID.
23 Infrastructure Pass Five tabs and discovery edit stay global; nested schema combinations not exhaustive.
24 Labs Pass All five gates toggle on/off globally; chat operation context unchanged.
25 Advanced Pass All 19 sections visited; raw draft survives agent switch and leave/return; generated fields not exhaustive.
26 Debug Pass Model diagnostics follow selected agent; Gateway diagnostics stay global.
27 Logs Pass Loading/filter/export/stream/error recovery stay Gateway-wide.
28 Updates Pass Synthetic policy edits stay global; confirmation cancelled, no update dispatched.
29 About Pass Metadata, links, Wave and copy retain install/Gateway identity.
30 AI agents Fail Real settings and session archival pass; new Skills entry disappears. Additional generated fields remain untested.
31 Model setup Pass Normal setup targets Settings selection; first-run uses main and returns to its chat.
32 Lobsterdex Pass 42 cards, anchor/copy and return navigation preserve Settings context.
33 Settings entry Pass Desktop redirect plus actual native iOS Settings list: Research retained across five page visits and return; Clawd switch passes.
34 Legacy General / config Pass Appearance/language and model-behavior redirects preserve destinations.

All checks used isolated synthetic data. The follow-up used real Gateway/config/SQLite owners, actual browser push delivery, and an actual iOS simulator app where stated. Node transport and cloud-service actions were simulated. No external person was messaged, no paid cloud resource was allocated, and no production service was restarted or deployed. Advanced/generated fields, external-service authentication and physical hardware remain explicit coverage gaps; passed rows retain their stated boundaries.

@clawsweeper

clawsweeper Bot commented Sep 15, 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.

@Patrick-Erichsen
Patrick-Erichsen marked this pull request as ready for review September 15, 2026 01:05
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Sep 15, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 14, 2026, 11:24 PM ET / September 15, 2026, 03:24 UTC (Revision 4).

ClawSweeper review

What this changes

The Control UI shares one Settings agent selector across agent-scoped pages, preserves newer choices against late results, and keeps chat selection and global settings separate.

Merge readiness

⛔ Blocked before merge - 2 items remain

This remains a useful fix for behavior still present on main. No blocking introduced defect was found; the earlier documentation finding is resolved, and the generic stored-data compatibility warning is unsupported by the diff.

Priority: P2
Reviewed head: 24a42d5d465d56bfdb9697a7c5ff4288d40c1eb4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent ownership fix with useful visual evidence and focused regressions, with no actionable blocking finding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The Settings selection owner is exercised by the captured real-UI walkthrough and inspected iOS simulator screenshots retaining Research across navigation; reported real-Gateway checks cover scoped writes and stale acknowledgements. Broader service and hardware gaps are outside this fix.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The Settings selection owner is exercised by the captured real-UI walkthrough and inspected iOS simulator screenshots retaining Research across navigation; reported real-Gateway checks cover scoped writes and stale acknowledgements. Broader service and hardware gaps are outside this fix.
Evidence reviewed 10 items Verified introduced scope: The local merge-base-to-head comparison supplies all 90 introduced paths, including paths omitted from the supplied bounded patches. Changes are confined to Control UI source, tests, styles, two guides, and a shrinking max-lines baseline. The stale test merge was not used to attribute base-branch changes to this PR.
Current main still has the original selection boundary: Agents still resolves its page-local selection from route data and the roster default rather than sharing the Models selection. This supports the reported Models-to-Agents reset; the new Settings selection owner is absent from fetched main.
Latest release retains page-local selection: GitHub release metadata confirms v2026.9.4, published September 11. Reading its Agents page through the contents API confirms the same local selection/default resolution and post-save selection restoration. This does not establish an already-shipped fix.
Findings None None.
Security None None.

How this fits together

The Control UI turns sidebar choices and page URLs into agent-scoped Gateway requests. Settings now has its own in-memory selection owner, while chat and global configuration retain their existing owners.

flowchart LR
  A[Settings sidebar choice] --> C[Settings selection]
  B[Page URL intent] --> C
  D[Configured agent roster] --> C
  C --> E[Agent-scoped Settings pages]
  E --> F[Gateway requests and results]
  G[Chat selection] --> H[Chat and Skill Workshop]
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus test growth Production net +171 lines; tests and test support net +766 lines Production growth supports shared selection and stale-result handling; most added coverage checks navigation and ownership boundaries.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files, vector/embedding metadata: ui/src/pages/config/memory.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep one in-memory Settings selection owner, with roster-validated targets, stale-result rejection, and independent chat and global configuration ownership.

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

Yes: select Research in Models, then open Agents without an explicit agent URL; current-main source independently resolves Agents to its local/default selection. This review did not execute the flow.

Is this the best way to solve the issue?

Yes: reusing the selection capability and migrating Settings consumers removes competing page choices without changing persisted settings or Gateway contracts.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This fixes a reproducible multi-agent Settings navigation inconsistency with a limited UI blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The Settings selection owner is exercised by the captured real-UI walkthrough and inspected iOS simulator screenshots retaining Research across navigation; reported real-Gateway checks cover scoped writes and stale acknowledgements. Broader service and hardware gaps are outside this fix.
  • proof: sufficient: Contributor real behavior proof is sufficient. The Settings selection owner is exercised by the captured real-UI walkthrough and inspected iOS simulator screenshots retaining Research across navigation; reported real-Gateway checks cover scoped writes and stale acknowledgements. Broader service and hardware gaps are outside this fix.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The Settings selection owner is exercised by the captured real-UI walkthrough and inspected iOS simulator screenshots retaining Research across navigation; reported real-Gateway checks cover scoped writes and stale acknowledgements. Broader service and hardware gaps are outside this fix.

Evidence

What I checked:

  • Verified introduced scope: The local merge-base-to-head comparison supplies all 90 introduced paths, including paths omitted from the supplied bounded patches. Changes are confined to Control UI source, tests, styles, two guides, and a shrinking max-lines baseline. The stale test merge was not used to attribute base-branch changes to this PR. (24a42d5d465d)
  • Current main still has the original selection boundary: Agents still resolves its page-local selection from route data and the roster default rather than sharing the Models selection. This supports the reported Models-to-Agents reset; the new Settings selection owner is absent from fetched main. (ui/src/pages/agents/agents-page.ts:356, 51ea3dbd67e4)
  • Latest release retains page-local selection: GitHub release metadata confirms v2026.9.4, published September 11. Reading its Agents page through the contents API confirms the same local selection/default resolution and post-save selection restoration. This does not establish an already-shipped fix. (ui/src/pages/agents/agents-page.ts:356, 3a9d69db306c)
  • No new persisted selection or migration: Bootstrap creates Settings selection with neither a persistence adapter nor a preferences adapter. Its configured-roster validation, pending deep-link intent, and intent revision are runtime state. Memory edits pass that selection to existing request owners without changing stored formats. (ui/src/app/bootstrap.ts:284, 24a42d5d465d)
  • Global defaults and credential boundaries remain distinct: Global defaults retain their existing agents.defaults patch shape and runtime configuration owner. The extracted availability check still requires a connected client, canPatch permission, matching config client, and loaded config; credential operations additionally require a selected agent and retain final dispatch checks. (ui/src/pages/model-providers/config-mutation.ts:167, 24a42d5d465d)
  • Focused regression coverage: Inspected browser coverage exercises cross-page retention, browser back/forward, independent chat ownership, global defaults, mobile navigation, and Escape focus restoration. Focused owner tests cover cold links, newer selection intent, removed agents, stale results, and queued identity-write rejection. Tests were inspected, not executed during this read-only review. (ui/src/e2e/settings-agent-selector.e2e.test.ts:94, 24a42d5d465d)

Likely related people:

  • Patrick-Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-15T01:12:43.408Z sha 68b09cf :: blocked before merge. :: [P3] Update the documented Settings agent-selection workflow
  • reviewed 2026-09-15T02:14:51.623Z sha 055bbbc :: blocked before merge. :: none
  • reviewed 2026-09-15T02:46:40.572Z sha 24a42d5 :: blocked before merge. :: none

@Patrick-Erichsen

Patrick-Erichsen commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor Author

The maintainer has approved landing this selector migration and handling the two pre-existing Settings defects as separate fixes.

The two compatibility checklist items in the latest review are not applicable to this diff. The complete 90-path comparison contains Control UI source/tests/styles, two guides, and a shrink-only max-lines baseline. Bootstrap creates the Settings selection without a persistence or preference adapter. Memory only changes request targeting and stale-result rejection; stored data, embedding/vector metadata, schemas, upgrade contracts, permissions, and Gateway protocols are unchanged. Global defaults retain their existing config shapes and write authority. The review itself confirms these facts and reports no actionable findings.

Migration-specific browser/state checks, independent review, exact-head hosted CI, and inspected desktop/mobile/native screenshots pass. The notification lost update and disappearing empty entries reproduce before this migration and remain documented in the PR. Broader integration and hardware coverage limits do not block the selector cutover.

@Patrick-Erichsen
Patrick-Erichsen merged commit dd52d73 into main Sep 15, 2026
145 of 147 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the codex/claw-831-settings-agent-selector branch September 15, 2026 03:31
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
* fix(ui): keep the selected agent across Settings pages

* fix(ui): refine Settings agent selection and keyboard behavior

* fix(ui): match settings agent heading to new chat
vincentkoc added a commit that referenced this pull request Sep 15, 2026
* commit 'd8e50a38fd1c4df6dd69bcbc155697c464e1be45': (23 commits)
  fix(cron): release queued reservations when activation fails (#141008)
  fix(gateway): reduce CPU work in session lists and searches (#148713)
  feat(gateway): add admin CPU profile diagnostics (#148004)
  fix(gateway): cap device-required probe cache to prevent unbounded growth (#147708)
  fix(ci): align Gateway E2E expectations (#148653)
  refactor(ai): remove unused overflow wrapper (#148719)
  feat: stage selected chat text as editable comments (#148649)
  fix(ci): admit reachable release refs with large histories (#148161)
  fix(agents): allow authorized email CLI actions (#148521)
  improve(agents): trim large tool results with less CPU (#148718)
  refactor(docker): share image version parsing (#148243)
  fix(ci): retain passing hosted checks after skipped duplicates (#148722)
  fix(update): report configuration failures during repair (#144819)
  refactor(imessage): share handle classification (#148229)
  fix(ui): keep the selected agent across Settings pages (#148667)
  test(telegram): reuse deferred fixture helper (#148501)
  fix(media): resize images before understanding (#122431)
  fix: preserve unfinished work during completed PR cleanup (#148704)
  refactor(migrate-hermes): reuse canonical config record coercion (#148645)
  perf(channels): reduce history worker metadata footprint (#148711)
  ...
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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant