fix(web): stop rendering healthy ready providers as auth failures - #7943
fix(web): stop rendering healthy ready providers as auth failures#7943IzonIcy wants to merge 4 commits into
Conversation
A provider snapshot with `status: "ready"` and unverified auth (Grok has no auth check today) hit the settings-card fallback text "Installed and ready, but authentication could not be verified", which reads like an auth failure on every health-check cycle. Render the ready branch neutrally instead: headline stays "Available" and the detail line is omitted unless the server supplied a message, matching how the authenticated/unauthenticated branches behave. Covers pingdotgg#7932.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Skipped Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically. |
|
Note: GPT-6 on behalf of Shivam (@shivamhwp). Closing as already implemented in #5362. The provider summary now shows Available for a ready provider with unknown authentication status, and the regression test covers that case. |
What changed
One line in
getProviderSummary(apps/web/src/components/settings/providerStatus.ts). A provider snapshot withstatus: "ready"andauth.status: "unknown"no longer falls back to the detail text "Installed and ready, but authentication could not be verified." The ready branch now rendersdetail: provider.message ?? null— headline stays Available, and the detail line is simply omitted unless the server supplied a message, matching how the authenticated/unauthenticated branches already behave.Adds
providerStatus.test.tscovering all branches ofgetProviderSummary, including a regression test for this case.Why
Fixes #7932. Grok's health check has no auth verification today, so its success path returns
status: "ready"withauth.status: "unknown"and no message. Every 5-minute cycle, a fully healthy Grok install rendered text that reads like an auth failure in Settings → Connections.The auth contract only offers
authenticated | unauthenticated | unknown— there is no "verified by session" state, so claiming authenticated server-side would be a lie, and deriving real auth from the ACP session is a larger project. Rendering unknown-auth-but-ready neutrally is honest with a minimal diff. The chat-view banner already treatsreadyas healthy; this aligns the settings card with it. Mobile renders no summary text, desktop wraps web.Visual delta
Before: green dot +
Available - Installed and ready, but authentication could not be verified.After: green dot +
AvailableHappy to attach real before/after screenshots if you want them — say the word.
Verification
ProviderInstanceCard.test.ts,providerInstances.test.ts): 30/30 passingtsgo --noEmit) and lint clean--
Worked by ox-alpha via opencode (x-preview-f-free).
Note
Low Risk
Settings UI copy only; behavior is narrowed to omit misleading auth warnings when no server message exists, with tests locking the branches.
Overview
Fixes misleading Settings → Connections copy for providers that are ready but report
auth.status: "unknown"(e.g. Grok, which does not verify auth on probe).In
getProviderSummary, the default Available branch no longer falls back to "Installed and ready, but authentication could not be verified." It now usesprovider.message ?? null, so the detail line is omitted unless the server sends a message—aligned with authenticated/unauthenticated branches and with chat treatingreadyas healthy.Adds
providerStatus.test.tswith branch coverage forgetProviderSummary, including a regression test for #7932.Reviewed by Cursor Bugbot for commit 368a60b. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Stop rendering ready providers as auth failures in
getProviderSummaryUpdates the available/ready branch of
getProviderSummaryin providerStatus.ts to useprovider.messageornullinstead of a generic authentication-not-verified string. Adds a test suite in providerStatus.test.ts covering pre-probe, disabled, CLI missing, authenticated, unauthenticated, warning, error, and ready-with-message cases.Macroscope summarized 368a60b.