Skip to content

improve(ui): show errors with a next step and collapsed details - #192057

Merged
vyctorbrzezowski merged 9 commits into
mainfrom
openclaw/copy-f1-errors
Nov 4, 2026
Merged

vyctorbrzezowski merged 9 commits into
mainfrom
openclaw/copy-f1-errors

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Control UI errors can mix a recovery message with a raw diagnostic. This makes a small save failure noisy and gives people inconsistent ways to inspect its cause.

User Impact

Migrated errors show a next step first, with diagnostics behind collapsed “Show details.” Existing redaction, retry, dismissal, links, and toast placement are preserved. A new error resets an open disclosure; unrelated updates do not.

Why This Change Was Made

Extend the existing config-error, toast, lazy-panel, and chat owners rather than adding a competing error pipeline. Dashboard-default saves and Labs settings are representative callers, not a UI-wide copy rewrite. No new state store or dependency.

Surface Before After
Dashboard default save “Could not save the dashboard default: {error}” “Couldn’t save the dashboard default. Try again.” + collapsed details
Labs setting save “Could not update feature” + diagnostic “Couldn’t save this setting. Try again.” + collapsed details
Lazy panel “Panel failed to load” / “Something went wrong while loading this panel.” “Couldn’t load this panel.” / “Try again.”
Error disclosure “Details” “Show details”
Chat startup “Couldn’t start this conversation. Open Settings → Logs for details.” “Couldn’t start this session. Try again.”

Deliberately preserved: existing caller-owned chat recovery text (for example, “Session is busy; wait for the current run to finish.”), specialized reply/stop errors, and stale-file recovery instructions. Those producers do not yet separate summary from diagnostics; replacing their instructions with a generic retry would regress recovery. Later copy PRs can migrate those producers explicitly.

Evidence

  • Shared toast/panel regressions fail on the base and pass with the fix: collapsed state, expansion, and redaction. Desktop/mobile chat regressions cover replacement lifecycle and preserve caller recovery instructions.
  • Initial focused suite: 210 tests passed across 11 files. After CI/review repairs: 69 focused tests passed, then 29 chat tests passed with the recovery regression; the exact chat test-type partition and UI typecheck passed. Touched-file oxfmt/oxlint, i18n baseline/verification, and diff checks passed (only pre-existing sidebar lint warnings in the broader run).
  • Final attachment-read lifecycle production-bundle E2E: 17 tests passed, including failed rewind retaining its draft. Both screenshot scenarios passed in an isolated source export with mocked Gateway failures.
  • Final local boot comparison against e5bd90ed866fb7656ece78250a46e8d0a343cfe0 passed: chat boot JS 1,280,907 → 1,280,694 B gzip (-213 B); 20 → 20 requests. Total CSS 320,638 → 320,638 B gzip (+0 B). No budget/baseline increase.
  • The 69-line test allocation matches net added test lines. The local ratchet reports inherited ceiling debt; this change does not increase that debt or raise the shared baseline.
  • Local ClawSweeper reviews and an independent review completed. Both substantive findings were fixed: reset disclosure on replacement, and preserve caller-owned recovery guidance. CI also caught a test-only DOM typing issue, now fixed and checked in the exact type partition. No hosted re-review loop was requested.
  • Final repaired source: 150873b4f033ad95ced58f880bd2cb12b9718a50; current publication: 85a96b28bf0976f6402a870d7c52c9e1a32fd5d1. Current-head CI remains the landing gate; earlier-head results are not treated as current-head proof.

Visual evidence

Inspected synthetic diagnostics, light theme, identical 1280×900 viewports; crops preserve the captured geometry. Toast/panel visuals are unchanged by the later chat recovery fix.

Surface Before After, collapsed After, expanded
Toast Toast before Toast collapsed Toast expanded
Inline panel Panel before Panel collapsed Panel expanded

Worked on by

Landing integration

Integrated main while retaining the current stacked-toast owner, semantic icons, compact-padding measurement, session-only toolbar clearance, and localized permission formatting. F1 details are keyed to each toast’s options, and Labs retains its current state/link owners. The integrated head passed 179 focused tests across 9 files, UI typecheck, scoped lint, and i18n baseline/verification. The existing 69-line allocation still exactly matches test growth; the test-line guard retains 110 lines of base debt. Full CI and visual capture were not repeated locally.

roboclaw-bot and others added 3 commits November 3, 2026 15:59
@clawsweeper

clawsweeper Bot commented Nov 3, 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.

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

F1 visual proof: light theme, synthetic diagnostics, identical 1280×900 viewports. Crops: toast before / after collapsed / after expanded; inline panel before / after collapsed / after expanded. Inspected locally; no private data.

toast-before-cropped

toast-after-collapsed-cropped

toast-after-expanded-cropped

panel-before-cropped

panel-after-collapsed-cropped

panel-after-expanded-cropped

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 3, 2026 16:18
@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Nov 3, 2026
roboclaw-bot and others added 2 commits November 3, 2026 16:33
Remove obsolete raw-first-line normalization, use the actual DOM test contract, and expand diagnostics explicitly in rewind custody proof.

