Repository navigation
improve(ui): organize provider access and local usage - #174904
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Contributor
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
obviyus
marked this pull request as ready for review
October 17, 2026 04:13
obviyus
marked this pull request as draft
October 17, 2026 04:21
This was referenced Oct 18, 2026
obviyus
force-pushed
the
ui-model-providers-rebuild
branch
from
October 18, 2026 23:38
28f50c2 to
0572db0
Compare
Models lists providers as collapsible rows with account plan limits, reset countdowns, connection tests and Remove provider. Local usage moves to /usage, which gains a per-provider daily chart, lower-bound totals, a Carapace summary strip, cost windows and activity charts, and loads session usage without waiting on provider plans or shifting the layout.
obviyus
force-pushed
the
ui-model-providers-rebuild
branch
from
October 19, 2026 04:12
438664f to
e2210a6
Compare
This was referenced Oct 22, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 23, 2026
* feat(ui): rebuild the Models page and consolidate usage on /usage Models lists providers as collapsible rows with account plan limits, reset countdowns, connection tests and Remove provider. Local usage moves to /usage, which gains a per-provider daily chart, lower-bound totals, a Carapace summary strip, cost windows and activity charts, and loads session usage without waiting on provider plans or shifting the layout. * chore: prepare reviewed contributor base integration * fix(ui): preserve provider controls across main integration * chore: prepare reviewed provider and usage integration * improve(ui): organize provider access and local usage * fix(ui): align provider view contracts and regression tests --------- Co-authored-by: Vyctor H. Brzezowski <[email protected]>
This was referenced Oct 26, 2026
This was referenced Nov 2, 2026
Grynn
added a commit
to Grynn/openclaw
that referenced
this pull request
Nov 13, 2026
Retain the native-route readiness behavior from grynn-fixes on the current Solid model-providers page. Derive readiness only from Gateway-confirmed available selected runtimes; config presence, unknown availability and alternate runtime choices cannot mark a provider ready. Keep pending, provider rejection and unavailable outcomes authoritative. Preserve direct credential profiles, expired-profile warnings and connection probes; a native route alone does not expose an API credential probe. Reuse the existing billing-aware runtime labels instead of implying a free subscription route. Proof: rendered owner tests and compiled Chromium route fail on the base with Expired/Not signed in, pass with Ready, then fall back when the route becomes unavailable. 68 focused tests and 13 browser cases pass; UI/pages/E2E types, scoped typed lint, i18n verification, format and line-cap pass. Fresh independent subscription review is scoped-clean. Synthetic mock-Gateway proof, not a live provider or latency measurement. Upstream: openclaw#129766 remains a product decision; retain locally without treating the shared worst-auth reducer as erroneous or opening a competing policy PR. Port to 0220489 (partial): dropped the hasDirectProviderCredentials rename and the no-credentials fallback hunk, which upstream isProviderUsable() (openclaw#174904) already covers. The runtime label (runtimeManagedCredentialParts, absorbing c6e5722) and the probe gate (canProbeProvider) now feed provider-row.tsx, including the collapsed credential line. Test connection stays hidden only when a confirmed native route is the sole usable path, a deliberate divergence from openclaw#174904's isProviderUsable gate. The e2e fallback now expects "Credentials rejected", since upstream checks auth-rejected before auth attention (openclaw#185263). Tests not re-run on this base. Local-Feature: native-provider-ui-readiness Semantic-Source: 49f56ee Upstream-Tracking: openclaw#129766 Drop-When: Upstream renders Gateway-confirmed selected native routes ready without claiming API credentials exist. Rebase-Base: 0220489
This was referenced Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Models mixes provider access and plan limits with local session spending, while the Usage calendar does not show each provider's daily contribution.
User Impact
Local consumption lives on Usage. Models becomes a compact provider list with expandable accounts, limits, and actions. The daily chart supports provider composition, keeps the full period visible when selecting days, and fits annual ranges without dropping days.
Removing a provider asks for confirmation that explains shared accounts, saved API keys and configured aliases. Provider settings and external secrets stay in place. Interrupted or unloaded usage retains its uncertainty in totals, legends, and tooltips.
Why This Change Was Made
One shared limits panel serves provider rows, accounts, and Usage. Models no longer requests local session history, and provider-limit refresh remains separate from local consumption loading. On Models, a failed provider-plan refresh keeps the last accepted provider summary; a successful empty summary clears it.
Removal rechecks current authority before each command and reports confirmed progress if a later command or refresh fails. Results from a retired agent or connection remain retired, following the existing scope owner.
Usage uses the same Cost/descending default for route preloading and later requests, so opening it from a connected page shows the ordering selected by the control without a corrective request.
Original contribution by @obviyus.
Evidence
Inspected before/after screenshots and incomplete-data states, comparing main
48b7b4ewitha95ba50(treeadc5474). The follow-up commitd127f3b55c7c37d5406e0fae0d7d1f2dea08e717moves a type contract and updates tests; it does not change the rendered production code shown in these images.The same synthetic accounts and 1,095 annual session records were exercised in the real production UI bundle on main
48b7b4eand the candidate, in dark/light themes and desktop/mobile layouts. Entering Models made one local-history request on main and zero on the candidate. Rendered annual bars were measured at desktop and mobile widths; a separate browser regression covers 366 days and By Type.Focused coverage includes calendar composition and selection, incomplete-data readouts, empty and failed limit responses, reconnects, authority changes during removal, partial removal outcomes, filters, paging, and retained focus. Initial Usage ordering is checked through the first request and rendered rows, with one history request. The confirmed regressions failed before their fixes. Typechecks, scoped lint, styles, i18n, and changed-file line limits passed.
Measured test command wall time on Tempbook (
scripts/run-vitest.mjs, equivalent topnpm test, with--maxWorkers=1): aggregation 1.20 s; removal 2.32 s; annual browser geometry 1.85 s; the final four-file presentation/removal run 3.82 s; extracted existing defaults cases 1.78 s; final route/query ownership run (17 tests) 2.93 s; Usage overview E2E (2 tests) 11.83 s including bundle setup. The temporary capture scenario is not committed.The first published-head CI run found a type import cycle and six outdated test assumptions. The shared view props now live in an independent type contract. Existing tests retain error uniqueness, retry/focus behavior, catalog recovery, credential scope, and partial heatmap data while following the current UI. The repair passed Madge (zero cycles), typechecks, lint, and the affected test files (35 + 8 + 41 tests).
CI file execution times on run 39819125201: removal 2.66 s; calendar selection 3.63 s; extracted defaults 1.14 s; annual geometry 1.37 s; Usage route 0.18 s. These are Vitest file durations, not whole-job wall times.
Risk and coverage: Gateway responses and credentials are synthetic. Live provider APIs and deletion of real credentials were not exercised. The repository-wide max-lines suppression check reports the same unrelated stale-path failures on main; this is tracked in #179181. No baseline exception or environment override was added. Final CI run 39822318084 passed on
d127f3b55c7c37d5406e0fae0d7d1f2dea08e717; the native workflow verified completed hosted evidence for this head.