The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): a refused desktop half is not reported once another profile published it
Teknium009fd7caba2d
diff --git a/apps/desktop/electron/desktop-plugins-root.test.ts b/apps/desktop/electron/desktop-plugins-root.test.tsindex 0135079d4ce..97f04a84259 100644--- a/apps/desktop/electron/desktop-plugins-root.test.ts+++ b/apps/desktop/electron/desktop-plugins-root.test.ts@@ -509,4 +509,27 @@ describe('desktop tree publication', () => {}})++ it.skipIf(process.platform === 'win32')(+ 'does not report a refusal once another profile published the same package',+ async () => {+ const home = makeHome()+ const appRoot = path.join(home, 'desktop-plugins')+ const pkg = path.join(home, 'plugins', 'media')+ write(path.join(pkg, 'assets', 'asset.txt'), 'package file')+ write(path.join(pkg, 'desktop', 'plugin.js'), 'export default {}')+ fs.symlinkSync('../assets/asset.txt', path.join(pkg, 'desktop', 'asset.txt'))+ write(path.join(home, 'profiles', 'workbot', 'plugins', 'media', 'desktop', 'plugin.js'), 'profile copy')+ const warn = vi.spyOn(console, 'warn').mockImplementation(() => undefined)++ try {+ expect(await reconcileDesktopHalvesReport(home, appRoot)).toEqual({+ published: [path.join(appRoot, 'media')],+ refused: []+ })+ } finally {+ warn.mockRestore()+ }+ }+ )})diff --git a/apps/desktop/electron/desktop-plugins-root.ts b/apps/desktop/electron/desktop-plugins-root.tsindex 99eaea9fdb2..0a77928e17a 100644--- a/apps/desktop/electron/desktop-plugins-root.ts+++ b/apps/desktop/electron/desktop-plugins-root.ts@@ -572,5 +572,6 @@ async function reconcilePass(hermesHome: string, appRoot: string): Promise<Deskt}}- return { published: touched, refused }+ // A same-named package in a later home that did publish owns the root copy; its refused twin is moot.+ return { published: touched, refused: refused.filter(entry => !seen.has(entry.name)) }}