Skip to content

fix(ui): make cloud failure diagnostics readable and copyable - #130672

Merged
steipete merged 1 commit into
mainfrom
steipete/cloud-session-failure-diagnostics-8546e3
Aug 27, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/cloud-session-failure-diagnostics-8546e3

Conversation

@steipete

@steipete steipete commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Closes #130652

What Problem This Solves

Fixes an issue where users opening a failed cloud session could only see a single truncated error line above the composer, with no way to read or copy the diagnostic. Initial provisioning failures and ordinary chat request errors had the same limitation.

Why This Change Was Made

Use one shared error notice with a compact preview, native Error details disclosure, a selectable wrapping/scrolling diagnostic, and the existing Copy error control. Route startup failures through that same renderer, so initial cloud failures and durable runner failures cannot drift apart. Startup progress retains the canonical chat working indicator introduced by #130669.

The error remains plain escaped text. Existing Retry and dismissal callbacks retain ownership; opening or copying a diagnostic does not retry, send, or delete anything. No new modal, custom disclosure state, configuration, persistence, protocol, dependency, or backend output limit.

User Impact

Operators can expand, select, keyboard-scroll, and copy the complete diagnostic received by the Control UI on desktop and small phones. Short failures remain compact. Backend redaction and bounded diagnostic retention are unchanged; this does not claim to recover raw output already omitted by a provider.

Release note: make cloud runner and chat failure diagnostics readable and copyable, including initial provisioning failures.

Evidence

CI repair addresses both failures from the original run 33037946381:

  • Error text deliberately appears in the compact summary and expanded diagnostic. Queue-edit, streaming on desktop/mobile, and placement-reclaim tests now target the visible summary while retaining their message, visibility, lifecycle, and action assertions.
  • Startup JS already exceeded the 343442 B gzip gate on the original branch base (343459 B). After resolving genuine conflicts with fix(ui): show cloud session startup progress in chat #130669, the shell now binds its host/window/document listeners to one connection-owned abort signal instead of maintaining a duplicate teardown list. All handlers remain, and a real event lifecycle test proves that disconnected shells are inert and reconnect once. Published-head local build: 343361 B, 81 B below the unchanged limit (the pre-commit candidate measured 343345 B). No budget, baseline, gate, capability, or assertion was weakened.

Repaired head: bc6647826bbde95c172e44d157f466ff6fc03198. Exact-head pull-request CI run 33040515478 completed success, including openclaw/ci-gate, build-artifacts, real-Gateway UI E2E, all four UI browser shards, and compact-small-18. GitHub reports the PR MERGEABLE / CLEAN. Ready for final maintainer landing review; not merged.

Regression tests failed before the production fix: the error disclosure did not exist in both ordinary runner failures and newly created cloud sessions. Sanitized before/after screenshots show the clipped baseline and the expanded desktop/320×568 states, including the final diagnostic line and successful Copy feedback. These are real Chromium renders with a deterministic mocked Gateway, not live cloud-provider proof. The parent also opened and interacted with the local rendered preview.

  • 440 focused UI tests passed across chat rendering, working indicators, history, abort diagnostics, clipboard/redaction, shell events, and native controls. After moving lifecycle coverage into its own file to respect the existing test-file limit, all 64 shell/native tests passed again.
  • 46 built-UI Chromium E2E tests passed across the original diagnostic flows, all four failed sibling assertions, and native sidebar controls:
    node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/cloud-workspace-conflict.e2e.test.ts ui/src/e2e/new-session-page.cloud-startup-failure.e2e.test.ts ui/src/e2e/new-session-page.cloud-startup.recovery.e2e.test.ts ui/src/e2e/chat-flow.queue-edit.e2e.test.ts ui/src/e2e/chat-flow.streaming.e2e.test.ts ui/src/e2e/chat-header-session-outcomes.e2e.test.ts ui/src/e2e/native-nav-sidebar-toggle.e2e.test.ts
  • Browser assertions cover failed/reclaimed placements, startup rejection with successful and failed history loads, ordinary request errors, exact clipboard text, HTML escaping, text selection, keyboard disclosure/scrolling, desktop/phone bounds, and retained Retry/dismissal ownership.
  • pnpm ui:build passed, including all 770 compressed sidecars and the startup performance gate.
  • Final full changed checks passed: guards, formatting, dead exports, i18n, core-test/UI typechecks, lint, and styles. Command: git diff --cached --name-only -z | xargs -0 node scripts/check-changed.mjs --base HEAD -- before completing the rebase.
  • Fresh independent Codex autoreview is clean at the configured P0 threshold, with no accepted/actionable findings.
  • ClawSweeper found no actionable code/security finding; its Rank-up request for green build-artifacts and real-Gateway UI checks is satisfied by run 33040515478. A new review-start placeholder is pending and is not treated as a blocking finding.

Production LOC: +158/−86 (net +72). Tests: +271/−75 (net +196). Docs: +2. Production growth is 66 CSS lines for accessible disclosure/wrapping/scrolling and six net TypeScript/catalog lines, including explicit ownership of shell listener cleanup. No duplicate state or modal path was added.

AI-assisted, maintainer-requested repair. Underlying cloud runtime packaging is a separate root-cause repair; this PR fixes access to the diagnostic, not cloud allocation itself.

Before: clipped runner error

After: desktop expanded diagnostic and copy feedback

After: phone diagnostic final line and copy feedback

@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 27, 2026
@steipete
steipete marked this pull request as ready for review August 27, 2026 03:58
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. labels Aug 27, 2026
@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 12:55 AM ET / 04:55 UTC.

ClawSweeper review

What this changes

The PR makes Control UI cloud-startup, durable runner, and ordinary chat-error diagnostics expandable, selectable, scrollable, and copyable while preserving retry and dismissal actions.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep open. Current main still renders these failures as clipped one-line notices, while this focused PR unifies the existing error paths behind an accessible disclosure and copy control; no blocking code or security defect was found. Exact-head CI is still running and the protected maintainer label requires human merge handling.

Priority: P2
Reviewed head: bc6647826bbde95c172e44d157f466ff6fc03198
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-covered Control UI repair with no actionable review finding; pending exact-head CI remains the merge gate.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies this as MEMBER-authored, so the external-contributor proof gate does not apply; the PR nevertheless includes sanitized before/after Chromium screenshots and mocked-Gateway browser evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies this as MEMBER-authored, so the external-contributor proof gate does not apply; the PR nevertheless includes sanitized before/after Chromium screenshots and mocked-Gateway browser evidence.
Evidence reviewed 6 items Current-main behavior remains incomplete: Current main renders normal request and run errors as a strong text span and separately renders failed placement startup; neither path has a disclosure or copy control.
Canonical rendering boundary: The PR routes topbar request errors, composer run errors, and failed placement startup through one renderer while passing only the pre-existing dismiss or retry action into it.
Caller and producer coverage: Chat rendering supplies both topbar and composer paths; the placement owner supplies a retry callback only when its startup status is retryable.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/cloud-workspace-conflict.e2e.test.ts

Result: FAIL (failed) — step 1 expect_output Test Files: expected terminal output was not visible within 30 seconds: "Test Files"

RUN  v4.1.11 /tmp/clawsweeper-live-proof-130672-599U3I/target

[vitest] still running with no output for 30000ms.

Assertions:

  • FAIL expect_output: Test Files

How this fits together

The Control UI receives already-redacted failure text from Gateway session placement and chat state, then renders it near the chat composer. This change affects that final presentation layer without altering the underlying diagnostic data or retry ownership.

flowchart LR
  A[Gateway failure text] --> B[Chat and placement state]
  B --> C[Shared error notice]
  C --> D[Compact alert summary]
  C --> E[Expanded diagnostic]
  E --> F[Copy error control]
Loading

Decision needed

Question Recommendation
After exact-head CI completes, should the Control UI owner accept this shared diagnostic disclosure as the replacement for the currently clipped failure notices? Accept after CI: Merge once the pending exact-head required checks are green, retaining the single shared renderer and its current browser coverage.

Why: The PR is protected as maintainer work and changes user-visible Control UI behavior; automation cannot make the final merge decision.

Before merge

  • Resolve merge risk (P1) - The branch adds a net 72 production lines for the disclosure, diagnostic layout, and listener cleanup; the shared renderer removes the duplicate startup notice, but the remaining accessible UI surface should remain consolidated rather than spawning another error path.
  • Resolve merge risk (P1) - Exact-head CI remains in progress, so merge readiness is not yet established despite the focused checks reported in the PR body.
  • Complete next step (P2) - Exact-head CI is still in progress and this protected maintainer PR requires normal human merge handling rather than an automated repair lane.
Agent review details

Security

None.

PR surface

Source +72, Tests +196, Docs +2. Total +270 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 4 158 86 +72
Tests 9 271 75 +196
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 431 161 +270

Review metrics

Metric Value Why it matters
Production versus test delta production +158/-86 (net +72); tests +271/-75 (net +196); docs +2 The production growth is attributable to accessible disclosure and bounded diagnostic presentation, while the tests cover the affected error sources and interactions.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #130652
Summary: This PR is the explicit candidate fix for the reported cloud diagnostic presentation defect; it remains unmerged.

Members:

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

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land one shared, escaped diagnostic presentation after exact-head CI is green, keeping backend redaction and all retry/dismissal ownership at their existing producers.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land one shared, escaped diagnostic presentation after exact-head CI is green, keeping backend redaction and all retry/dismissal ownership at their existing producers.

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

Yes, by source inspection: current main sends request, run, and placement failures to clipped one-line notices without a disclosure or copy action; the focused mocked-Gateway E2E scenarios in this PR exercise those same paths.

