Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(desktop): 修复 MCP 卡片图标与供应商分享页预览 (#6614)

Dash4a68c82b8b68
diff --git a/apps/desktop/scripts/fixtures/provider-share-insights/provider-share-insights-fixture.tsx b/apps/desktop/scripts/fixtures/provider-share-insights/provider-share-insights-fixture.tsx
index 78e2297d4f..8739aab11e 100644
--- a/apps/desktop/scripts/fixtures/provider-share-insights/provider-share-insights-fixture.tsx
+++ b/apps/desktop/scripts/fixtures/provider-share-insights/provider-share-insights-fixture.tsx
@@ -6,6 +6,10 @@ import type {
ProviderShareQuotaAccount,
} from '../../../src/shared/providerShareInsights';
import type { ProviderShareReceived } from '@cindy/device-link';
+import {
+ DEFAULT_REMOTE_AGENT_IDLE_RELEASE,
+ type RemoteAgentIdleReleaseView,
+} from '../../../src/shared/remoteAgentIdleRelease';
const now = Date.parse('2026-10-19T12:00:00Z');
const share: ProviderShareReceived = {
@@ -204,6 +208,12 @@ void mountPage({
customizedKeys: [],
usage: { total: 0, devices: 0, largestDevice: 0 },
};
+ case 'get-idle-release':
+ return {
+ value: { ...DEFAULT_REMOTE_AGENT_IDLE_RELEASE },
+ defaults: { ...DEFAULT_REMOTE_AGENT_IDLE_RELEASE },
+ isCustomized: false,
+ } satisfies RemoteAgentIdleReleaseView;
default:
return forbid(`providerShare.${cmd.action}`)();
}
diff --git a/apps/desktop/scripts/fixtures/provider-share-insights/ui-page.mjs b/apps/desktop/scripts/fixtures/provider-share-insights/ui-page.mjs
index 5ade9f2e96..ad95946066 100644
--- a/apps/desktop/scripts/fixtures/provider-share-insights/ui-page.mjs
+++ b/apps/desktop/scripts/fixtures/provider-share-insights/ui-page.mjs
@@ -57,6 +57,12 @@ export default {
},
async check(page, ui) {
if (ui.case === 'owner') {
+ // The owner page reads idle-release settings on mount. A missing fixture reply
+ // used to turn that read into a forbidden operation and render an error.
+ const idleMinutes = page.getByTestId('remote-agent-idle-release-minutes');
+ await idleMinutes.waitFor();
+ assert.equal(await idleMinutes.inputValue(), '0');
+ assert.equal(await page.getByRole('alert').count(), 0);
const quota = page.getByRole('switch', {
name: await ui.t('providerShare.insights.allowQuota'),
exact: true,
diff --git a/apps/desktop/src/renderer/components/chat/McpAppCard.tsx b/apps/desktop/src/renderer/components/chat/McpAppCard.tsx
index 8cc5ada836..320a235c4b 100644
--- a/apps/desktop/src/renderer/components/chat/McpAppCard.tsx
+++ b/apps/desktop/src/renderer/components/chat/McpAppCard.tsx
@@ -271,7 +271,7 @@ function InteractiveMcpAppCard({ sessionId, clientId, title, fallbackText, devic
>
<div className="flex min-h-9 items-center justify-between gap-3 px-3 text-13 text-[var(--text-secondary)]">
<span>{title ? t('mcpApps.cardTitle', { title }) : appTitle}</span>
- {loading && visible && <Spinner size="sm" />}
+ {loading && visible && <Spinner size={16} />}
{mode === 'fullscreen' && (
<Button
data-exit-fullscreen