Repository navigation
improve(ui): edit model and reasoning while replies run - #160440
Conversation
Co-authored-by: hxy91819 <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
Codex review: needs maintainer review before merge. What this changesThis PR lets users change model and reasoning preferences during replies while preserving settings already assigned to admitted turns. Example: A reply uses Example A while another message waits, and the user selects Example B with High reasoning.
Review scores
ProductKind: Preference · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it delivers an approved preference change that current main still lacks, and the repaired head has no actionable findings. The earlier conflict and draft blockers are cleared; exact-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherControl UI selections enter the existing session-patch owner, which persists preferences and refreshes waiting work; reply admission captures each turn's selection before execution. flowchart LR
A[Model and reasoning controls] --> B[Session patch owner]
B --> C[Stored session preferences]
B --> D[Waiting followup queue]
D --> E[Reply admission owner]
E --> F[Agent execution]
Technical reviewBest possible solution: Keep preference changes in the existing session-patch owner and freeze waiting work’s model, account, and reasoning selection at admission. Do we have a high-confidence way to reproduce the issue? The busy-state restriction is intentional behavior visible on current main and in the before screenshot; this PR changes that policy rather than repairing an established bug contract. Is this the best way to solve the issue? The implementation reuses session mutation ordering and reply admission, removes the superseded selector cache, and isolates admitted turns from subsequent preference edits. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bc524d890300. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -49, Tests +794, Docs +8. Total +753 across 22 files. Added test files: 2. View PR surface stats
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 HistoryReviewed October 9, 2026, 11:50 PM ET / October 10, 2026, 03:50 UTC (Revision 3). |
Integrate current main while preserving the existing contribution. Keep queued fallback probes bound to admission and publish thinking-only directive changes without interrupting the active reply. Co-authored-by: hxy91819 <[email protected]> Co-authored-by: steipete <[email protected]>
|
@clawsweeper re-review the repaired head 77d63d6. Current-main conflicts are resolved, queued fallback probes retain the admitted selection through execution, and thinking-only directives refresh waiting turns. Peter has explicitly authorized this behavior and landing; focused backend/UI and bundled-browser boundary proof pass. |
|
🦞👀 Re-review progress:
|
Update desktop and mobile browser expectations for the approved preference selector policy. Both browser suites pass all 13 cases, including fallback, reload, and recovery. Co-authored-by: steipete <[email protected]> Co-authored-by: hxy91819 <[email protected]>
Align remaining runtime and mounted-pane assertions with the approved saved-preference display. Retain independent execution-metadata assertions and reentrant event coverage; all 34 cases pass. Co-authored-by: steipete <[email protected]> Co-authored-by: hxy91819 <[email protected]>
|
Merged via squash.
|
) * improve(ui): edit model and reasoning while replies run Co-authored-by: hxy91819 <[email protected]> * test: keep saved model preference visible through fallback Update desktop and mobile browser expectations for the approved preference selector policy. Both browser suites pass all 13 cases, including fallback, reload, and recovery. Co-authored-by: steipete <[email protected]> Co-authored-by: hxy91819 <[email protected]> * test: preserve preference labels across observed runtime events Align remaining runtime and mounted-pane assertions with the approved saved-preference display. Retain independent execution-metadata assertions and reentrant event coverage; all 34 cases pass. Co-authored-by: steipete <[email protected]> Co-authored-by: hxy91819 <[email protected]> --------- Co-authored-by: hxy91819 <[email protected]> Co-authored-by: steipete <[email protected]>
… switch model (#160440) (extracted hotfix) Original subject: improve(ui): edit model and reasoning while replies run (#160440). Extracted from #160440 (f499f82): took only the one-line src/auto-reply/reply/queue/state.ts fix that deletes run.autoFallbackPrimaryProbe beside hasAutoFallbackProvenance when refreshQueuedFollowupSession rewrites the model selection. On the branch, after /model on a session running on an auto-fallback model, a queued follow-up kept its primary-probe record and could run on the old model. Extended the existing state.test.ts retarget case to cover the probe. Left out the Control UI live model/reasoning editing feature, admission changes, and the sessions.patch rework: they are feature work. Extracted-from: f499f82 Co-authored-by: hxy91819 <[email protected]> Co-authored-by: steipete <[email protected]>
Release provenance: 89329f6 -> #168587 Release provenance: e6a9022 -> #168905 Release provenance: 15f3f12 -> #162266 Release provenance: 20805b8 -> #169430 Release provenance: 568fec8 -> #169102 Release provenance: 39dba6d -> #160440 Release provenance: 5df28c7 -> #168393 Release provenance: 10bcd8e -> #168164 Release provenance: dc5f1f5 -> #168446 Release provenance: 9f1e441 -> #168044 Release provenance: 5a235fc -> #168651
Closes #160428
What Problem This Solves
The Control UI prevents users from choosing a model or reasoning effort while a reply is in progress, even when they only want to change the preference for waiting work.
User Impact
Users with existing write access can change model and reasoning preferences during sending, preparation, and streaming. The selector displays the chosen preference immediately, with no next-turn badge or toast. Already admitted turns keep their settings; ordinary waiting messages use the latest successfully saved preference, preserving explicit-turn thinking overrides.
Model-switch-in-progress, offline/backend, sharing/role, model-validation, rollback, and stale-navigation/reconnect protections remain. Fast, account, and context-window controls retain their existing busy guards. No native-app or administrator-policy changes.
Maintainer direction: @steipete has requested this busy-time model/reasoning preference behavior and authorized repair and landing. Current-main conflicts are resolved; repaired queued-selection races are covered by regression tests. No deployment is included.
Why This Change Was Made
This deliberately changes the previous busy-state UX policy; it does not hot-switch an executing model call. The preference selector no longer borrows its label from an active/fallback execution. The now-unused selector-only observation cache is removed; recorded execution metadata is unchanged.
Thinking-only patches now refresh waiting work without rebinding its model/account or clearing fallback provenance. Queued selection is copied at the admission owner's writer fence—not before waiting or after source adoption—so a concurrent committed preference is included, but later edits cannot change the admitted turn or its lifecycle bindings.
Evidence
Final-head CI passed: run 38022861806, head
31892600062dfd9ee4a16f736d7591947978bef9.Red/green regressions for sending/preparing/streaming controls, denied states, and thinking-only queue updates.
Real
sessions.patch, storage, queue drain, and admission tests: A stays on X; waiting B/C follow Y; after B is admitted, Z changes only C. Deterministic barriers reproduce and fix the pre-admission stale-copy race and check the post-admission boundary.Explicit thinking/default precedence, rejected patches, queued route/auth/fallback preservation, model-switch consistency, settings/send ordering, rollback, stale ownership, and retained execution metadata are covered.
Fresh Codex autoreview through P2: scoped-clean after resolving the admission race.
Actual baseline and candidate production UI builds, matched light theme and 1200 × 853 viewport, with synthetic public-safe models/content. Screenshots use a deterministic mock Gateway, not paid/live inference. The interaction proof saves model and effort while the same reply continues; no abort or replacement send occurs.
Current-main repair: queued fallback probes now retain their admission-fenced model/account through execution, and thinking-only
/thinkcommands refresh waiting work without rebinding its route. The bundled browser E2E now passes (1.73 s test time; 29.06 s including build/startup), closing the earlier loopback-preflight gap. Backend boundary tests: 240 passed across 11 files (166.53 s wall including 35.54 s shared compilation). Updated UI coverage: 229 passed across four files; the final two changed test files passed 178 tests in 12.27 s wall. P0–P2 autoreview of repaired production head77d63d665c4bis scoped-clean; later commits only align inspected test expectations with this approved behavior. The inherited catalog browser expectations were updated for this intentional display-policy change: both affected browser files now pass all 13 cases (87.66 s including build/compiler startup; desktop/mobile fallback cases 2.67/2.34 s). The remaining runtime-label and mounted-pane expectations were aligned too: 34 cases passed in 12.63 s, with execution-metadata and reentrant-event assertions retained. Core/UI types, all selected test type graphs across completed runs, and changed-file lint pass. One full local check stopped on an intermittent native TypeScript compiler nil-pointer panic in the agents-sessions graph; a scoped repeat passed without source changes. The compiler cause is unresolved, and no single all-green full local gate, live-provider, or full-suite pass is claimed.The before/after images below are the original PR’s inspected synthetic production-bundle captures; current-main behavior was reverified by the bundled browser test.
Before
After
Original-head focused checks and test cost (before current-main integration)
node scripts/run-vitest.mjs <files> --maxWorkers=1,node scripts/run-tsgo.mjs,node scripts/run-oxlint.mjs, and the changed-check planner.e433bfda89c486f98dfb03586dacd1e23b6f820b. Media and local proof files are not committed.Worked on by
Work sessions
View the OpenClaw team session