Skip to content

fix(ui): surface provider-usage failures instead of silent empty panels - #120309

Merged
steipete merged 12 commits into
openclaw:mainfrom
sasan1200:fix/surface-provider-usage-failures
Aug 21, 2026
Merged

steipete merged 12 commits into
openclaw:mainfrom
sasan1200:fix/surface-provider-usage-failures

Conversation

@sasan1200

@sasan1200 sasan1200 commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Closes #120308

What Problem This Solves

Fixes an issue where operators could not tell a provider-usage outage from an
account with no usage data: all three Control UI consumers of usage.status
reduced a failed request to null with .catch(() => null) and rendered the
same empty state.

Why This Change Was Made

The request boundary records the fact where it happens: requestProviderUsage
in ui/src/lib/provider-usage-request.ts returns { summary, failed }, and
all three former .catch(() => null) sites — the Usage page load, the Usage
route preloader, and the Model Providers loader — consume it. The Usage page
renders its provider section with a warning callout when the request failed
instead of hiding the section; the Model Providers list shows the same notice
above its cards. A null summary without failed keeps the existing
empty-state rendering.

A cancelled request is not an outage: a rejection whose abort signal fired is
reported as not-failed, because both task hosts abort only through
supersession, which also discards the settled result. Reporting it as failed
would render the unavailable notice for every navigation that aborts an
in-flight load.

The flag is per-attempt state: a failed aggregate refresh says nothing about
provider usage, so the Usage page's error path clears it instead of letting a
stale flag keep claiming the last provider request failed after a later
usage.cost or sessions.usage rejection.

The five typed UsageRouteData fixtures in
ui/src/pages/gateway-source-replacement.test.ts carry the new required
providerUsageUnavailable field, so check-test-types passes.

User Impact

  • The Usage page shows "Provider usage is unavailable; the last request
    failed. Refresh to retry." instead of silently omitting the provider panel.
  • The Model Providers page shows the same notice above its provider list
    instead of empty usage cards with no explanation.

Evidence

  • ui/src/lib/provider-usage-request.test.ts covers the boundary: answered,
    failed, and cancelled outcomes; the cancelled case fails with the
    classifier reverted.
  • ui/src/pages/model-providers/load.test.ts: a rejected usage.status
    yields providerUsageFailed: true with a null summary and no page-level
    error; a successful load yields false.
  • ui/src/pages/usage/view.test.ts: the provider section renders the warning
    callout when the payload is marked unavailable, and stays hidden for plain
    empty data.
  • ui/src/pages/model-providers/view.test.ts: the provider list renders the
    notice when the loader recorded a failure.
  • pnpm check:test-types passes at the head; full ui/src/pages/usage,
    ui/src/pages/model-providers, ui/src/lib, and
    ui/src/pages/gateway-source-replacement.test.ts suites green;
    git diff --check clean. The branch is merged with current main.
  • ui/src/pages/usage/usage-page.test.ts runs the sequential case: a
    usage.status failure records the flag, then a later aggregate failure on
    usage.cost clears it; the test fails with the onError clear reverted.

Real behavior proof was captured at exact current head 99984237b8b6f3517a11f32b83e6a4215a655213. Ephemeral gateway on an
isolated state dir with token auth, provider HTTP stalled by a fetch wrapper,
the built Control UI served by that gateway, SPA navigation only:

18:15:01.3  navigate to Model Providers; config.get 101ms, sessions.usage
            102ms, models.list 128ms answered; cold usage.status outstanding
18:15:02.3  gateway SIGKILL'd; usage.status dies unanswered - zero responses
            in the run; page records providerUsageFailed=true, providerUsage=null
18:15:42    gateway relaunched; page reconnects
18:15:52    provider list renders "Provider usage is unavailable; the last
            request failed. Refresh to retry."