Co-authored-by: vyctorbrzezowski <[email protected]>
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR adds collapsed, redacted error details and shorter recovery summaries across selected Control UI surfaces.

Example: Saving a dashboard default fails with an UNAVAILABLE response.

  • Before: The toast includes the diagnostic directly in its message.
  • After: The toast says “Couldn’t save the dashboard default. Try again.” with a collapsed “Show details” disclosure.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Strong visual evidence supports the intended presentation, but the recovery regression and verified integration failures block readiness.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The supplied production-bundle Control UI captures exercise a failed dashboard sessions.patch and an inline panel failure with synthetic Gateway responses; inspected before, collapsed, and expanded screenshots show the changed summaries and disclosures.
Patch quality 🦪 silver shellfish (2/6) 3 actionable review findings remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Selected Control UI failures mix recovery text with diagnostics and provide inconsistent ways to inspect details.
Reason: The maintainer-authored direction has clear user value and reuses existing owners; implementation defects do not require another product approval.

Merge readiness

⛔ Needs changes before merge - 4 items remain

Keep this PR open: the shared disclosure is useful, but generic chat copy hides existing recovery instructions, and two verified integration failures need repair.

Priority: P2
Reviewed head: 067b2394aa18a5d09e8ee3b2c910fab6e932b0d9

Before merge

  • Preserve actionable chat outcomes outside collapsed details (P2) - The fallback applies to local-action errors and the deliberately unspecialized Stop path, not only raw diagnostics. For example, chat-pane-session-controls.ts publishes “Permissions saved, but this chat didn't refresh. Reload to see the change.” after a successful write and failed refresh. This change instead shows “Couldn’t complete this action. Try again.” and hides the successful-save outcome and reload instruction. Preserve the existing user-facing recovery summary, using a generic summary only when the producer supplies a separate diagnostic. Add a regression through the notice renderer for this successful-write/failed-refresh case and retain the Stop recovery contract from fix: make common error messages short and helpful #163381.
  • Update the route-render recovery consumer for the new panel title (P2) - The shared title changes here, but ui/src/app/router-outlet.browser.test.tsx:57 still requires “Panel failed to load.” The verified test merge retains this assertion, and exact-head checks-ui (2/3) fails with the new title as the received value. Update that consumer assertion while preserving its exception-hiding, Retry, and navigation coverage.
  • Keep the disclosure change within the measured Chat boot budget (P2) - The exact-head control-ui-performance check rejects the added Chat boot bytes against its same-run base: the base already measures 1,280,731 gzip bytes above the 1,280,674-byte cap, so growth beyond 64 bytes fails admission. The PR's comparison against an older merge base below the cap does not cover this integration result. Reduce the added disclosure/copy footprint enough to pass the existing comparison without raising the budget or adding an exception.
  • Explain or restore the original intent of Chat local-action and Stop summaries - fix: make common error messages short and helpful #163381: Keep recovery instructions and warnings about potentially completed work visible while collapsing diagnostics; REST patch inspection verifies the deliberate Stop exemption.

Findings

  • [P2] Preserve actionable chat outcomes outside collapsed details — ui/src/pages/chat/chat-view-notices-content.tsx:314-315
  • [P2] Update the route-render recovery consumer for the new panel title — ui/src/i18n/locales/en.ts:570-571
  • [P2] Keep the disclosure change within the measured Chat boot budget — ui/src/components/config-error.tsx:7-9

