Repository navigation
fix: avoid sign-in warnings for routine OAuth token expiry - #185263
Conversation
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. What this changesThis PR separates routine OAuth access-token expiry from sign-in failures in Models settings. Example: Example OAuth has an access token expiring in 1h and a ready catalog containing one usable model.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR fixes misleading OAuth status presentation still present on main, with inspected visual proof, green exact-head CI, and no actionable findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Models UI combines Gateway credential-health snapshots, model-catalog outcomes, and usage results into provider cards and account summaries. flowchart TD
A[Credential health owner] --> B[Gateway auth status]
C[Model catalog outcomes] --> D[Provider card projection]
B --> D
E[Provider usage] --> D
D --> F[Shared status presentation]
F --> G[Models cards and account summaries]
Technical reviewBest possible solution: Merge the focused presentation fix while retaining Gateway-owned credential facts and catalog-owned readiness. Do we have a high-confidence way to reproduce the issue? Current-main status rendering shows the failure directly, and the supplied before screenshot demonstrates it in the production UI bundle; no target code was executed during review. Is this the best way to solve the issue? The patch uses the existing presentation owner, distinguishes expiry from unusable credentials, preserves mixed-account warnings, and introduces no competing state or authentication policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6f212fb00990. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +65, Tests +447, Docs +20. Total +532 across 9 files. Added test files: 2. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 26, 2026, 9:03 PM ET / October 27, 2026, 01:03 UTC. |
|
Merged via squash.
|
Regenerate the Control UI locale catalogs and metadata with ui:i18n:sync so build-artifacts no longer fails its catalog fallback baseline check. Keep all 21 locales at zero fallback keys and preserve existing translations. The drift follows English copy in #181747 (Workshop drafts and its config hint), #185263 (OAuth expiry), and #185292 (Side chat selections). Locale refresh run 40433199860 generated the updates but deferred publishing because generator inputs changed on main during publication. Validation: ui:i18n:check reproduced the baseline failure before generation and passed afterward; tsgo:ui passed; independent autoreview found no P0-P2 issues. Generated locale artifacts only: 694 additions, 211 removals.
…185263) * fix: distinguish OAuth access-token expiry from sign-in failures * fix: keep account recovery scoped to credential facts * fix: preserve effective provider warnings across excluded accounts
Regenerate the Control UI locale catalogs and metadata with ui:i18n:sync so build-artifacts no longer fails its catalog fallback baseline check. Keep all 21 locales at zero fallback keys and preserve existing translations. The drift follows English copy in openclaw#181747 (Workshop drafts and its config hint), openclaw#185263 (OAuth expiry), and openclaw#185292 (Side chat selections). Locale refresh run 40433199860 generated the updates but deferred publishing because generator inputs changed on main during publication. Validation: ui:i18n:check reproduced the baseline failure before generation and passed afterward; tsgo:ui passed; independent autoreview found no P0-P2 issues. Generated locale artifacts only: 694 additions, 211 removals.
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
What Problem This Solves
Fixes short-lived OAuth access tokens appearing to require sign-in again solely because their expiry is approaching or has elapsed.
User Impact
Settings → Models distinguishes access-token expiry from unusable authentication. Missing OAuth credentials prompt sign-in; ambiguous refresh state remains “Sign-in unavailable.” Provider authentication rejection stays “Credentials rejected” without attributing it to an unrelated account. Quota exhaustion, temporary rate limits and expired static tokens retain their own warnings.
Why This Change Was Made
The existing presentation owner uses credential type, status and reason together, while catalog evidence still determines readiness. Token expiry alone does not prove sign-out or successful renewal. No authentication, refresh, account-selection, routing, API or storage behavior changes.
Current status metadata does not distinguish pending from failed refresh markers, and the card-wide catalog result does not identify the rejected credential. This change avoids guessing whether another login is required, including when a rejected API key shares a card with an excluded OAuth account.
Evidence
Before and after
Synthetic accounts on the production-bundle Settings → Models page.