Skip to content

fix: avoid sign-in warnings for routine OAuth token expiry - #185263

Merged
hannesrudolph merged 3 commits into
mainfrom
fix/oauth-account-status-copy
Oct 27, 2026
Merged

hannesrudolph merged 3 commits into
mainfrom
fix/oauth-account-status-copy

Conversation

@hannesrudolph

@hannesrudolph hannesrudolph commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

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

  • The production-bundle Models page reproduced the misleading “Expiring” label before the fix. A mixed-credential regression also reproduced misleading OAuth recovery advice before its repair.
  • 112 focused tests across seven suites passed, plus a production-bundle browser scenario covering OAuth expiry, explicit rejection, quota exhaustion, temporary rate limiting, expired static credentials, mixed-credential recovery and selected static-token warnings beside excluded OAuth accounts.
  • Focused suites: 3.09s wall time. Browser: 6.40s test time, 16.76s invocation including the UI build. Hosted CI timing is pending.
  • UI types, targeted lint/format, English i18n baseline/verification, Solid guard, documentation MDX and whitespace checks passed.
  • No new state, timers, effects, controllers, stores, CSS or live provider requests. The visual proof uses synthetic providers and accounts.

Before and after

Synthetic accounts on the production-bundle Settings → Models page.

Before After
Before: OAuth expiry appears as a warning alongside rejection, quota, rate-limit and static-token states After: token expiry is separate from rejected credentials, usage limits and static-token expiry

@clawsweeper

clawsweeper Bot commented Oct 27, 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: L labels Oct 27, 2026
@hannesrudolph
hannesrudolph marked this pull request as ready for review October 27, 2026 00:46
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 27, 2026
@clawsweeper

clawsweeper Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The provider and account display an Expiring warning.
  • After: The provider displays Ready, while account details explain that access-token expiry alone does not require signing in again.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused presentation repair with visible before/after evidence, meaningful regression coverage, successful exact-head gates, and no actionable defects.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots show the changed status owner through the production-bundle Settings → Models page with synthetic Gateway accounts, including routine expiry, rejected credentials, quota exhaustion, temporary rate limiting, and expired static tokens.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Models settings presents short-lived OAuth access-token expiry as a credential warning even when the provider remains usable.
Reason: The maintainer-authored direction corrects misleading status information while preserving explicit failures and existing authentication behavior.

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
Reviewed head: 67f87bea515c311d7a5dd5d105ace559c84833ab

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +65, Tests +447, Docs +20. Total +532 across 9 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 4 85 20 +65
Tests 4 448 1 +447
Docs 1 20 0 +20
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 553 21 +532

Labels

Label changes:

  • add P2: Misleading credential warnings cause avoidable confusion in Models settings without changing whether authentication or model requests succeed.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Misleading credential warnings cause avoidable confusion in Models settings without changing whether authentication or model requests succeed.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • 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 October 26, 2026, 9:03 PM ET / October 27, 2026, 01:03 UTC.

@hannesrudolph
hannesrudolph merged commit 018cdd3 into main Oct 27, 2026
170 of 171 checks passed
@hannesrudolph
hannesrudolph deleted the fix/oauth-account-status-copy branch October 27, 2026 01:32
@hannesrudolph

Copy link
Copy Markdown
Member Author

Merged via squash.

steipete added a commit that referenced this pull request Oct 27, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
…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
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
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.
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
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 P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor 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.

1 participant