mirror of
https://github.com/block/buzz.git
synced 2026-11-25 10:42:26 +00:00
feat: render agent avatars as squircles (#7106)
## Summary - render every agent/AI identity as a 30% squircle across desktop and mobile while keeping human avatars circular - propagate agent identity through message, thread, profile, reaction, member, DM, search, workflow, project, huddle, forum, pulse, and agent-management surfaces - preserve squircle geometry for fallbacks, focus/status treatments, add-agent controls, and overlapping avatar outlines (`calc(30% + 2px)` for the outer background) ### Related issue None found. This change was requested and visually reviewed in the originating Buzz thread. ### Testing - `just desktop-test` — 5,799 passed - `just mobile-test` — 2,008 passed - pre-push gates passed at `0d59d77b120dcb90aac2f918e422c11c9fa5353b`: desktop check, TypeScript typecheck, desktop full test suite, mobile format/analyze and full test suite, Rust tests, Tauri checks, and differential file-size gate - deterministic desktop visual sweep covered channel messages/thread summaries; thread, subthread, and sub-subthread depths; reactions and reactor popovers; hover/full profiles; added-to-channel activity; channel members/settings; agent library/team overlaps; agent creation; mention autocomplete; and DM header/sidebar/settings ### UI evidence The complete labeled visual matrix is available in the originating Buzz review thread. GitHub-hosted copies will be added in a follow-up PR comment using the repository screenshot script. --------- Signed-off-by: Fizz <dae5f6af70b8695a8b83c8deae555f63be41630ec2b8cd493e41a439c9527dd8@buzz.block.builderlab.xyz> Co-authored-by: Fizz <dae5f6af70b8695a8b83c8deae555f63be41630ec2b8cd493e41a439c9527dd8@buzz.block.builderlab.xyz>
This commit is contained in:
@@ -342,6 +342,7 @@ function AuthorOption({
|
||||
<UserAvatar
|
||||
avatarUrl={candidate.avatarUrl}
|
||||
displayName={label}
|
||||
shape={candidate.isAgent ? "squircle" : "circle"}
|
||||
size="md"
|
||||
/>
|
||||
<span className="min-w-0 max-w-full">
|
||||
|
||||
@@ -632,6 +632,7 @@ export const WorkflowFormBuilder = React.forwardRef<
|
||||
<WorkflowRichTriggerDescription
|
||||
avatarUrl={triggerPresentation.avatarUrl}
|
||||
description={compactTriggerDescription}
|
||||
isAgent={triggerPresentation.isAgent}
|
||||
label={triggerPresentation.label}
|
||||
loading={triggerPresentation.loading}
|
||||
/>
|
||||
|
||||
@@ -444,6 +444,7 @@ function MessageOption({
|
||||
<UserAvatar
|
||||
avatarUrl={profile?.avatarUrl ?? null}
|
||||
displayName={author}
|
||||
shape={profile?.isAgent === true ? "squircle" : "circle"}
|
||||
size="sm"
|
||||
/>
|
||||
) : null}
|
||||
|
||||
@@ -6,11 +6,13 @@ import { splitWorkflowAuthorDescription } from "./workflowTriggerDescription";
|
||||
export function WorkflowRichTriggerDescription({
|
||||
avatarUrl,
|
||||
description,
|
||||
isAgent,
|
||||
label,
|
||||
loading,
|
||||
}: {
|
||||
avatarUrl?: string | null;
|
||||
description: string;
|
||||
isAgent?: boolean;
|
||||
label?: string | null;
|
||||
loading?: boolean;
|
||||
}) {
|
||||
@@ -41,6 +43,7 @@ export function WorkflowRichTriggerDescription({
|
||||
className="h-4 w-4"
|
||||
displayName={label}
|
||||
fallbackDelayMs={0}
|
||||
shape={isAgent ? "squircle" : "circle"}
|
||||
size="xs"
|
||||
testId="workflow-trigger-author-avatar"
|
||||
/>
|
||||
|
||||
@@ -77,10 +77,12 @@ function ExclusionStrike() {
|
||||
function AuthorConditionSummary({
|
||||
avatarUrl,
|
||||
excluded,
|
||||
isAgent,
|
||||
label,
|
||||
}: {
|
||||
avatarUrl: string | null;
|
||||
excluded: boolean;
|
||||
isAgent?: boolean;
|
||||
label: string;
|
||||
}) {
|
||||
return (
|
||||
@@ -91,6 +93,7 @@ function AuthorConditionSummary({
|
||||
className="h-6 w-6"
|
||||
displayName={label}
|
||||
fallbackDelayMs={0}
|
||||
shape={isAgent ? "squircle" : "circle"}
|
||||
size="xs"
|
||||
/>
|
||||
{excluded ? <ExclusionStrike /> : null}
|
||||
@@ -326,6 +329,7 @@ export function WorkflowTriggerConditions({
|
||||
<AuthorConditionSummary
|
||||
avatarUrl={triggerPresentation.avatarUrl}
|
||||
excluded={condition.operator === "not_equals"}
|
||||
isAgent={triggerPresentation.isAgent}
|
||||
label={authorSummary}
|
||||
/>
|
||||
) : messageSummary ? (
|
||||
|
||||
@@ -10,6 +10,7 @@ const FULL_HEX_PUBKEY = /^[0-9a-f]{64}$/i;
|
||||
export type WorkflowAuthorPresentation = {
|
||||
avatarUrl: string | null;
|
||||
description: string;
|
||||
isAgent: boolean;
|
||||
label: string | null;
|
||||
loading: boolean;
|
||||
pubkey: string | null;
|
||||
@@ -50,6 +51,7 @@ export function useWorkflowAuthorPresentation(
|
||||
authorLabel: label ?? undefined,
|
||||
authorLoading: loading,
|
||||
}),
|
||||
isAgent: profile?.isAgent === true,
|
||||
label,
|
||||
loading,
|
||||
pubkey,
|
||||
|
||||
@@ -44,6 +44,7 @@ export function useWorkflowListAuthorPresentations(
|
||||
workflowId,
|
||||
{
|
||||
avatarUrl: profile?.avatarUrl ?? null,
|
||||
isAgent: profile?.isAgent === true,
|
||||
label: loading
|
||||
? null
|
||||
: resolveUserLabel({
|
||||
|
||||
Reference in New Issue
Block a user