Skip to content

fix(ui): show Usage detail request failures - #108689

Merged
steipete merged 8 commits into
openclaw:mainfrom
destire-mio:fix/control-ui-detail-errors
Jul 16, 2026
Merged

steipete merged 8 commits into
openclaw:mainfrom
destire-mio:fix/control-ui-detail-errors

Conversation

@destire-mio

Copy link
Copy Markdown
Contributor

Closes #107856

What Problem This Solves

The Usage session detail view silently treated rejected sessions.usage.timeseries and sessions.usage.logs requests as empty data. Operators could not distinguish a Gateway failure from a session with no timeline or conversation data.

Why This Change Was Made

  • Track timeline and conversation failures independently.
  • Clear stale detail data and the previous error when a request or retry starts.
  • Ignore stale responses after the selected session changes.
  • Render a panel-level localized error with a targeted Retry action.
  • Add controller and rendering tests for failure and successful retry behavior.

The issue's original Overview log path no longer exists on current main: log viewing is now handled by the Logs page, which already captures logs.tail failures and renders a retryable error. This PR therefore changes only the two remaining silent failure paths.

User Impact

Operators can now tell when either Usage detail request failed and retry only the affected panel.

Evidence

  • node scripts/run-vitest.mjs ui/src/pages/usage/usage-page.test.ts ui/src/pages/usage/view-details.test.ts ui/src/pages/usage/view.test.ts — 3 files, 17 tests passed
  • UI TypeScript check passed
  • UI-test TypeScript check passed
  • i18n baseline and catalog verification passed
  • focused oxlint and oxfmt checks passed
  • git diff --check passed
  • repository autoreview: clean, no accepted/actionable findings (0.94 confidence)

The full changed-file gate attempted to delegate to Blacksmith Testbox but stopped before execution because the local Crabbox binary failed its own sanity check. GitHub CI will run the repository matrix.

AI-assisted: Yes, Codex was used. I reviewed and understand the implementation.

@destire-mio
destire-mio force-pushed the fix/control-ui-detail-errors branch 2 times, most recently from 1fd9fe6 to 2e0ae5b Compare July 16, 2026 07:02
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jul 16, 2026
@clawsweeper

clawsweeper Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 16, 2026, 3:11 AM ET / 07:11 UTC.

Summary
The PR adds independent Usage timeline and conversation error states, localized panel messages, targeted retry actions, and focused controller and rendering tests.

PR surface: Source +125, Tests +173. Total +298 across 9 files.

Reproducibility: yes. from source inspection: current main suppresses both Usage detail request failures without recording an error, matching the linked report. This review did not execute a live browser reproduction.

Review metrics: none identified.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #107856
Summary: This PR is the direct candidate fix for the linked issue's two remaining silent Usage-detail failure paths.

Members:

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

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted browser screenshots or a short recording showing a failed detail panel and its successful targeted retry.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR provides focused tests and static checks but no after-fix real-browser evidence; add redacted screenshots or a recording, update the PR body to trigger another review, or ask a maintainer to comment @clawsweeper re-review.

Risk before merge

  • [P1] Tests and static checks do not demonstrate that the visible callout, targeted Retry action, and successful recovery behave correctly in a real browser.

Maintainer options:

  1. Decide the mitigation before merge
    Keep the independent panel-owned failure states and retries, then provide redacted real-browser evidence showing a rejected request rendered as an error and the affected panel recovering after Retry.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] No automated code repair is identified; contributor-supplied real behavior proof is the remaining merge action.

Security
Cleared: The diff is limited to UI state, rendering, tests, and expected i18n baseline output, with no concrete security or supply-chain concern.

Review details

Best possible solution:

Keep the independent panel-owned failure states and retries, then provide redacted real-browser evidence showing a rejected request rendered as an error and the affected panel recovering after Retry.

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

Yes, from source inspection: current main suppresses both Usage detail request failures without recording an error, matching the linked report. This review did not execute a live browser reproduction.

Is this the best way to solve the issue?

