From d41e6cc8538f1007c7f0dc4a2d8d410584649c61 Mon Sep 17 00:00:00 2001 From: kenny lopez Date: Wed, 22 Jul 2026 17:10:14 -0700 Subject: [PATCH] Simplify team avatar stack styling --- .../features/agents/ui/TeamIdentityCard.tsx | 5 ++-- desktop/tests/e2e/agents.spec.ts | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/desktop/src/features/agents/ui/TeamIdentityCard.tsx b/desktop/src/features/agents/ui/TeamIdentityCard.tsx index b7d71c6a4..19596b76d 100644 --- a/desktop/src/features/agents/ui/TeamIdentityCard.tsx +++ b/desktop/src/features/agents/ui/TeamIdentityCard.tsx @@ -147,7 +147,7 @@ function TeamAvatarRow({ className={visiblePersonas.length > 0 ? "-ml-5" : ""} style={{ zIndex: stackItemCount }} > - + +{overflowCount} @@ -184,13 +184,14 @@ function TeamAvatarItem({ {avatarUrl ? ( ) : ( *") + .evaluateAll((elements) => + elements.map((element) => { + const styles = getComputedStyle(element); + const hasVisibleShadow = [ + ...styles.boxShadow.matchAll(/rgba?\(([^)]+)\)/g), + ].some((match) => { + if (match[0].startsWith("rgb(")) return true; + const channels = match[1]?.split(/[\s,/]+/).filter(Boolean) ?? []; + return Number(channels.at(-1)) > 0; + }); + return { + borderWidth: styles.borderTopWidth, + hasVisibleShadow, + }; + }), + ); + expect(avatarSurfaceStyles).toEqual([ + { borderWidth: "0px", hasVisibleShadow: false }, + { borderWidth: "0px", hasVisibleShadow: false }, + { borderWidth: "0px", hasVisibleShadow: false }, + ]); }); test("agent defaults stays in the header without an actions menu", async ({