Skip to content

improve(ui): offer "Report a bug" only on chat errors OpenClaw cannot explain - #198069

Open
roboclaw-bot wants to merge 4 commits into
mainfrom
openclaw/crisp-langoustine-3
Open

roboclaw-bot wants to merge 4 commits into
mainfrom
openclaw/crisp-langoustine-3

Conversation

@roboclaw-bot

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

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Every chat error notice carries a "Report a bug" link, including errors with a known cause and a clear next step, such as a draft that could not be saved, a busy session, or an expired sign-in. The link is accent-colored and sits where the recovery action belongs, so it reads as the main action on notices where reporting does not help.

User Impact

User impact: chat error notices offer "Report a bug" only when OpenClaw cannot explain the failure, and the link is a quiet secondary link after the recovery action.

  • Notices with a written explanation no longer show the link: draft storage, session busy, sign-in, permission and connection messages, and the discard-and-reload start conflict.
  • Notices that can only show a raw failure keep it: a reply that failed for an unknown reason, a session that could not start, and failed reactions, session suggestions, task suggestions, forks from a message, and session-menu actions.
  • A notice with no recovery action and no link has no action slot. On phones the recovery button stays beside the title and the link moves to the last row.
  • The reply-failed card in the transcript follows the same rule. A failure with a named cause, such as rejected credentials, billing, a rate limit, an overloaded provider, or a timeout, has no link. A failure without one keeps a quiet link after the recovery actions.
  • "Report a bug" in the sidebar Help menu and on the connection error page is unchanged.

Sources are opted in one at a time, and the default is no link. An unexpected failure from a source that is not opted in loses the one-click link; the Help menu entry still opens the same form.

Why This Change Was Made

The shared chat error notice attached the link unconditionally and received page-level errors as plain text, so it could not tell a written explanation from a raw failure. Deciding from the message text would be guessing. Instead, a source that has no explanation of its own now passes the raw failure along with its message, through the detail channel the error owner already had, and the notice offers reporting only when that raw failure is present. The reply-failed and session-start notices already know their failure kind and pass the decision directly. No new state or props travel through the chat pane.

Two side effects of reusing that channel:

  • A raw failure that carries extra Gateway details now also gets the existing "Show details" disclosure.
  • A raw failure that spans several lines keeps its first line as the title and the rest under details, as before.

Accepted edge case: a missing-permission error that reaches one of the opted-in sources is shown with its written explanation and still gets the link. These actions are checked for access before the request is sent, so this needs a permission change while the request is in flight.

The transcript card already receives the failover reason of the failed run. It offers reporting when there is no reason, or when the reason leaves the cause open: format, empty_response, no_error_details, unclassified, and unknown. A reason added later counts as explained until it is added to that list.

Overlap: #197822 restructures the same card and will need a rebase over this change. Its author asked for this order.

Evidence

Screenshots are the production Control UI build against a mocked Gateway with synthetic messages, in Chromium, light theme, at 100% scale. "Before" is the base 0633f256350b. Each failure comes from the real flow: IndexedDB writes rejected in the page for the draft notice, a chat error event after a real send for the reply notices, a rejected session.reactions.set after picking a reaction, and a failed run in the session history for the transcript card.

Draft could not be saved (known cause, 1280 px)

Before After
Before: the draft notice with an accent Report a bug link After: the draft notice with only its message and dismiss

Reply failed, cause unknown (1280 px)

Before After
Before: Refresh with an accent Report a bug link stacked under it After: Refresh followed by a quiet Report a bug link on one row

Transcript card, no named cause (1280 px)

Before After
Before: the card with an accent Report a bug link After: the card with a quiet Report a bug link after Try again

Transcript card, billing problem (1280 px)

Before After
Before: Open Models and Try again followed by a Report a bug link After: Open Models and Try again only
Session busy, reaction failed, overloaded provider, and 390 px

Session busy (known cause, 1280 px)

Before After
Before: Check status with a Report a bug link under it After: Check status only

Reaction failed (raw failure, 1280 px)

