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.
This commit is contained in:
herjarsa
2026-08-28 18:22:30 +02:00
parent 65668f1453
commit 7d20f2897a
2 changed files with 4 additions and 12 deletions
+1 -1
View File
@@ -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.<id>.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
@@ -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')}