diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index ebfd0df..2b1b018 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -272,7 +272,11 @@ textarea::placeholder { animation: progress-shimmer 1.8s linear infinite; } .animate-ticker { - animation: ticker-scroll 90s linear infinite; + animation: ticker-scroll 45s linear infinite; + } + .ticker-fade-mask { + -webkit-mask-image: linear-gradient(to right, transparent 0px, black 48px, black calc(100% - 48px), transparent 100%); + mask-image: linear-gradient(to right, transparent 0px, black 48px, black calc(100% - 48px), transparent 100%); } .animate-ticker:hover { animation-play-state: paused; diff --git a/frontend/src/components/organisms/AgentActivityTicker.tsx b/frontend/src/components/organisms/AgentActivityTicker.tsx index 21735d7..cc9e1a5 100644 --- a/frontend/src/components/organisms/AgentActivityTicker.tsx +++ b/frontend/src/components/organisms/AgentActivityTicker.tsx @@ -45,6 +45,21 @@ async function getAuthHeaders(): Promise> { const MAX_ITEMS = 40; const RECONNECT_DELAY_MS = 3_000; +type ProviderStyle = { bg: string; text: string; ring: string; shortLabel: string }; + +function getProviderStyle(source: string): ProviderStyle { + const s = source.toLowerCase(); + if (s.includes("claude")) + return { bg: "bg-violet-500/15", text: "text-violet-300", ring: "ring-violet-400/20", shortLabel: "CLAUDE" }; + if (s.includes("codex")) + return { bg: "bg-emerald-500/15", text: "text-emerald-300", ring: "ring-emerald-400/20", shortLabel: "CODEX" }; + if (s.includes("gpt") || s.includes("openai")) + return { bg: "bg-sky-500/15", text: "text-sky-300", ring: "ring-sky-400/20", shortLabel: "GPT" }; + if (s.includes("ollama")) + return { bg: "bg-orange-500/15", text: "text-orange-300", ring: "ring-orange-400/20", shortLabel: "OLLAMA" }; + return { bg: "bg-cyan-500/15", text: "text-cyan-300", ring: "ring-cyan-400/20", shortLabel: source.slice(0, 6).toUpperCase() }; +} + export function AgentActivityTicker() { const { isSignedIn } = useAuth(); const [items, setItems] = useState([]); @@ -132,26 +147,23 @@ export function AgentActivityTicker() { Live -
+
- {display.map((item, idx) => ( - - - {item.source} + {display.map((item, idx) => { + const ps = getProviderStyle(item.source); + return ( + + + {ps.shortLabel} + + {item.message} + + {fmtRelative(item.created_at)} + + - · - {item.message} - - {fmtRelative(item.created_at)} - - - │ - - - ))} + ); + })}