Provenance

  • Chat local-action and Stop summaries changes intended behavior without addressing why it exists (fix: make common error messages short and helpful #163381: Keep recovery instructions and warnings about potentially completed work visible while collapsing diagnostics; REST patch inspection verifies the deliberate Stop exemption.)
Agent review details

How this fits together

Control UI mutation and loading owners supply failures to shared presentation components, which render recovery text and redacted diagnostics while existing owners retain retry, dismissal, and persistence.

flowchart TD
  A[Gateway or loading failure] --> B[Existing operation owner]
  B --> C[Recovery summary]
  B --> D[Error formatter and redactor]
  D --> E[Collapsed diagnostic disclosure]
  C --> F[Toast panel or chat notice]
  E --> F
Loading

Technical review

Best possible solution:

Keep the shared disclosure renderer, preserve caller-owned recovery instructions, and repair the affected consumer tests and measured boot growth.

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

Source and supplied screenshots establish the noisy error presentation; exact-head CI additionally demonstrates hidden chat recovery text and the stale router assertion.

Is this the best way to solve the issue?

Reusing the existing formatter and presentation owners is appropriate, but replacing every unspecialized chat summary also erases intentionally visible recovery guidance.

Full review comments:

  • [P2] Preserve actionable chat outcomes outside collapsed details — ui/src/pages/chat/chat-view-notices-content.tsx:314-315
    The fallback applies to local-action errors and the deliberately unspecialized Stop path, not only raw diagnostics. For example, chat-pane-session-controls.ts publishes “Permissions saved, but this chat didn't refresh. Reload to see the change.” after a successful write and failed refresh. This change instead shows “Couldn’t complete this action. Try again.” and hides the successful-save outcome and reload instruction. Preserve the existing user-facing recovery summary, using a generic summary only when the producer supplies a separate diagnostic. Add a regression through the notice renderer for this successful-write/failed-refresh case and retain the Stop recovery contract from fix: make common error messages short and helpful #163381.
    Confidence: 0.99
  • [P2] Update the route-render recovery consumer for the new panel title — ui/src/i18n/locales/en.ts:570-571
    The shared title changes here, but ui/src/app/router-outlet.browser.test.tsx:57 still requires “Panel failed to load.” The verified test merge retains this assertion, and exact-head checks-ui (2/3) fails with the new title as the received value. Update that consumer assertion while preserving its exception-hiding, Retry, and navigation coverage.
    Confidence: 1
  • [P2] Keep the disclosure change within the measured Chat boot budget — ui/src/components/config-error.tsx:7-9
    The exact-head control-ui-performance check rejects the added Chat boot bytes against its same-run base: the base already measures 1,280,731 gzip bytes above the 1,280,674-byte cap, so growth beyond 64 bytes fails admission. The PR's comparison against an older merge base below the cap does not cover this integration result. Reduce the added disclosure/copy footprint enough to pass the existing comparison without raising the budget or adding an exception.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 868609a3f6cb.

Provenance checked

  • Lazy panel disclosures keeps the original intent (eca633a: Share presentation primitives while preserving existing tags, classes, actions, and rendering ownership.)
  • Toast rendering and dismissal keeps the original intent (refactor(ui): render native toast content #171817: Render native content while the existing toast owner retains deadlines, queues, callbacks, and placement.)
  • Dashboard-default and Labs save outcomes keeps the original intent (feat(dashboard): save shared fullscreen and split defaults #146475: Existing session and configuration owners retain writes and reconciliation; this PR changes their failure presentation only.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm --dir ui test src/pages/chat/chat-view-notices.test.tsx src/app/router-outlet.browser.test.tsx src/lib/toast.test.ts src/components/solid/presentation-primitives.test.tsx
  • pnpm test:ui:e2e ui/src/e2e/chat-attachment-read-lifecycle.e2e.test.ts ui/src/e2e/lazy-route-error-layout.e2e.test.ts
  • pnpm tsgo:ui
  • pnpm ui:i18n:verify
  • Run the existing control-ui-performance CI comparison against its pinned base without changing budgets.

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit d912f0c adds ui/src/lib/toast-view.tsx:17 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d912f0c06e7a; files: ui/src/lib/toast-view.tsx)
  • Vyctor H. Brzezowski: Raw commit 91e8cd0 adds ui/src/lib/toast.ts:20 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 91e8cd076166; files: ui/src/lib/toast.ts)

PR surface

Source +26, Tests +61, Other +3. Total +90 across 22 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 10 53 27 +26
Tests 11 78 17 +61
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 3 0 +3
Total 22 134 44 +90

Review metrics

Metric Value Why it matters
Production versus test changes Production +53/-27 lines; tests +78/-17 lines The small shared renderer and distinct disclosure-lifecycle regressions justify the growth; no additional state owner or test scaffolding is needed.

Labels

Label changes:

  • add P2: This is a bounded Control UI improvement with a concrete recovery-copy regression and focused integration repairs.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: This is a bounded Control UI improvement with a concrete recovery-copy regression and focused integration repairs.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 3, 2026, 11:37 AM ET / 16:37 UTC.

roboclaw-bot and others added 2 commits November 3, 2026 16:43
Keep existing caller summaries until those producers provide separate diagnostics; preserve the keyed disclosure lifecycle and test the busy-session guidance.

Co-authored-by: vyctorbrzezowski <[email protected]>
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: fb5d4695-45b2-42b3-b812-a2ef02f6e55a
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Current-head validation update (85a96b2): the focused recovery tests and 17 attachment-lifecycle E2E cases pass locally; test-only DOM typing and caller-owned recovery guidance were corrected. The current CI performance job is still a landing blocker: its merge tree against 45c571e reports chat boot gzip 1,280,660 → 1,280,905 bytes (+245), above the 1,280,674-byte cap; CSS is unchanged at 320,610 bytes. This differs from the recorded local comparison against the earlier pinned base, so that local pass does not clear the current gate. No budget/baseline relaxation or required-check bypass has been made. Job: https://github.com/openclaw/openclaw/actions/runs/41677802647/job/126064090073

roboclaw-bot and others added 2 commits November 4, 2026 12:37
Keep permission failure details separate from the approved recovery copy, route shared error disclosures through redacted technical details, and carry their state through the chat view.

Co-authored-by: vyctorbrzezowski <[email protected]>
@vyctorbrzezowski
vyctorbrzezowski merged commit 12d93a4 into main Nov 4, 2026
32 of 34 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the openclaw/copy-f1-errors branch November 4, 2026 13:13
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. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants