Repository navigation
fix(gui): show verified Claude account in provider overview #8334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7a92d17
a7be9c6
c332381
f5bcba6
93eb507
f4fe216
2b39432
c3cfa4a
8fcf7ae
37d8279
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,7 +37,7 @@ type ConnectionTestState = { | |
| }; | ||
|
|
||
| export default function ProviderOverview({ | ||
| item, preset, usageTotals, quotaReport, currentQuotaReading, onRefreshQuota, oauthEmail, oauth, | ||
| item, preset, usageTotals, quotaReport, currentQuotaReading, onRefreshQuota, oauthEmail, currentAccountLabel, oauth, | ||
| apiBase, connectionIdentity, probeController, availableModels = [], selectedModels, modelRows, modelRowsReady = false, | ||
| modelsLoading = false, modelsLoadFailed = false, onRetryModels, onOpenAccounts, onOpenModelsTab, onOpenModels, onOpenConnect, | ||
| onEditSettings, onViewUsage, onUpdateProvider, | ||
|
|
@@ -51,6 +51,7 @@ export default function ProviderOverview({ | |
| currentQuotaReading?: AccountQuotaReading; | ||
| onRefreshQuota?: () => Promise<boolean>; | ||
| oauthEmail?: string; | ||
| currentAccountLabel?: string; | ||
| /** Login state for OAuth summaries that carry no email (e.g. Cursor/Kimi). */ | ||
| oauth?: { loggedIn?: boolean; needsReauth?: boolean }; | ||
| apiBase?: string; | ||
|
|
@@ -246,6 +247,7 @@ export default function ProviderOverview({ | |
| ? t("pws.firstResponse.probeReverify", { model: reverifyModel }) | ||
| : t("pws.firstResponse.probeUntested"); | ||
| const displayEmail = isAnthropicInstanceId(item.name) && anthropicInstanceRowShapeMatches(item.name, item) ? undefined : oauthEmail; | ||
| const currentClaudeAccount = isAnthropicInstanceId(item.name) && anthropicInstanceRowShapeMatches(item.name, item) ? currentAccountLabel : undefined; | ||
| const openModelsAction = onOpenModelsTab ?? onOpenModels; | ||
| const fixCredentialsAction = onOpenAccounts ?? onEditSettings; | ||
|
|
||
|
|
@@ -274,6 +276,9 @@ export default function ProviderOverview({ | |
| <dt>{t("pws.cell.auth")}</dt> | ||
| <dd>{displayEmail ? `${authModeLabel(item, t)} · ${displayEmail}` : authModeLabel(item, t)}</dd> | ||
| </div> | ||
| {currentClaudeAccount && <div className="pws-kv-row"> | ||
| <dt>{t("pws.accountCurrent")}</dt><dd>{currentClaudeAccount}</dd> | ||
| </div>} | ||
| <div className="pws-kv-row"> | ||
| <dt>{t("modal.defaultModel")}</dt> | ||
| <dd>{item.defaultModel ?? <span className="muted">—</span>}</dd> | ||
|
|
@@ -448,9 +453,9 @@ export default function ProviderOverview({ | |
| : item.authMode === "oauth" | ||
| ? (displayEmail | ||
| ? t("pws.loggedInAs", { email: displayEmail }) | ||
| : oauth?.loggedIn | ||
| : oauth?.loggedIn === true | ||
| ? t("pws.loggedInTitle") | ||
| : t("pws.notLoggedIn")) | ||
| : oauth?.loggedIn === false ? t("pws.notLoggedIn") : t("startup.unverified")) | ||
|
Comment on lines
+456
to
+458
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| : item.hasApiKey | ||
| ? t("pws.apiKeyConfigured") | ||
| : authModeLabel(item, t)} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
rg -n 'accountLoadStates|setAccountSets|loggedIn: false|setOauthStatus|currentAccountLabel' gui/src/hooks/useProviderAccountPools.ts gui/src/pages/use-providers-fetch.ts gui/src/pages/Providers.tsx gui/tests/anthropic2-provider-surfaces.test.tsxRepository: lidge-jun/opencodex
Length of output: 7220
Script executed:
Repository: lidge-jun/opencodex
Length of output: 43377
Script executed:
Repository: lidge-jun/opencodex
Length of output: 42001
Script executed:
Repository: lidge-jun/opencodex
Length of output: 29887
Script executed:
Repository: lidge-jun/opencodex
Length of output: 23868
Script executed:
Repository: lidge-jun/opencodex
Length of output: 10557
Script executed:
Repository: lidge-jun/opencodex
Length of output: 4594
Script executed:
Repository: lidge-jun/opencodex
Length of output: 12430
Script executed:
Repository: lidge-jun/opencodex
Length of output: 6848
Script executed:
Repository: lidge-jun/opencodex
Length of output: 12357
Script executed:
Repository: lidge-jun/opencodex
Length of output: 5630
Script executed:
Repository: lidge-jun/opencodex
Length of output: 18885
Reconcile the roster before showing the current account.
If an account is removed elsewhere while the selection stream is delayed, a newer status read can report logout while
ProviderDetails.tsx:376still displays the removed account. Reconcile the roster before showing its label. Preserve active accounts that need reauthentication.