Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat: test distinct agent avatars with paired palette ground and larger face

rubenluetke10-beep2d09ed8b0a72
diff --git a/jarvis/ui/web/frontend/src/components/society/AgentSwatch.tsx b/jarvis/ui/web/frontend/src/components/society/AgentSwatch.tsx
index 0e41fe2dc1..02ab6b3a09 100644
--- a/jarvis/ui/web/frontend/src/components/society/AgentSwatch.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/AgentSwatch.tsx
@@ -2,8 +2,13 @@
* An agent's face wherever a 3D canvas would be wasteful — roster rows, card
* headers, chips. A rendered headshot of the agent's own figure when the
* look has a built base (faceCrop.ts); until it arrives, and for a row with
- * no figure, the flat stand-in: skin over the primary garment with the
- * accent as a ring, the same colours the figure wears.
+ * no figure, the flat stand-in below.
+ *
+ * Test revision (avatar readability): same size contract, distinct content.
+ * The ground pairs the figure's primary with its secondary so two agents
+ * never collapse to the same dark disc; the fallback draws a simple
+ * two-eye face from the figure's own skin/hair/eyes cells; a loaded crop
+ * is scaled up so the head fills the disc instead of hiding in it.
*/
import { useEffect, useState } from "react";
@@ -52,17 +57,23 @@ export function AgentSwatch({
}) {
const palette = resolvePalette(agent.figure);
const primary = agent.figure ? palette.primary : agent.palette.primary;
+ const secondary = agent.figure ? palette.secondary : agent.palette.secondary;
const accent = agent.figure ? palette.accent : agent.palette.accent;
const crop = useFaceCrop(agent.figure);
+ const eyeGap = Math.max(3, size * 0.11);
+ const eyeSize = Math.max(2.5, size * 0.085);
return (
<span
aria-hidden
- className={cn("relative inline-flex shrink-0 items-end justify-center overflow-hidden rounded-full", className)}
+ className={cn(
+ "relative inline-flex shrink-0 items-end justify-center overflow-hidden rounded-full border border-border",
+ className,
+ )}
style={{
width: size,
height: size,
- background: `linear-gradient(170deg, ${primary}, ${palette.primary_shade})`,
- boxShadow: `inset 0 0 0 2px ${accent}55`,
+ background: `linear-gradient(170deg, ${primary} 0%, ${secondary} 135%)`,
+ boxShadow: `inset 0 0 0 2px ${accent}66`,
}}
>
{crop ? (
@@ -71,19 +82,31 @@ export function AgentSwatch({
alt=""
draggable={false}
className="absolute inset-0 h-full w-full object-cover"
- style={{ imageRendering: size <= 40 ? "auto" : "pixelated" }}
+ style={{
+ imageRendering: size <= 40 ? "auto" : "pixelated",
+ transform: "scale(1.25)",
+ transformOrigin: "50% 32%",
+ }}
/>
) : (
<span
- className="rounded-full"
+ className="relative rounded-full"
style={{
- width: size * 0.42,
- height: size * 0.42,
- marginBottom: size * 0.12,
+ width: size * 0.64,
+ height: size * 0.64,
+ marginBottom: size * 0.08,
background: palette.skin,
- boxShadow: `0 ${-size * 0.12}px 0 0 ${palette.hair}`,
+ boxShadow: `0 ${-size * 0.16}px 0 0 ${palette.hair}, inset 0 0 0 ${Math.max(1, size * 0.03)}px rgba(0,0,0,0.08)`,
}}
- />
+ >
+ <span
+ className="absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2"
+ style={{ gap: eyeGap, marginTop: size * 0.04 }}
+ >
+ <span className="rounded-full" style={{ width: eyeSize, height: eyeSize * 1.25, background: palette.eyes }} />
+ <span className="rounded-full" style={{ width: eyeSize, height: eyeSize * 1.25, background: palette.eyes }} />
+ </span>
+ </span>
)}
</span>
);