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
@@ -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')}