The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): mark a remote-backend desktop half unavailable instead of forever copying
liuhao10242bc2c50df32d
diff --git a/apps/desktop/src/app/skills/plugins-tab.test.tsx b/apps/desktop/src/app/skills/plugins-tab.test.tsxindex 739f5aa225d..15057d52cc4 100644--- a/apps/desktop/src/app/skills/plugins-tab.test.tsx+++ b/apps/desktop/src/app/skills/plugins-tab.test.tsx@@ -7,6 +7,7 @@ import { $pluginRecords } from '@/contrib/plugins-store'import { queryClient } from '@/lib/query-client'import { $agentPlugins, $agentPluginsStatus } from '@/store/agent-plugins'import { $pluginInstallRequest, closePluginInstallRequest } from '@/store/plugin-install-request'+import { $connection } from '@/store/session'import { PageSearchShell } from '../page-search-shell'@@ -17,6 +18,16 @@ import { $catalogCardView } from './store'const requestGateway = vi.fn(async () => ({ plugins: $agentPlugins.get() }))+const connectionFixture = {+ baseUrl: 'http://localhost',+ isFullscreen: false,+ logs: [],+ nativeOverlayWidth: 0,+ token: '',+ windowButtonPosition: null,+ wsUrl: ''+}+// SkillsView owns navigation and search; exercise that controlled contract// with the same primitives instead of giving PluginsTab private controls.function PluginsHarness({@@ -65,6 +76,7 @@ async function selectCatalogEntry(name: string) {afterEach(() => {cleanup()+ $connection.set(null)queryClient.clear()vi.unstubAllGlobals()})@@ -122,6 +134,50 @@ describe('PluginsTab', () => {expect(screen.getByText('No matches')).toBeTruthy()})+ // A desktop half can only be copied out of a backend that runs on THIS+ // machine; against a remote one the reconcile is a structural no-op, so the+ // row must say so instead of pending forever (#114079).+ it('marks a remote-backend desktop half unavailable instead of forever copying', () => {+ $connection.set({ ...connectionFixture, mode: 'remote' })+ $agentPlugins.set([+ {+ description: '',+ has_desktop_half: true,+ key: 'nous-prices',+ name: 'nous-prices',+ source: 'catalog',+ status: 'enabled',+ version: '1'+ }+ ])++ renderPlugins({ profile: null })++ const detail = within(screen.getByRole('row', { name: /^nous-prices/ }))+ expect(detail.getByText('unavailable (remote backend)')).toBeTruthy()+ expect(detail.queryByText('copying…')).toBeNull()+ })++ it('keeps the pending desktop-half state on a local backend', () => {+ $agentPlugins.set([+ {+ description: '',+ has_desktop_half: true,+ key: 'nous-prices',+ name: 'nous-prices',+ source: 'catalog',+ status: 'enabled',+ version: '1'+ }+ ])++ renderPlugins({ profile: null })++ const detail = within(screen.getByRole('row', { name: /^nous-prices/ }))+ expect(detail.getByText('copying…')).toBeTruthy()+ expect(detail.queryByText('unavailable (remote backend)')).toBeNull()+ })+it('renders a unified package as ONE row with a Desktop switch and an Agent switch', () => {$pluginRecords.set({media: { id: 'media', name: 'Media Studio', kind: 'disk', status: 'loaded', packageName: 'hermes-media-studio' }diff --git a/apps/desktop/src/app/skills/plugins-tab.tsx b/apps/desktop/src/app/skills/plugins-tab.tsxindex d77f711cec0..4427b15d6e6 100644--- a/apps/desktop/src/app/skills/plugins-tab.tsx+++ b/apps/desktop/src/app/skills/plugins-tab.tsx@@ -25,6 +25,7 @@ import {} from '@/store/agent-plugins'import { notify, notifyError } from '@/store/notifications'import { openPluginInstallRequest } from '@/store/plugin-install-request'+import { $connection } from '@/store/session'import { Pill } from '../settings/primitives'import { useDeepLinkHighlight } from '../settings/use-deep-link-highlight'@@ -193,6 +194,9 @@ function PackageRow({const desktopOn = desktop ? desktop.status !== 'disabled' : falseconst agentOn = agent?.status === 'enabled'const agentToggleable = Boolean(agent?.key)+ // Electron's desktop-half reconcile only walks THIS machine's homes, so a+ // package installed on a remote backend can never materialize here (#114079).+ const remoteBackend = useStore($connection)?.mode === 'remote'return (<div@@ -250,8 +254,10 @@ function PackageRow({}}/>) : pkg.desktopMissing ? (- <Tip label={p.desktopHalfPendingTip}>- <span className="text-[0.65rem] text-(--ui-text-tertiary)">{p.desktopHalfPending}</span>+ <Tip label={remoteBackend ? p.desktopHalfRemoteTip : p.desktopHalfPendingTip}>+ <span className="text-[0.65rem] text-(--ui-text-tertiary)">+ {remoteBackend ? p.desktopHalfRemote : p.desktopHalfPending}+ </span></Tip>) : (<Dash />diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.tsindex 749ea18fdec..ddc36a66123 100644--- a/apps/desktop/src/i18n/en.ts+++ b/apps/desktop/src/i18n/en.ts@@ -1804,6 +1804,9 @@ export const en: Translations = {desktopHalfPending: 'copying…',desktopHalfPendingTip:'This package ships a desktop half that has not been copied into the app yet. Use Rescan, or restart the app.',+ desktopHalfRemote: 'unavailable (remote backend)',+ desktopHalfRemoteTip:+ "This package's desktop half is installed on the remote backend's disk. This app can only copy desktop halves from a backend running on this machine.",emptyAll: 'No plugins yet.',empty: 'No agent plugins installed for this profile.',emptyHint: 'Browse the catalog below and install a reviewed plugin with one click.',diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.tsindex 1a060abd37d..dbd9ce08ee8 100644--- a/apps/desktop/src/i18n/types.ts+++ b/apps/desktop/src/i18n/types.ts@@ -1597,6 +1597,8 @@ export interface Translations {installAgentHereNoOrigin: stringdesktopHalfPending: stringdesktopHalfPendingTip: string+ desktopHalfRemote: string+ desktopHalfRemoteTip: stringemptyAll: stringempty: stringemptyHint: stringdiff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.tsindex 86a686272c4..d5f9f5a56f6 100644--- a/apps/desktop/src/i18n/zh.ts+++ b/apps/desktop/src/i18n/zh.ts@@ -1966,6 +1966,8 @@ export const zh = defineLocale({'此配置未安装 agent 部分,且该包是手动复制的(无目录条目或 git 远程),无法从此处安装。请将其文件夹复制到该配置或从 Git 重新安装。',desktopHalfPending: '复制中…',desktopHalfPendingTip: '此包附带的桌面部分尚未复制到应用中。请重新扫描或重启应用。',+ desktopHalfRemote: '不可用(远程后端)',+ desktopHalfRemoteTip: '此包的桌面部分安装在远程后端的磁盘上。应用只能从本机运行的后端复制桌面部分。',emptyAll: '还没有插件。',empty: '此配置尚未安装任何 agent 插件。',emptyHint: '在下方目录中浏览,一键安装经过审核的插件。',