Repository navigation
fix(ui): keep the selected agent across Settings pages - #148667
Conversation
|
🦞👀 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: blocked before merge. Reviewed September 14, 2026, 11:24 PM ET / September 15, 2026, 03:24 UTC (Revision 4). ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherThe 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]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
|
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. |
|
Merged via squash.
|
* 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
* 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) ...
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
78520903d42; it is a local baseline blocker. The final three-file browser rerun passes all 15 cases, including both Escape cases.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
78520903d424as 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
selectOptionwhile the preference stack wasinert, 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.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.
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
055bbbc85a2passed. The default comparison against newerorigin/mainstops on unrelated workboard max-lines entries; no ratchet exceptions were changed.Agent retention and mobile navigation
Interaction recording captured before the menu-heading polish above:
settings-option-a-interaction.mp4
Manual page-by-page checklist and coverage limits
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.