Skip to content

fix(ui): surface aborted-run diagnostics - #117497

Merged
steipete merged 1 commit into
mainfrom
codex/autoqa-ui-abort-diag-20260801
Aug 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/autoqa-ui-abort-diag-20260801

Conversation

@steipete

@steipete steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Closes #117496

What Problem This Solves

Fixes an issue where Control UI users saw only “Interrupted” when a run aborted with a safe, actionable Gateway diagnostic, leaving the actual validation failure invisible.

Why This Change Was Made

The Control UI chat projection now publishes a nonempty abort errorMessage through the existing chatRunError owner while preserving killed/interrupted lifecycle semantics. First-terminal and one late same-run diagnostic are supported; replays and diagnostics belonging to older runs cannot overwrite a newer active, pending, or completed run.

Plain cancellation still has no error alert. The Gateway remains the owner that bounds and sanitizes the diagnostic; no protocol or persistence shape changes.

User Impact

Operators now see the repairable abort reason in the existing alert while the status remains “Interrupted”. Ordinary cancellation stays unchanged, and stale diagnostics cannot contaminate a newer conversation.

Before

Run status: Interrupted
[no diagnostic alert]

After

Run status: Interrupted
Error: edit tool validation failed: invalid arguments

These are sanitized deterministic mocked-Gateway renderings. The real Chromium test asserts the visible role="alert" and interrupted status together.

Evidence

  • Final Testbox run https://github.com/openclaw/openclaw/actions/runs/30707123348 passed 6/6 focused tests, 6/6 mocked Control UI E2E tests, and the full changed gate.
  • The E2E drives a real Chromium page, emits the diagnostic-bearing abort through the Gateway boundary, and verifies both role="alert" and Run status: Interrupted.
  • Coverage includes plain cancellation, first-terminal diagnostics, one late same-run diagnostic, replay dedupe, newer active run, pre-ACK pending send, and newer completed run.
  • Independent diff review found no actionable issue.
  • Final P1 Codex autoreview and TruffleHog were clean with no accepted/actionable findings at 0.91 confidence.
  • Production delta: +15/-4; tests: +263.
  • No protocol, config, persistence, dependency, migration, or server-side event changes.

Release-note context: Control UI now keeps safe aborted-run diagnostics visible alongside the interrupted run status.

AI-assisted: yes. The implementation was independently reviewed and remotely validated.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 1, 2026
@steipete
steipete marked this pull request as ready for review August 1, 2026 16:17
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 12:22 PM ET / 16:22 UTC.

ClawSweeper review

What this changes

The PR displays a safe Gateway diagnostic in the Control UI’s existing error alert when a chat run aborts, while preserving the interrupted status and suppressing stale diagnostics from older runs.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

This PR is still necessary: current main drops a nonempty diagnostic on an aborted chat event while retaining only the interrupted state. The patch keeps the Gateway as diagnostic owner, uses the existing Control UI alert, and includes focused stale-run guards and mocked-Gateway Chromium coverage; it should remain open for the normal maintainer-labeled PR path until required checks complete.

Priority: P2
Reviewed head: 6a0b6c23757d2fbf071e2faa7cd5ea7cd9f4b57d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused, preserves lifecycle semantics, and is backed by direct stale-run cases plus browser-facing mocked-Gateway proof.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The PR body provides after-fix Testbox evidence for a mocked-Gateway Chromium run that verifies the visible alert and interrupted status together; the GitHub-hosted run could not be independently opened from this environment.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body provides after-fix Testbox evidence for a mocked-Gateway Chromium run that verifies the visible alert and interrupted status together; the GitHub-hosted run could not be independently opened from this environment.
Evidence reviewed 7 items Current-main defect: The existing terminal-event duplicate guard returns for aborted events without publishing errorMessage; the normal aborted branch materializes the stream and reconciles an interrupted run but likewise does not update chatRunError.
Gateway contract: The shared browser Gateway reducer accepts aborted as a terminal event and carries a string errorMessage into the projected run, so the UI can consume a Gateway-bounded diagnostic without changing protocol shape.
Existing alert owner: The composer already renders chatRunError.summary as an accessible role="alert"; the patch reuses this established UI path rather than adding a parallel presentation mechanism.
Findings None None.
Security None None.

How this fits together

Control UI receives Gateway chat lifecycle events and reduces them into per-session run state. The chat projection then drives the composer’s transient run status and persistent error alert shown to the operator.

flowchart LR
  A[Gateway chat event] --> B[Session run projection]
  B --> C[Chat lifecycle handler]
  C --> D[Run identity guard]
  D --> E[Error alert state]
  D --> F[Interrupted status]
  E --> G[Control UI composer]
  F --> G
Loading

Before merge

  • Resolve merge risk (P1) - Required CI is still running on the reviewed head, so merge readiness must be rechecked after those jobs finish.
  • Resolve merge risk (P1) - The PR’s Testbox run is documented in the body and context, but this review environment could not independently open the GitHub run because api.github.com DNS resolution failed.
  • Complete next step (P2) - The protected maintainer label requires the normal human PR path; no discrete repair finding warrants a separate automated fix branch.
Agent review details

Security

None.

PR surface

Source +11, Tests +263. Total +274 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 15 4 +11
Tests 2 263 0 +263
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 278 4 +274

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the focused chat-projection repair after required checks finish, retaining Gateway sanitization and the matching-run identity guard so diagnostics help the aborted run without contaminating later runs.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the focused chat-projection repair after required checks finish, retaining Gateway sanitization and the matching-run identity guard so diagnostics help the aborted run without contaminating later runs.

