Repository navigation
fix(ui): show model changes only after sending a message - #184702
Conversation
Keep model choices out of chat history until an input is sent, preserve the horizontal notice design, and avoid repeating model aliases in confirmation.
|
🦞👀 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. What this changesThis PR records model changes with submitted messages, restores horizontal notices, and removes repeated model names from confirmation. Example: Choose Demo model B, then return to Demo model A before sending.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this useful maintainer-authored PR open: the previous finding is resolved, but the latest rendering change introduces a static import cycle that blocks the architecture check. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Control UI patches session preferences through the Gateway; accepted user messages persist selection metadata, which chat history projects into model-change notices. flowchart LR
A[Model picker] --> B[Session preference owner]
B --> C[Accepted input recorder]
C --> D[Session and transcript storage]
D --> E[Chat history projection]
E --> F[Horizontal notice]
Technical reviewBest possible solution: Preserve accepted-input ownership and synchronous notices, move their shared props contract out of the reverse import, and verify existing-state upgrades. Do we have a high-confidence way to reproduce the issue? Current-main source appends a notice during sessions.patch before any message is sent, and inspected before images show the repeated confirmation names and System bubble. Is this the best way to solve the issue? The existing session and accepted-input owners are appropriate, and the prior baseline defect is repaired; the eager rendering import needs a one-directional props contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 99f7a303e3ff. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +123, Tests +166, Docs 0. Total +289 across 22 files. Added test files: 0. 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 HistoryReview history (1 earlier review cycle)
Reviewed October 26, 2026, 1:37 PM ET / 17:37 UTC (Revision 2). |
|
Addressed in 46e6c8d. The existing session owner now retains the submitted-model baseline across picker edits and advances it in the accepted user-message transaction. The composed sessions.patch → chat.send regression uses pre-change history; it fails on b73de6c and passes with the fix. The focused backend suites pass all 64 cases. The updated 49-second video also shows the notice entering without a loading placeholder or a subsequent height contraction. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…4702) * fix(ui): show model changes only after sending a message Keep model choices out of chat history until an input is sent, preserve the horizontal notice design, and avoid repeating model aliases in confirmation. * fix(chat): stabilize submitted model-change notices * fix(chat): correct notice imports and fallback fixture
Skip the native transcript metadata SELECT when the compressed frame, prepared report, and encoder-derived minimum cannot satisfy the existing savings threshold. Preserve byte-identical transcript/provider data, model-selection facts, restart delivery, and PostgreSQL behavior. Addresses the redundant payload work from #185730 and #184702. Synthetic Gateway proof reduces ordinary warm turns from 48 to 45 SQL statements, with 13 worker requests and zero MAIN SQL unchanged; all fourteen turns and restart flows pass. The first sealed-history fingerprint from #186046 remains required. Validated with payload and prompt-prefix tests, 48 byte-equivalent variants, two isolated code reviews plus a type-correction delta review, and exact-head CI/PostgreSQL conformance.
…aw#188655) Skip the native transcript metadata SELECT when the compressed frame, prepared report, and encoder-derived minimum cannot satisfy the existing savings threshold. Preserve byte-identical transcript/provider data, model-selection facts, restart delivery, and PostgreSQL behavior. Addresses the redundant payload work from openclaw#185730 and openclaw#184702. Synthetic Gateway proof reduces ordinary warm turns from 48 to 45 SQL statements, with 13 worker requests and zero MAIN SQL unchanged; all fourteen turns and restart flows pass. The first sealed-history fingerprint from openclaw#186046 remains required. Validated with payload and prompt-prefix tests, 48 byte-equivalent variants, two isolated code reviews plus a type-correction delta review, and exact-head CI/PostgreSQL conformance.
What Problem This Solves
Choosing a model immediately added a chat entry, even when the choice was abandoned before sending. The entry rendered as a System bubble, and confirmation could repeat the model name and alias.
User Impact
Model changes appear as the existing horizontal notice with the next submitted message. Returning to the original model before sending adds no notice. Confirmation shows the model name once.
Why This Change Was Made
The selected model is captured by the existing accepted-input persistence path. A session baseline survives draft picker edits and advances with the accepted user-message commit, including for existing conversations. Chat compares submitted selections, keeps automatic fallback and supplemental media separate, and preserves safe display fields for previously recorded notices. Ordinary notices render synchronously at their real height, avoiding the loading placeholder and subsequent contraction.
Follow-up to #182742.
Evidence
Focused backend, notice, and model-picker suites pass, including a real sessions.patch → chat.send regression with pre-change history. Core/UI types, scoped lint, formatting, and the production UI build pass. Independent Codex review found no actionable P0–P2 issues.
Risk and coverage: Browser proof uses the real Control UI and display sanitizer with synthetic data and mocked Gateway transport. Backend tests exercise queued and committed inputs across durable and in-memory sessions. No live model invocation is claimed. A history page without a known preceding selection does not infer a transition.
Confirmation
Previously recorded notice
Submitted message in context
The 49-second recording runs at normal speed, with pauses to read each model choice and the notice after sending. The accepted notice enters once without a loading placeholder or a later height contraction.
model-change-stable.mp4