From 0523d1fae53b60039c8fb491466f00dc97f2a838 Mon Sep 17 00:00:00 2001 From: Tolga Cinisli Date: Tue, 4 Aug 2026 03:51:19 +0300 Subject: [PATCH] feat(desktop): render activity bar on non-managing owner devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The composer activity bar required the working agent to exist in this install's managed-agent registry, so a second desktop signed in with the same owner identity showed nothing during turns. The observer stream is owner-scoped, not install-scoped — fall back to profile-lookup display entries when the registry has no match, keeping managed entries preferred. Signed-off-by: Tolga Cinisli --- .../features/channels/ui/BotActivityBar.tsx | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/desktop/src/features/channels/ui/BotActivityBar.tsx b/desktop/src/features/channels/ui/BotActivityBar.tsx index d685a96103..3bc2c4594f 100644 --- a/desktop/src/features/channels/ui/BotActivityBar.tsx +++ b/desktop/src/features/channels/ui/BotActivityBar.tsx @@ -49,8 +49,27 @@ export function BotActivityComposerAction({ workingBotPubkeys.map((pubkey) => pubkey.toLowerCase()), ); - return agents.filter((agent) => workingSet.has(agent.pubkey.toLowerCase())); - }, [agents, workingBotPubkeys]); + const managed = agents.filter((agent) => + workingSet.has(agent.pubkey.toLowerCase()), + ); + if (managed.length > 0 || workingBotPubkeys.length === 0) { + return managed; + } + + // This install does not manage the working agents — e.g. a second desktop + // signed in with the same owner identity. The observer stream is scoped to + // the owner, not the managing install, so activity is still renderable; + // derive display entries from the relay profile lookup instead of the + // local managed-agent registry. + return workingBotPubkeys.map((pubkey) => { + const profile = profiles?.[pubkey.toLowerCase()]; + + return { + pubkey, + name: profile?.displayName || profile?.name || "Agent", + }; + }); + }, [agents, profiles, workingBotPubkeys]); const singleWorkingAgent = workingAgents.length === 1 ? (workingAgents[0] ?? null) : null; const transcript = useAgentTranscript(