Do we have a high-confidence way to reproduce the issue?

Yes. Current-main source shows the aborted-event branch drops a populated Gateway diagnostic before the existing alert is set, and the branch supplies a deterministic mocked-Gateway Chromium path for the visible regression.

Is this the best way to solve the issue?

Yes. Reusing the existing chatRunError owner at the aborted-event projection boundary is narrower and safer than adding a protocol, persistence, or separate UI diagnostic path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4cbbccd0a0d2.

Labels

Label changes:

  • add P2: The PR repairs a deterministic, operator-visible diagnostic loss in the Control UI without evidence of data loss, security exposure, or runtime unavailability.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix Testbox evidence for a mocked-Gateway Chromium run that verifies the visible alert and interrupted status together; the GitHub-hosted run could not be independently opened from this environment.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides after-fix Testbox evidence for a mocked-Gateway Chromium run that verifies the visible alert and interrupted status together; the GitHub-hosted run could not be independently opened from this environment.

Label justifications:

  • P2: The PR repairs a deterministic, operator-visible diagnostic loss in the Control UI without evidence of data loss, security exposure, or runtime unavailability.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides after-fix Testbox evidence for a mocked-Gateway Chromium run that verifies the visible alert and interrupted status together; the GitHub-hosted run could not be independently opened from this environment.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix Testbox evidence for a mocked-Gateway Chromium run that verifies the visible alert and interrupted status together; the GitHub-hosted run could not be independently opened from this environment.

Evidence

What I checked:

  • Current-main defect: The existing terminal-event duplicate guard returns for aborted events without publishing errorMessage; the normal aborted branch materializes the stream and reconciles an interrupted run but likewise does not update chatRunError. (ui/src/pages/chat/chat-gateway.ts:269, 4cbbccd0a0d2)
  • Gateway contract: The shared browser Gateway reducer accepts aborted as a terminal event and carries a string errorMessage into the projected run, so the UI can consume a Gateway-bounded diagnostic without changing protocol shape. (packages/gateway-client/src/session-projection.ts:714, 4cbbccd0a0d2)
  • Existing alert owner: The composer already renders chatRunError.summary as an accessible role="alert"; the patch reuses this established UI path rather than adding a parallel presentation mechanism. (ui/src/pages/chat/components/chat-composer-view.ts:145, 4cbbccd0a0d2)
  • Patch behavior and stale-run boundary: The proposed handler publishes a diagnostic for the first aborted event and permits one late same-run update only when the active, pending, or last locally reconciled run identity matches; it leaves ordinary cancellation alert-free. (ui/src/pages/chat/chat-gateway.ts:274, 6a0b6c23757d)
  • Regression proof in the branch: The branch adds direct cases for plain cancellation, first and late diagnostics, replay deduplication, newer active and pending runs, and newer completed runs, plus a mocked-Gateway Chromium assertion that the alert and interrupted status are both visible. (ui/src/pages/chat/chat-gateway.abort-diagnostic.test.ts:99, 6a0b6c23757d)
  • History and ownership: Available blame assigns the current terminal-event guard to Peter Steinberger at the local shallow-history boundary; the PR head is also authored by Peter Steinberger. The checkout could not retrieve deeper promisor history because network DNS was unavailable. (ui/src/pages/chat/chat-gateway.ts:269, 6a0b6c23757d)

Likely related people:

  • steipete: Available blame associates the current terminal-event guard with Peter Steinberger, and this PR’s focused repair commit is authored by the same contributor; deeper repository history was unavailable in the partial clone. (role: recent lifecycle contributor; confidence: medium; commits: 9a2930437352, 6a0b6c23757d; files: ui/src/pages/chat/chat-gateway.ts, ui/src/pages/chat/run-lifecycle.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Allow the remaining required checks to finish on the reviewed head.

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.

@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready review is complete for exact head 6a0b6c23757d2fbf071e2faa7cd5ea7cd9f4b57d.

The root cause is in the Control UI event projection: Gateway and the shared session reducer already own and retain the bounded abort diagnostic, but the aborted UI branch reconciled killed/interrupted lifecycle state without publishing errorMessage. The repair reuses the existing chatRunError owner and gates late recovery by the active, pre-ACK pending, or latest locally terminal run identity, so a stale abort cannot mark newer work failed. Plain cancellation remains alert-free. Production delta is +15/-4; no protocol, config, persistence, dependency, migration, or server event shape changed.

Proof:

ClawSweeper's only rank-up move was to let required checks finish; that is complete. Its Testbox-verification limitation was environment DNS, not missing proof, and the maintainer workflow independently verified the recorded run and exact-head CI. The protected maintainer label is handled through this native review/prepare/merge path.

@steipete
steipete merged commit 2737f2c into main Aug 1, 2026
217 of 229 checks passed
@steipete
steipete deleted the codex/autoqa-ui-abort-diag-20260801 branch August 1, 2026 16:36
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

pull Bot pushed a commit to soitun/moltbot that referenced this pull request Aug 1, 2026
* origin/main: (44 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
abdulrahman305 pushed a commit to qenex-ai/openclaw that referenced this pull request Aug 1, 2026
* origin/main: (41 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (44 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (27 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (41 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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.

[Bug]: Control UI hides aborted-run diagnostics

1 participant