From 7d20f2897a025970d9b1178e67be0bab0a13f796 Mon Sep 17 00:00:00 2001 From: herjarsa Date: Fri, 28 Aug 2026 18:22:30 +0200 Subject: [PATCH] docs(providers): drop stale disconnect comment; rewrite changelog bullet Two nits from the openchamber-bot review at 65668f14: - The disconnect handler carried a stale comment that referenced a "removed:false payload gating" feature the rebase removed; the helper below it does not do that gating. Drop the comment. - The Hide button onClick ran setAuthPanelDismissedForId inside the setShowAuthPanel updater (idempotent today, impure under StrictMode double-invoke). Move both calls outside the updater. Also rewrite the [Unreleased] changelog bullet to describe the user-visible change (Connected + models visible for options.apiKey providers) instead of internal mechanics ("source refetch + optimistic auth mark"), and broaden the wording from "after saving" to cover OAuth, custom-provider, and disconnect paths. --- CHANGELOG.md | 2 +- .../sections/providers/ProvidersPage.tsx | 14 +++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bc6d808..32f2248a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ All notable changes to this project will be documented in this file. - Usage: GitHub Copilot now shows a single AI Credits window, matching Copilot's token-based quota, in place of the old Chat Requests and Completions windows (thanks to @jakoss). - Settings: fixed the Cloudflare Tunnel download link shown when cloudflared is not installed (thanks to @AyoubAchour). - Git: picking a remote branch such as `origin/main` in the branch selector now switches you to that branch instead of leaving the repository on a detached `HEAD` with no branch name. -- Providers: after saving a provider's credentials the settings page now refreshes the credential state (source refetch + optimistic auth mark) instead of keeping the stale "Credentials missing" / empty-models summary until the next restart (thanks to @herjarsa). +- Providers: providers whose credential lives in `provider..options.apiKey` now show as Connected with their models visible, instead of "Credentials missing" plus a forced auth panel; covers OAuth, custom-provider, and disconnect paths (thanks to @herjarsa). - Desktop: "Restart to Update" no longer looks dead when the update cannot be installed — the update window now shows the reason, including when the running copy was not installed from an official signed release, and the button stays available to retry. ## [1.21.0] - 2026-08-26 diff --git a/packages/ui/src/components/sections/providers/ProvidersPage.tsx b/packages/ui/src/components/sections/providers/ProvidersPage.tsx index d50b4875..7dc52592 100644 --- a/packages/ui/src/components/sections/providers/ProvidersPage.tsx +++ b/packages/ui/src/components/sections/providers/ProvidersPage.tsx @@ -586,8 +586,6 @@ export const ProvidersPage: React.FC = () => { } toast.success(t('settings.providers.page.toast.providerDisconnected')); - // Only accumulate when the server actually deferred a restart (e.g. auth removed). - // removed:false payloads must not create a phantom pending Apply & Restart. // Use the helper so an externally managed OpenCode that requires a manual // restart records the deferred-restart guidance instead of toasting a // misleading "disconnect failed" for a write that already persisted. @@ -940,15 +938,9 @@ export const ProvidersPage: React.FC = () => { size="xs" className="!font-normal" onClick={() => { - setShowAuthPanel((prev) => { - const next = !prev; - if (!next) { - setAuthPanelDismissedForId(selectedProvider.id); - } else { - setAuthPanelDismissedForId(null); - } - return next; - }); + const nextOpen = !showAuthPanel; + setShowAuthPanel(nextOpen); + setAuthPanelDismissedForId(nextOpen ? null : selectedProvider.id); }} > {showAuthPanel ? t('settings.providers.page.actions.hide') : t('settings.providers.page.actions.reconnect')}