Before After
Before: raw failure text with an accent Report a bug link After: raw failure text with a quiet Report a bug link

Reply failed, cause unknown (390 px)

Before After
Before at 390 px: the link under Refresh pushes the description down After at 390 px: Refresh beside the title, the quiet link on the last row

Session busy (390 px)

Before After
Before at 390 px: Check status with a Report a bug link under it After at 390 px: Check status only

Transcript card, overloaded provider (1280 px)

Before After
Before: Try again followed by a Report a bug link After: Try again only

Transcript card, no named cause (390 px)

Before After
Before: the card at 390 px with an accent Report a bug link After: the card at 390 px with a quiet Report a bug link

Transcript card, billing problem (390 px)

Before After
Before: the card at 390 px with a Report a bug link on its own row After: the card at 390 px with its actions on one row

Transcript card, overloaded provider (390 px)

Before After
Before: the card at 390 px with a Report a bug link After: the card at 390 px with Try again only

Author checks on 7b31dd883d4b:

  • chat-view-notices.test.tsx, chat-view-notices.browser.test.tsx (Chromium), and chat-run-failure-notice.test.ts: 46 passed. The new notice case covers an explained page-level error with no link and no action slot, sign-in and busy reply failures with recovery but no link, and an unexplained reply failure with the link after the recovery button. The card test now also proves a billing failure and an overloaded provider show no link. The existing 300 px and 500 px cases still prove recovery and reporting do not overlap and stay clickable.
  • chat-run-failure-notice.browser.test.tsx (Chromium), chat-run-failure-streaks.test.ts, and chat-transcript-invalidation.test.ts: 33 passed.
  • The 76 chat unit test files that read chat errors: 1,568 passed on the first revision; the reaction, task-suggestion, notice, and card files were rerun on the final one and pass.
  • UI typecheck, oxlint and oxfmt on the changed files, stylelint, the line-cap ratchet, and the Control UI controller guard pass.
  • pnpm check:changed on an earlier revision also reported unused exports in scripts/bench-ci-planner.mts and ui/src/pages/config/talk-transcription.tsx. This change does not touch either file. Its line-cap failure on that revision is fixed here by reusing the existing detail channel.
  • Local autoreview (Codex engine, P0–P2) on the committed range against origin/main. The first pass found one P2: accepting a task suggestion lost the link for unexplained failures. That is fixed; the repository prompt, which explains its own failure, stays without the link. Later passes on ea28b99f7c10 and on the final 7b31dd883d4b, which adds the transcript card, reported no findings. The reviewer saw the diff only and did not run code.

Size against the merge base: production +98/−24 across 10 files, of which 45 lines are CSS; tests +53/−1; docs +3/−2.

Not covered: WebKit and Firefox, dark theme and right-to-left screenshots, and a live Gateway.

Requested and directed by @vyctorbrzezowski.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 13, 2026 03:46
Chat error notices attached "Report a bug" to every error, including
ones with a known cause and a clear next step. The notice now shows the
link only when its source could not explain the failure: a reply that
failed for an unknown reason, a session that could not start, and
page-level errors that carry their raw failure. The link is a quiet
secondary link after the recovery action.

Co-authored-by: vyctorbrzezowski <[email protected]>
… explain

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 9908477f-b922-4275-b42b-7b55dda6f34a
@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S labels Nov 13, 2026
roboclaw-bot and others added 2 commits November 13, 2026 03:58
The transcript card offers reporting only when the run has no failover reason or one that leaves the cause open, and shows it as a quiet link after the recovery actions.

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

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 56f39ae5-d82a-4f12-8fc6-565a4fe541b4
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR makes bug-report links secondary and limits them to chat failures without an explained cause.

Example: A transcript reply fails with OpenRouter billing as its recorded cause.

  • Before: Edit message, Open Models, Try again, and Report a bug appear together.
  • After: The recovery actions remain, while Report a bug disappears.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, visually demonstrated improvement with no actionable introduced findings; ordinary CI remains unexercised on this draft.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots exercise the built Control UI with synthetic Gateway responses and normal flows, demonstrating explained versus unexplained notices, recovery-first ordering, phone layout, and transcript billing behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Prominent reporting links compete with useful recovery actions even when an error already explains what happened.
