Skip to content

fix(ui): keep Stop available while drafts cannot send - #157703

Merged
vincentkoc merged 2 commits into
mainfrom
fix/chat-stop-unsendable-draft
Sep 25, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/chat-stop-unsendable-draft

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

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

  • Focused runtime and browser proof: all four new cases fail with the original controls (3.985 s command wall); the fixed whole composer-actions suite (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.
  • Real Control UI source with the existing mock Gateway, on desktop and mobile: disabled Send before the fix, enabled Stop after it, then Interrupted. One abort, no follow-up send, and the exact draft survives. Six inspected, synthetic captures are embedded below; the settled views preserve the same draft after Stop.
  • Targeted formatting and UI i18n verification pass. Scoped oxlint and stylelint pass. Both one-shot Testboxes were stopped after the commands; their backing Actions jobs may show cancellation from that cleanup.
  • tsgo:ui on frozen base daecbc5c stopped at the pre-existing UpdateStepResult import error in src/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.

Viewport Before: disabled Send hides Stop After: enabled Stop After Stop: Interrupted, draft preserved
Desktop Desktop before: disabled Send Desktop after: enabled Stop Desktop after Stop: draft preserved
Mobile Mobile before: disabled Send Mobile after: enabled Stop Mobile after Stop: draft preserved

@vincentkoc vincentkoc self-assigned this Sep 24, 2026
@clawsweeper

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

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 9:49 PM ET / September 25, 2026, 01:49 UTC (Revision 2).

ClawSweeper review

What this changes

The 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
Reviewed head: 06d070d71a2a93165f62db48a70652cff202b786

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused source changes, baseline-failing regression cases, measured test cost, and inspectable before/after browser captures provide strong review evidence.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: The MEMBER-authored PR is exempt from the contributor proof gate. Its changed Control UI action is nevertheless shown through the browser with the existing mock Gateway: inspected desktop and mobile captures show Stop becoming available, followed by Interrupted with the draft retained; the changed file blobs match the proof revision. No stored-data contract changes.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from the contributor proof gate. Its changed Control UI action is nevertheless shown through the browser with the existing mock Gateway: inspected desktop and mobile captures show Stop becoming available, followed by Interrupted with the draft retained; the changed file blobs match the proof revision. No stored-data contract changes.
Evidence reviewed 9 items Current-main behavior: Current main selects Send for any composed content during an abortable run, even when that button is disabled; the central problem remains present.
Existing send-admission owner: The composer already includes pending attachment reads and other draft-specific gates in send eligibility and passes that result to the primary-action renderer.
Introduced repair: The pinned introduced diff uses sendability to retain Stop in the primary action slot during an abortable run.
Findings None None.
Security None None.

How this fits together

The 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
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -1, Tests +36. Total +35 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 11 12 -1
Tests 1 36 0 +36
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 47 12 +35

Review metrics

Metric Value Why it matters
Regression-test cost 4 cases; 27.537 ms combined execution, 4.094 s suite wall The PR reports measured Testbox timing for the added cases and focused suite.

Root-cause cluster

Relationship: canonical
Canonical: #157703
Summary: The closed, unmerged broad guest-work PR overlaps this Stop fix; the merged update typecheck PR addresses separate work.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best 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.

Labels

Label changes:

  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The MEMBER-authored PR is exempt from the contributor proof gate. Its changed Control UI action is nevertheless shown through the browser with the existing mock Gateway: inspected desktop and mobile captures show Stop becoming available, followed by Interrupted with the draft retained; the changed file blobs match the proof revision. No stored-data contract changes.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: A temporarily unsendable draft hides the active-run Stop control, with limited blast radius.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from the contributor proof gate. Its changed Control UI action is nevertheless shown through the browser with the existing mock Gateway: inspected desktop and mobile captures show Stop becoming available, followed by Interrupted with the draft retained; the changed file blobs match the proof revision. No stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The MEMBER-authored PR is exempt from the contributor proof gate. Its changed Control UI action is nevertheless shown through the browser with the existing mock Gateway: inspected desktop and mobile captures show Stop becoming available, followed by Interrupted with the draft retained; the changed file blobs match the proof revision. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vyctor H. Brzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: 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 (1 earlier review cycle)
  • reviewed September 24, 2026, 7:52 PM ET / 23:52 UTC sha unknown :: blocked before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review September 25, 2026 01:27
* 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)
  ...
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 25, 2026
@vincentkoc
vincentkoc merged commit de0bcba into main Sep 25, 2026
123 checks passed
@vincentkoc
vincentkoc deleted the fix/chat-stop-unsendable-draft branch September 25, 2026 04:13
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
* 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]>
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 P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S 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