From 145a7b7c4e1939718c41a300899ae813bd9c511b Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Thu, 12 Mar 2026 20:53:11 -0700 Subject: [PATCH] test(ui): fix agent identity fixture typing Regeneration-Prompt: | While preparing openclaw/openclaw#35474 against a moving origin/main, pnpm check started failing in ui/src/ui/views/agents-utils.test.ts because AgentIdentityResult now requires agentId and name in addition to avatar. Keep runtime code unchanged and update only the test fixture in the avatar-resolution case so it satisfies the full AgentIdentityResult shape. --- ui/src/ui/views/agents-utils.test.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ui/src/ui/views/agents-utils.test.ts b/ui/src/ui/views/agents-utils.test.ts index d5a814b0d0f..a9b30e549db 100644 --- a/ui/src/ui/views/agents-utils.test.ts +++ b/ui/src/ui/views/agents-utils.test.ts @@ -115,9 +115,14 @@ describe("agentLogoUrl", () => { describe("resolveAgentAvatarUrl", () => { it("prefers a runtime avatar URL over non-URL identity avatars", () => { expect( - resolveAgentAvatarUrl({ identity: { avatar: "A", avatarUrl: "/avatar/main" } }, { - avatar: "A", - } as { avatar: string }), + resolveAgentAvatarUrl( + { identity: { avatar: "A", avatarUrl: "/avatar/main" } }, + { + agentId: "main", + avatar: "A", + name: "Main", + }, + ), ).toBe("/avatar/main"); });