Yes, subject to real behavior proof: keeping independent error state and retry callbacks at the owning Usage-page boundary is a focused solution, and no existing supported UI path surfaces these two failures.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add P2: This is a bounded Control UI observability bug that hides RPC failures but does not corrupt data or disable the core runtime.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR provides focused tests and static checks but no after-fix real-browser evidence; add redacted screenshots or a recording, update the PR body to trigger another review, or ask a maintainer to comment @clawsweeper re-review.

Label justifications:

  • P2: This is a bounded Control UI observability bug that hides RPC failures but does not corrupt data or disable the core runtime.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR provides focused tests and static checks but no after-fix real-browser evidence; add redacted screenshots or a recording, update the PR body to trigger another review, or ask a maintainer to comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +125, Tests +173. Total +298 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 6 131 6 +125
Tests 3 173 0 +173
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 304 6 +298

What I checked:

  • Current-main failure path: The base implementation catches failures from both Usage detail requests without storing or displaying an error, making rejected requests indistinguishable from empty results. (ui/src/pages/usage/usage-page.ts:356, a7189d228e8c)
  • Request ownership and stale-response handling: The proposed loaders keep error state in the owning Usage page and apply success, failure, and completion only while the request id, client, and selected session remain current. (ui/src/pages/usage/usage-page.ts:358, 2e0ae5be96f9)
  • Independent panel recovery: The rendering change passes separate error values and retry callbacks to the timeline and conversation panels, preserving their independent failure boundaries. (ui/src/pages/usage/view-details.ts:231, 2e0ae5be96f9)
  • Focused regression coverage: The added and updated tests cover controller failures, successful retries, independent error rendering, and callback targeting across the Usage page and detail view. (ui/src/pages/usage/usage-page.test.ts:1, 2e0ae5be96f9)
  • Scoped i18n policy: The scoped UI guidance treats English strings as the source and expects the changed fallback baseline to be committed, matching the PR's locale and generated baseline changes. (ui/AGENTS.md:243, a7189d228e8c)
  • Proof gap: The PR body reports focused tests, type checks, i18n verification, lint, formatting, and diff checks, but includes no screenshot, recording, live browser output, or linked runtime artifact. (2e0ae5be96f9)

Likely related people:

  • BunsDev: Repository contributor guidance connects this handle to UI/UX ownership, and recent project history credits related Control UI Usage work to this person. (role: feature owner; confidence: medium; files: ui/src/pages/usage/usage-page.ts, ui/src/pages/usage/view-details.ts, ui/src/pages/usage/view.ts)
  • steipete: Recent merged history includes broad Control UI architecture and loading-state work, making this person a useful secondary reviewer for the page-state pattern. (role: adjacent owner; confidence: low; commits: e3ff8c4d288b; files: ui/src/pages/usage/usage-page.ts, ui/src/pages/usage/view.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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 force-pushed the fix/control-ui-detail-errors branch from e0a0e76 to 5cac993 Compare July 16, 2026 12:58
@steipete
steipete marked this pull request as ready for review July 16, 2026 14:30
@steipete
steipete merged commit ddb50fc into openclaw:main Jul 16, 2026
263 of 267 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 17, 2026
* fix(ui): show Usage detail request failures

* fix(ui): surface stale panel refresh failures

Co-authored-by: destire-mio <[email protected]>

* ci: pick up periphery workflow fix

* chore(ui): regenerate panel status locales

* refactor(ui): split usage page helpers

* fix(ci): format drift + unused export

* style: format full changed set

* fix(ui): translate panel refresh errors

---------

Co-authored-by: destire-mio <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
* fix(ui): show Usage detail request failures

* fix(ui): surface stale panel refresh failures

Co-authored-by: destire-mio <[email protected]>

* ci: pick up periphery workflow fix

* chore(ui): regenerate panel status locales

* refactor(ui): split usage page helpers

* fix(ci): format drift + unused export

* style: format full changed set

* fix(ui): translate panel refresh errors

---------

Co-authored-by: destire-mio <[email protected]>
Co-authored-by: Peter Steinberger <[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. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Control UI silently hides Overview log and Usage detail RPC failures

2 participants