Is this the best way to solve the issue?

Yes. A shared final-rendering component is the narrowest maintainable fix because all three existing error paths retain their own state and actions while gaining the same readable diagnostic UI.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded but user-visible Control UI diagnostic-usability repair without data loss, authentication, or availability impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository state identifies this as MEMBER-authored, so the external-contributor proof gate does not apply; the PR nevertheless includes sanitized before/after Chromium screenshots and mocked-Gateway browser evidence.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The supplied repository state identifies this as MEMBER-authored, so the external-contributor proof gate does not apply; the PR nevertheless includes sanitized before/after Chromium screenshots and mocked-Gateway browser evidence.

Evidence

What I checked:

  • Current-main behavior remains incomplete: Current main renders normal request and run errors as a strong text span and separately renders failed placement startup; neither path has a disclosure or copy control. (ui/src/pages/chat/chat-view-notices.ts:65, e2e030e2b0ae)
  • Canonical rendering boundary: The PR routes topbar request errors, composer run errors, and failed placement startup through one renderer while passing only the pre-existing dismiss or retry action into it. (ui/src/pages/chat/chat-view-notices.ts:66, bc6647826bbd)
  • Caller and producer coverage: Chat rendering supplies both topbar and composer paths; the placement owner supplies a retry callback only when its startup status is retryable. (ui/src/pages/chat/chat-pane-render.ts:169, bc6647826bbd)
  • Behavior-focused coverage: The added browser coverage checks durable and request errors at desktop and phone widths, keyboard disclosure and scrolling, selection, exact clipboard text, no injected image element, no send side effect, and retained dismissal ownership. (ui/src/e2e/cloud-workspace-conflict.e2e.test.ts:282, bc6647826bbd)
  • Adjacent merged work is not a replacement: The merged startup-progress change is contained by current main, but it concerns working-indicator presentation rather than readable/copyable failure diagnostics. (ui/src/pages/chat/chat-view-notices.ts:127, 8f237b6a97fb)
  • PR is not on current main: The diagnostic PR head is not an ancestor of the supplied current-main SHA, so its requested behavior has not already landed. (bc6647826bbd)

Likely related people:

  • steipete: Current renderer history includes the adjacent merged startup work and earlier placement-startup generalization by Peter Steinberger. (role: recent feature owner; confidence: high; commits: 8f237b6a97fb, a8bc60a119b8; files: ui/src/pages/chat/chat-view-notices.ts, ui/src/app/session-placement-startup.ts)
  • Vyctor H. Brzezowski: Recent history identifies composer restructures immediately beneath the current chat-notice integration. (role: earlier composer integration contributor; confidence: medium; commits: 64853b1a9d50, 18beca535036; files: ui/src/pages/chat/chat-view.ts, ui/src/pages/chat/components/chat-composer.ts)

Rank-up moves

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

  • Confirm the remaining exact-head required checks, including build artifacts, finish green before merge.

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 2026-08-27T04:06:41.639Z sha a2c01dc0e6948921b1d0ac679cb5dfc36425f2d9 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the steipete/cloud-session-failure-diagnostics-8546e3 branch from a2c01dc to bc66478 Compare August 27, 2026 04:48
@steipete

Copy link
Copy Markdown
Contributor Author

CI repair is complete on bc6647826bbde95c172e44d157f466ff6fc03198. Exact-head pull-request run 33040515478 is green, including openclaw/ci-gate, build-artifacts, real-Gateway UI E2E, all four browser shards, and compact-small-18. This satisfies the completed ClawSweeper review's Rank-up move.

The sibling error assertions now select the visible summary without hiding the full diagnostic. Startup progress retains #130669's working indicator; failure rendering stays shared. The startup payload repair replaces duplicated shell listener teardown with one connection-owned abort signal and verifies actual host/window/document behavior across disconnect and reconnect. The published-head pnpm ui:build passes at 343361 B gzip, 81 B below the unchanged 343442 B limit; no budget or baseline changed.

Local proof: 440 focused tests, 46 built-UI Chromium E2E tests, full changed checks, and fresh isolated Codex autoreview with no accepted/actionable P0 finding. The PR body contains exact commands and preserves all three approved before/after images. Production +158/-86 (net +72), tests +271/-75, docs +2; most production growth is the diagnostic accessibility CSS.

GitHub reports MERGEABLE / CLEAN, with no outstanding review request or enforced approval rule. Ready for final maintainer landing review. Not merged. The newly started ClawSweeper review is pending; its placeholder is not a finding.

@steipete
steipete merged commit 958111c into main Aug 27, 2026
125 checks passed
@steipete
steipete deleted the steipete/cloud-session-failure-diagnostics-8546e3 branch August 27, 2026 05:22
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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 docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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.

Cloud runner failure banners hide the full diagnostic

1 participant