01-usage-failed 02-model-providers-failed 03-model-providers-recovered-empty 04-usage-recovered-empty [model-providers-continuous.webm](https://github.com/user-attachments/assets/6bb25439-22d7-4f2b-a1a0-6b3916f31773) [usage-continuous.webm](https://github.com/user-attachments/assets/2c6a76b5-248c-43fb-b579-76876f6a4640)

The same sequence on main renders silent empty usage cards with no notice.

@sasan1200
sasan1200 marked this pull request as ready for review August 7, 2026 17:39
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. labels Aug 7, 2026
@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 7:15 PM ET / 23:15 UTC.

ClawSweeper review

What this changes

This PR makes the Usage and Model Providers Control UI pages show a retryable notice when the gateway's provider-usage request fails instead of treating the failure as an empty result.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open: current main still collapses rejected provider-usage requests into empty data, while this PR carries that failure as explicit state to both affected Control UI pages. The current-head real-Gateway capture addresses the prior proof request; the remaining work is ordinary merge-head refresh rather than a repair dispatch.

Priority: P1
Reviewed head: 99984237b8b6f3517a11f32b83e6a4215a655213

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused existing-behavior repair with strong current-head visual proof; merge-head refresh is the remaining confidence reducer.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (recording): The PR body provides exact-head isolated-Gateway failure and recovery evidence with screenshots and continuous recordings for both affected Control UI pages.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (recording): The PR body provides exact-head isolated-Gateway failure and recovery evidence with screenshots and continuous recordings for both affected Control UI pages.
Evidence reviewed 8 items Current-main defect remains: Current main still catches a rejected usage.status request and converts it to null before the Usage page can distinguish failure from an empty provider list.
Canonical shared boundary: The branch adds one Result-returning request boundary that preserves successful empty data, request failure, and cancellation semantics for all affected consumers.
Both rendered consumers use the outcome: The Usage page maps the failed Result arm to its warning state, and Model Providers maps it to a notice above provider cards.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs ui/src/e2e/model-provider-usage-outcomes.e2e.test.ts ui/src/e2e/usage-cost-analysis.e2e.test.ts

Result: FAIL (partial) — step 2 expect_output shows a visible warning when the provider usage request fails: expected terminal output was not visible within 30 seconds: "shows a visible warning when the provider usage request fails"

node scripts/run-vitest.mjs ui/src/e2e/model-provider-usage-outcomes.e2e.test.ts ui/src/e2e/usage-cost-analysis.e2e.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-120309-p3TPIz/target$ node scripts/run-vitest.mjs ui/src/e2e/model-provider-usage-outcomes.e2e.test.ts ui/src/e
2e/usage-cost-analysis.e2e.test.ts
[test] starting test/vitest/vitest.ui-e2e.config.ts
[test] preflight test/vitest/vitest.ui-e2e.config.ts
node scripts/run-vitest.mjs ui/src/e2e/model-provider-usage-outcomes.e2e.test.ts ui/src/e2e/usage-cost-analysis.e2e.test.ts
[ui-e2e] Using system Chromium at /usr/bin/chromium-browser.
Downloading FFmpeg (playwright ffmpeg v1011) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux.zip
|                                                                                |   0% of 2.3 MiB
|■■■■■■■■                                                                        |  10% of 2.3 MiB
|■■■■■■■■■■■■■■■■                                                                |  20% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■                                                        |  30% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                                |  40% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                        |  50% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                |  60% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                        |  70% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                |  80% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■        |  90% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 2.3 MiB
FFmpeg (playwright ffmpeg v1011) downloaded to /tmp/clawsweeper-live-proof-120309-p3TPIz/profile/cache/ms-playwright/ffmpeg-1011

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-120309-p3TPIz/target





























Assertions:

  • FAIL expect_output: shows a visible warning when the provider usage request fails

How this fits together

The Control UI requests provider billing and quota data from the Gateway alongside session usage and model configuration. This change preserves a failed provider-usage request through the shared request boundary so each page can render an intentional unavailable state.

flowchart LR
  A[Gateway provider usage request] --> B[Shared request boundary]
  B --> C{Answered or failed}
  C -->|Usage data| D[Page data state]
  C -->|Request failure| E[Unavailable state]
  D --> F[Usage and Model Providers panels]
  E --> F
Loading

Before merge

  • Resolve merge risk (P1) - The branch is behind current main; GitHub reports it cleanly mergeable, but the exact merge head should receive the affected Control UI checks and a final visual smoke before landing.
  • Resolve merge risk (P1) - Production code grows by 50 net lines; the shared explicit Result boundary is justified by three consumers needing one source of truth, but the merge should retain that single boundary rather than add page-specific failure paths.
  • Complete next step (P2) - No repair dispatch is needed: the patch has no supported correctness finding, and rebasing/merge-head verification are normal PR follow-through.
Agent review details

Security

None.

PR surface

Source +50, Tests +519. Total +569 across 21 files.

View PR surface stats
Area Files Added Removed Net
Source 11 83 33 +50
Tests 10 528 9 +519
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 21 611 42 +569

Review metrics

Metric Value Why it matters
Production versus test delta production +83/-33 (net +50); tests +528/-9 (net +519) The added production boundary and UI state are concentrated, while most growth is regression coverage across both consumer pages.
Failure-state coverage 3 request consumers routed through 1 shared outcome boundary This removes the prior three independent paths that erased a provider-usage request failure.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep one shared provider-usage outcome boundary, rebase it onto current main, and validate the warning and its clearing on both Control UI pages from the resulting merge head.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep one shared provider-usage outcome boundary, rebase it onto current main, and validate the warning and its clearing on both Control UI pages from the resulting merge head.

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

Yes—source inspection gives a high-confidence path: reject usage.status while loading either Control UI page on current main, where both loaders reduce that rejection to null; the PR also supplies an exact-head real-Gateway demonstration.

Is this the best way to solve the issue?

Yes—the shared Result boundary is the narrowest maintainable fix because it records the failure at the RPC boundary and gives both views the same explicit state without conflating valid empty data.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides exact-head isolated-Gateway failure and recovery evidence with screenshots and continuous recordings for both affected Control UI pages.
  • add proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The PR body provides exact-head isolated-Gateway failure and recovery evidence with screenshots and continuous recordings for both affected Control UI pages.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (recording): The PR body provides exact-head isolated-Gateway failure and recovery evidence with screenshots and continuous recordings for both affected Control UI pages.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.
  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is recording.

Label justifications:

  • P1: A normal Control UI workflow currently hides a provider-usage outage as an empty panel, leaving operators without an intentional outcome.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (recording): The PR body provides exact-head isolated-Gateway failure and recovery evidence with screenshots and continuous recordings for both affected Control UI pages.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides exact-head isolated-Gateway failure and recovery evidence with screenshots and continuous recordings for both affected Control UI pages.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The PR body provides exact-head isolated-Gateway failure and recovery evidence with screenshots and continuous recordings for both affected Control UI pages.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the Model Providers page and Usage refresh lifecycle, and supplied the final Vite build-path review note. (role: feature-history owner and recent reviewer; confidence: high; commits: 007400568221, e37eed86b0d5, 05028da50df8; files: ui/src/pages/model-providers/model-providers-page.ts, ui/src/pages/usage/usage-page.ts, ui/vite.config.ts)
  • joshavant: Recent merged work changed Model Providers and provider-loading behavior in the same decision surface. (role: recent adjacent Control UI contributor; confidence: medium; commits: 9496a4b19924, 49275b8f4b46; files: ui/src/pages/model-providers/load.ts, ui/src/pages/model-providers/model-providers-page.ts)

Rank-up moves

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

  • Rebase onto current main and rerun the affected Control UI checks plus a short warning-and-recovery smoke on the resulting 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.

History

Review history (8 earlier review cycles)
  • reviewed 2026-08-07T17:45:48.251Z sha d0c49e5 :: needs changes before merge. :: [P1] Update all typed route-data fixtures
  • reviewed 2026-08-07T21:50:03.777Z sha 902bb85 :: needs changes before merge. :: [P2] Clear the provider failure flag when an aggregate load fails
  • reviewed 2026-08-07T22:45:34.881Z sha 28efb0b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-07T23:40:48.205Z sha 27b0352 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-14T22:48:04.688Z sha 27b0352 :: needs changes before merge. :: none
  • reviewed August 19, 2026, 7:52 PM ET / 23:52 UTC sha unknown :: needs changes before merge. :: none
  • reviewed 2026-08-20T17:14:26.603Z sha 9998423 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-20T17:59:14.617Z sha 9998423 :: needs real behavior proof before merge. :: none

…led usage requests as failed

- Add providerUsageUnavailable to the five UsageRouteData fixtures in
  gateway-source-replacement.test.ts; check-test-types passes again.
- requestProviderUsage reports failed only for non-cancelled rejections; an
  aborted request is the caller superseding its own load, not an outage.
- Cover answered, failed, and cancelled outcomes.
@sasan1200

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@sasan1200

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. label Aug 7, 2026
… fails

- A failed aggregate refresh says nothing about provider usage; the stale
  flag no longer keeps claiming the last provider request failed after a
  later usage.cost or sessions.usage rejection.
- Sequential regression: usage.status failure, then an aggregate failure,
  ends with the flag cleared.
@sasan1200

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added 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 rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 7, 2026
@steipete

Copy link
Copy Markdown
Contributor

The canonical Result approach here is right. One current build blocker: ui/src/lib/provider-usage-request.ts imports @openclaw/normalization-core/result, but ui/vite.config.ts does not register that source subpath before the root normalization-core alias. Vite therefore resolves it to the nonexistent packages/normalization-core/src/index.ts/result.

Adding sourcePackageAlias("normalization-core", "result") before sourcePackageAlias("normalization-core"), with coverage in ui/src/app/vite-config.node.test.ts, should unblock pnpm ui:build and the affected UI CI jobs.

@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 20, 2026
@sasan1200

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Aug 20, 2026
@steipete

Copy link
Copy Markdown
Contributor

@sasan1200 Thanks—the canonical Result boundary and Vite alias are now green. The remaining landing blocker is current-head user-visible proof.

Please update Evidence for 99984237b8b6 using an isolated, real Gateway serving the rebuilt Control UI: make usage.status fail, show its warning on both Usage and Settings → Model Providers, then restore a successful/empty response and show the warning clears. Include the exact head/commands and sanitized screenshots or video.

The existing browser tests mock the Gateway, and CI's real-Gateway lane currently exercises auth/Logs instead of these screens. ui/src/e2e/logs-lifecycle.e2e.test.ts demonstrates the reusable createOpenClawTestState + startGatewayServer setup if useful. Once that exact-head evidence is in the PR body, we can finish landing this.

@clawsweeper clawsweeper Bot added proof: 🎥 video Contributor real behavior proof includes video or recording evidence. 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Aug 20, 2026
@sasan1200

Copy link
Copy Markdown
Contributor Author

@steipete done. thanks bro!

@steipete
steipete merged commit 034325d into openclaw:main Aug 21, 2026
208 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 Aug 21, 2026
…ls (openclaw#120309)

* fix(ui): surface provider-usage failures instead of empty panels

* fix(ui): complete typed route-data fixtures and stop reporting cancelled usage requests as failed

- Add providerUsageUnavailable to the five UsageRouteData fixtures in
  gateway-source-replacement.test.ts; check-test-types passes again.
- requestProviderUsage reports failed only for non-cancelled rejections; an
  aborted request is the caller superseding its own load, not an outage.
- Cover answered, failed, and cancelled outcomes.

* chore(ui): keep ProviderUsageFetch local to its module

* fix(ui): clear the provider failure flag when an aggregate usage load fails

- A failed aggregate refresh says nothing about provider usage; the stale
  flag no longer keeps claiming the last provider request failed after a
  later usage.cost or sessions.usage rejection.
- Sequential regression: usage.status failure, then an aggregate failure,
  ends with the flag cleared.

* test(ui): type the usage route data on the test element

* test(ui): cover provider usage request outcomes

* fix(ui): model provider usage request outcome

* fix(ui): preserve provider usage outcomes

* fix(ui): resolve provider usage build
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 P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording 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.

Provider-usage failures are indistinguishable from no data in the Control UI

2 participants