Reason: The maintainer-authored direction deliberately prioritizes recovery while retaining reporting for unexplained failures and through Help.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored draft open: the reporting change is useful, and no actionable introduced defect was found.

Priority: P3
Reviewed head: 75836a4905babd7bc95705ca1e40167d1025ef44

Before merge

None.

Findings

None.

Agent review details

How this fits together

Control UI error owners supply messages, diagnostics, and recorded failure causes to existing notice components, which render recovery actions and a fixed GitHub reporting link.

flowchart TD
  A[Chat operation failures] --> B[Existing chat error owner]
  C[Transcript failure facts] --> D[Reply failure notice]
  B --> E[Shared chat notice]
  E --> F[Recovery controls]
  D --> F
  E --> G[Conditional GitHub report link]
  D --> G
Loading

Technical review

Best possible solution:

Keep reporting conditional within the existing error renderers, preserving recovery controls, diagnostic redaction, and the Help menu entry.

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

Current-main renderers unconditionally attach reporting links, matching the supplied before screenshots; no independent runtime reproduction was performed.

Is this the best way to solve the issue?

The patch is a focused implementation using existing diagnostic ownership and structured failure reasons instead of guessing from displayed text.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Reporting availability and prominence changes intended behavior with a stated reason (85e387a: Provide privacy-safe issue links directly on error surfaces without replacing recovery controls.)
  • Error diagnostics and recovery copy keeps the original intent (12d93a4: Separate useful recovery messages from collapsed technical diagnostics while preserving caller-owned instructions.)
  • Task acceptance error cleanup keeps the original intent (d67967a: Successful retries clear only their own error writes, preserving newer and unrelated failures.)
  • Transcript provider recovery keeps the original intent (32cff78: Name credential and billing failures and direct their recovery to Models.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 6b9eb8a adds ui/src/pages/chat/components/chat-run-failure-notice.tsx:13 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6b9eb8a7971d; files: ui/src/pages/chat/components/chat-run-failure-notice.tsx)
  • Ayaan Zaidi: Raw commit 32cff78 adds ui/src/pages/chat/components/chat-run-failure-notice.tsx:20 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 32cff78f66d8; files: ui/src/pages/chat/components/chat-run-failure-notice.tsx)
  • RoboClaw: Raw commit d67967a adds ui/src/pages/chat/chat-error-state.ts:21 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d67967a3aae7; files: ui/src/pages/chat/chat-error-state.ts)

PR surface

Source +74, Tests +52, Docs +1. Total +127 across 14 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 10 98 24 +74
Tests 3 53 1 +52
Docs 1 3 2 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 154 27 +127

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test changes Production +98/−24; tests +53/−1 Growth is focused on conditional reporting and responsive presentation, including 45 CSS lines, without new persistent state or production modules.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This improves the prominence and relevance of existing reporting links without changing chat execution or recovery.
  • 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.
  • 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 12, 2026, 11:15 PM ET / November 13, 2026, 04:15 UTC.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review November 14, 2026 19:34
@vyctorbrzezowski

Copy link
Copy Markdown
Member

Re-reviewed 75836a4905babd7bc95705ca1e40167d1025ef44.

The current change still addresses a behavior present on main. I checked the error-state owner, redaction and static reporting URL, and inspected the existing desktop/mobile before-and-after evidence. No production adjustment is needed.

Fresh focused validation passed for notices, the transcript failure card, reactions and task suggestions, including the browser layout cases. The two runs reported 583 and 580 passing cases respectively; those totals overlap because the wrapper adds the same mandatory canaries. The independent full-change review found no actionable P0–P2 issue.

The existing exact-head CI size-budget failure remains a landing gate; this comment does not waive it. No new source push or redundant CI rerun was made.

This branch has not been deployed

No deployments
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary 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.

2 participants