You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by as...@apache.org on 2026/08/20 13:23:53 UTC
(maka) branch main updated: fix(desktop): show signed-in model providers (#3315)
This is an automated email from the ASF dual-hosted git repository.
Astro-Han pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/maka.git
The following commit(s) were added to refs/heads/main by this push:
new 005e06432 fix(desktop): show signed-in model providers (#3315)
005e06432 is described below
commit 005e064328a39fc9d2f7c21fafccb704d64e6e59
Author: Wei Zhang <kw...@gmail.com>
AuthorDate: Thu Aug 20 21:23:49 2026 +0800
fix(desktop): show signed-in model providers (#3315)
---
.../src/renderer/settings/claude-subscription-card.tsx | 3 ++-
.../src/renderer/settings/provider-catalog-page.tsx | 14 ++++++++++++--
.../src/renderer/settings/provider-oauth-section.tsx | 11 ++++++++---
3 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/apps/desktop/src/renderer/settings/claude-subscription-card.tsx b/apps/desktop/src/renderer/settings/claude-subscription-card.tsx
index b26d63d19..57812c5d6 100644
--- a/apps/desktop/src/renderer/settings/claude-subscription-card.tsx
+++ b/apps/desktop/src/renderer/settings/claude-subscription-card.tsx
@@ -31,7 +31,7 @@ import { useRuntimeHostSettingsTarget } from './runtime-host-settings-target.js'
* `useOAuthLoginFlow` — Claude deliberately keeps its own card because it
* needs the manual authorization-code step and the experimental gate.
*/
-export function ClaudeSubscriptionCard() {
+export function ClaudeSubscriptionCard(props: { onLoginSuccess(): void | Promise<void> }) {
const host = useRuntimeHostSettingsTarget();
const locale = useUiLocale();
const copy = getProviderSettingsCopy(locale).claude;
@@ -229,6 +229,7 @@ export function ClaudeSubscriptionCard() {
setStateHint(null);
setPasteValue('');
await refresh();
+ await props.onLoginSuccess();
} else {
setPasteError(subscriptionResultMessage(result.message, copy.submitFailedRetry, locale));
}
diff --git a/apps/desktop/src/renderer/settings/provider-catalog-page.tsx b/apps/desktop/src/renderer/settings/provider-catalog-page.tsx
index 853a2f5f4..9f32db36f 100644
--- a/apps/desktop/src/renderer/settings/provider-catalog-page.tsx
+++ b/apps/desktop/src/renderer/settings/provider-catalog-page.tsx
@@ -8,7 +8,7 @@ import {
Selector,
VStack,
} from '@astryxdesign/core';
-import { ICON_SIZE, ChevronRight, Search } from '@maka/ui/icons';
+import { ICON_SIZE, Check, ChevronRight, Search } from '@maka/ui/icons';
import {
CATALOG_PROVIDER_TYPES,
RECOMMENDED_PROVIDER_TYPES,
@@ -144,7 +144,17 @@ export function ProviderCatalogPage(props: {
startContent={<ProviderLogo type={card.providerType} />}
label={/* a11y-allow: this label names the ROW, not the span. Astryx's Item puts consumer props on its outer wrapper and renders a separate invisible <button> for the click target, so an aria-label on the Item never reaches that button — measured. The button is named from its content, and this span is how the status reaches that name. Removing it drops the runtime error from the row's accessible name (settings.spec:226).*/ <span aria-label={providerCopy.oauthSection.cardAri [...]
description={card.description}
- endContent={<ChevronRight size={ICON_SIZE.chrome} aria-hidden="true" />}
+ endContent={(
+ <HStack gap={2} vAlign="center">
+ {card.isLoggedIn && (
+ <span className="settingsStatus" aria-hidden="true">
+ <Check size={ICON_SIZE.chrome} />
+ <span>{providerCopy.oauthSection.signedIn}</span>
+ </span>
+ )}
+ <ChevronRight size={ICON_SIZE.chrome} aria-hidden="true" />
+ </HStack>
+ )}
onClick={() => props.onPick({
method: 'account',
cardId: card.id,
diff --git a/apps/desktop/src/renderer/settings/provider-oauth-section.tsx b/apps/desktop/src/renderer/settings/provider-oauth-section.tsx
index 5d83009f3..146d50460 100644
--- a/apps/desktop/src/renderer/settings/provider-oauth-section.tsx
+++ b/apps/desktop/src/renderer/settings/provider-oauth-section.tsx
@@ -169,8 +169,12 @@ export function useOAuthCards(props: { query?: string }) {
* level, the same ones the catalog and the connection detail use.
*/
export function OAuthLoginPanel(props: { cardId: OAuthCardId; onLoginSuccess(): void | Promise<void> }) {
- if (props.cardId === 'claude') return <ClaudeSubscriptionCard />;
- if (props.cardId === 'github-copilot') return <GitHubCopilotLoginPanel />;
+ if (props.cardId === 'claude') {
+ return <ClaudeSubscriptionCard onLoginSuccess={props.onLoginSuccess} />;
+ }
+ if (props.cardId === 'github-copilot') {
+ return <GitHubCopilotLoginPanel onLoginSuccess={props.onLoginSuccess} />;
+ }
return <SubscriptionLoginPanel service={props.cardId} onLoginSuccess={props.onLoginSuccess} />;
}
@@ -253,7 +257,7 @@ function SubscriptionLoginPanel(props: {
);
}
-function GitHubCopilotLoginPanel() {
+function GitHubCopilotLoginPanel(props: { onLoginSuccess(): void | Promise<void> }) {
const host = useRuntimeHostSettingsTarget();
const copy = getProviderSettingsCopy(useUiLocale()).oauthSection;
// The shared login-flow controller owns the snapshot refresh, the
@@ -267,6 +271,7 @@ function GitHubCopilotLoginPanel() {
logout: () => window.maka.githubCopilotSubscription.logout(host),
} as OAuthLoginFlowBridge,
display: { name: 'GitHub Copilot', shortName: 'GitHub Copilot' },
+ onLoginSuccess: props.onLoginSuccess,
direct: {
login: () => window.maka.githubCopilotSubscription.connectExistingLogin(host),
refreshTokens: () => window.maka.githubCopilotSubscription.refreshTokens(host),
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org