diff --git a/desktop/src/features/profile/ui/UserProfilePanel.tsx b/desktop/src/features/profile/ui/UserProfilePanel.tsx index 9eaadf07b..97b5ea865 100644 --- a/desktop/src/features/profile/ui/UserProfilePanel.tsx +++ b/desktop/src/features/profile/ui/UserProfilePanel.tsx @@ -649,22 +649,25 @@ export function UserProfilePanel({ onClose(); onOpenAgentSession?.(effectivePubkey); }, [effectivePubkey, onClose, onOpenAgentSession]); - const handleOpenChannel = React.useCallback( (channelId: string) => { void goChannel(channelId); }, [goChannel], ); - const displayName = resolveProfileDisplayName({ persona: resolvedPersona, profile, pubkey: effectivePubkey, }); + const ownerProfile = ownerPubkey + ? ownerProfileQuery.data + : isOwner === true + ? currentProfileQuery.data + : undefined; const ownerHandle = resolveOwnerHandle( - ownerPubkey ? ownerProfileQuery.data : currentProfileQuery.data, - ownerPubkey ?? currentPubkey, + ownerProfile, + ownerPubkey ?? (isOwner === true ? currentPubkey : undefined), ); const ownerDisplayName = ownerHandle ? isCurrentUserOwner || (!ownerPubkey && isOwner === true) @@ -715,7 +718,6 @@ export function UserProfilePanel({ onBack={() => setView("summary")} /> ); - const headerActions = ( ); - const profileBody = (
{ +test("personaManagedAgentUpdate leaves runtime inheritance when persona runtime is cleared", () => { assert.deepEqual( personaManagedAgentUpdate( agent({ @@ -206,9 +206,6 @@ test("personaManagedAgentUpdate resets runtime fields when persona runtime is cl name: "Fizz Prime", systemPrompt: "New prompt", model: "new-model", - agentCommand: "goose", - agentArgs: [], - mcpCommand: "", }, ); }); diff --git a/desktop/src/features/profile/ui/UserProfilePanelUtils.ts b/desktop/src/features/profile/ui/UserProfilePanelUtils.ts index d2b71a048..c4d36d490 100644 --- a/desktop/src/features/profile/ui/UserProfilePanelUtils.ts +++ b/desktop/src/features/profile/ui/UserProfilePanelUtils.ts @@ -296,7 +296,7 @@ function resolvePersonaManagedAgentRuntime( runtimes: readonly AcpRuntimeCatalogEntry[] | undefined, ) { if (!runtimes?.length) return undefined; - if (!runtimeId) return runtimes[0]; + if (!runtimeId) return undefined; return runtimes.find((candidate) => candidate.id === runtimeId); }