Repository navigation
fix(ui): keep Stop available while drafts cannot send - #157703
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: needs maintainer review before merge. Reviewed September 24, 2026, 9:49 PM ET / September 25, 2026, 01:49 UTC (Revision 2). ClawSweeper reviewWhat this changesThe Control UI chat composer selects Stop during an abortable run until a drafted follow-up can send, and adds four held-draft regression cases. Merge readiness✅ Ready for maintainer review Keep open. Current main still selects disabled Send when an abortable run has a draft that cannot send. This focused PR addresses that gap, while the earlier broad PR closed unmerged; no introduced defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI composer receives the current run state, draft, attachments, and send eligibility. It presents one primary action whose click follows the existing send or session abort path. flowchart LR
A[Chat run state] --> C[Composer eligibility]
B[Draft and attachments] --> C
C --> D{Follow-up sendable?}
D -- Yes --> E[Send action]
D -- No, run abortable --> F[Stop action]
E --> G[Gateway request]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -1, Tests +36. Total +35 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep one primary composer action: show Stop while the run is abortable and a follow-up cannot send, using the existing send-admission and session-abort owners. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source selects disabled Send for an abortable run with an unsendable draft, and the supplied before-fix browser captures show that state. This read-only review did not execute current main. Is this the best way to solve the issue? Yes. The branch reuses the composer's send-admission result and existing Stop callback within the single-primary-action renderer. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 691d2e5cd48c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
* commit 'ef2dd3235123371860c9154da7b47b2c1e940788': (41 commits) fix(ci): prevent Security Review checkout retry collisions (#157652) fix(ci): recover interrupted Security Review response bodies (#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) ...
|
Merged via squash.
|
* fix(ui): keep Stop available while drafts cannot send * chore: integrate main fixes for Stop UI validation * commit '5dae23c843013fce2e0bb80037d232bbabfc70e5': (41 commits) fix(ci): prevent Security Review checkout retry collisions (openclaw#157652) fix(ci): recover interrupted Security Review response bodies (openclaw#157651) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (openclaw#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131) refactor(msteams): share stored service URL validation (openclaw#157706) fix(codex): honor configured tool PATH in native commands (openclaw#157290) refactor(msteams): share approval kind labels (openclaw#157705) fix(sessions): keep session results current during cold reads (openclaw#156121) fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535) refactor(i18n): reuse native branch candidate extraction (openclaw#157636) fix(update): preserve recovery files after ownership refusal (openclaw#148890) fix(test): prevent late announcements from contaminating registry tests (openclaw#157681) fix(e2e): scan full onboarding logs for prompts (openclaw#157624) refactor(session-tools): derive contracts from schemas (openclaw#156365) refactor(channels): derive config contracts from schemas (openclaw#156367) perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689) refactor: reuse prepared fixtures in slow core tests (openclaw#157685) refactor(codex): reuse marketplace reference selection (openclaw#157621) chore(ui): refresh control ui locales (openclaw#157710) ... Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Stop disappears behind a disabled Send button when an active chat run has a draft that cannot currently send, such as while an attachment is being prepared.
User Impact
Users can stop the current run on desktop and mobile without clearing or submitting their draft.
Why This Change Was Made
Use the existing Send availability conditions to choose the primary action. Stop remains available until the follow-up can actually be sent; queue, steer, voice, and dictation behavior stays unchanged.
Supersedes #156453 for this Stop-button fix only. Two files: production +11/−12, tests +36.
Evidence
node scripts/run-vitest.mjs ui/src/pages/chat/chat-composer-actions.test.ts --maxWorkers=1) passes 75/75, zero skipped (4.094 s command wall, 391.142 ms suite execution). The four added regressions total 27.537 ms execution. These are measured Testbox timings, not a local-host rerun. The hosted proof job occupied 536 s including setup, browser proof, checks and cleanup; that total is not the marginal cost of this test file.tsgo:uion frozen basedaecbc5cstopped at the pre-existingUpdateStepResultimport error insrc/infra/package-update-npm-pack.ts:7. That separate issue is fixed by fix(update): restore npm-pack helper typechecking #157659; this PR does not include or claim a rerun of that fix.Proof ran on the exact committed tree
68bad84101f37659fefc627c1d58f81f05a83bb4. No broad gate pass is claimed.