Skip to content

Open-source SEO, GEO, and marketing skills for AI agents.

feat(chat): colorful tool status — green checks, red X, shimmer loading

Yuting Zhongf8297b40d810
diff --git a/notfair/src/app/globals.css b/notfair/src/app/globals.css
index 1bdbfb5b..a0938012 100644
--- a/notfair/src/app/globals.css
+++ b/notfair/src/app/globals.css
@@ -203,6 +203,11 @@
100% { transform: translateX(260%); }
}
+@keyframes ns-text-shimmer {
+ 0% { background-position: 180% 0; }
+ 100% { background-position: -180% 0; }
+}
+
@keyframes heartbeat {
0%, 100% { transform: scale(0.92); opacity: 0.85; }
20% { transform: scale(1.18); opacity: 1; }
@@ -429,6 +434,32 @@
}
.ns-chip:hover { color: hsl(var(--notfair-ink-1)); }
.ns-chip:disabled { opacity: 0.5; cursor: not-allowed; }
+
+ /* Working-state text shimmer — the Claude/ChatGPT "thinking" sweep.
+ A light band travels across the label via background-clip: text.
+ Apply only while genuinely live; static text must never shimmer. */
+ .ns-shimmer-text {
+ background: linear-gradient(
+ 90deg,
+ hsl(var(--notfair-ink-4)) 0%,
+ hsl(var(--notfair-ink-4)) 35%,
+ hsl(var(--notfair-ink-1)) 50%,
+ hsl(var(--notfair-ink-4)) 65%,
+ hsl(var(--notfair-ink-4)) 100%
+ );
+ background-size: 220% 100%;
+ -webkit-background-clip: text;
+ background-clip: text;
+ color: transparent;
+ animation: ns-text-shimmer 1.8s linear infinite;
+ }
+ @media (prefers-reduced-motion: reduce) {
+ .ns-shimmer-text {
+ animation: none;
+ background: none;
+ color: hsl(var(--notfair-ink-2));
+ }
+ }
.ns-chip > svg { width: 14px; height: 14px; flex-shrink: 0; }
/* Progress pips — small numbered circles + hairlines. */
diff --git a/notfair/src/components/chat/messages.tsx b/notfair/src/components/chat/messages.tsx
index 53a68c71..ca433219 100644
--- a/notfair/src/components/chat/messages.tsx
+++ b/notfair/src/components/chat/messages.tsx
@@ -8,6 +8,7 @@ import {
Loader2,
MessageCircle,
Wrench,
+ XCircle,
} from "lucide-react";
import { Markdown } from "@/components/markdown";
@@ -126,12 +127,12 @@ export function ToolGroup({
const mcpCount = tools.filter((tool) =>
matchMcpServerKey(tool.name, mcpCatalog),
).length;
- const StatusIcon = isLive ? Loader2 : hasError ? AlertCircle : CheckCircle2;
+ const StatusIcon = isLive ? Loader2 : hasError ? XCircle : CheckCircle2;
const statusClass = isLive
- ? "text-muted-foreground motion-safe:animate-spin"
+ ? "text-[hsl(var(--notfair-accent))] motion-safe:animate-spin"
: hasError
? "text-destructive"
- : "text-muted-foreground/50";
+ : "text-emerald-500";
const summaryLabel =
tools.length === 1
? intent.verb
@@ -159,7 +160,14 @@ export function ToolGroup({
) : (
<HeadIcon className="size-3.5 shrink-0 text-muted-foreground" />
)}
- <span className="font-medium text-foreground/80">{summaryLabel}</span>
+ <span
+ className={cn(
+ "font-medium",
+ isLive ? "ns-shimmer-text" : "text-foreground/80",
+ )}
+ >
+ {summaryLabel}
+ </span>
{tools.length === 1 && intent.target && (
<span className="min-w-0 flex-1 truncate font-mono text-[10.5px] text-muted-foreground/80">
{intent.target}
@@ -199,13 +207,13 @@ function ToolRow({
const StatusIcon = entry.done
? entry.ok
? CheckCircle2
- : AlertCircle
+ : XCircle
: Loader2;
const statusClass = entry.done
? entry.ok
- ? "text-muted-foreground/50"
+ ? "text-emerald-500"
: "text-destructive"
- : "text-muted-foreground motion-safe:animate-spin";
+ : "text-[hsl(var(--notfair-accent))] motion-safe:animate-spin";
// Show the raw command/label only when it actually adds information —
// i.e. it's not redundant with the intent target the header already
// surfaces (path/url/etc.). Keeps simple tool rows tight while still
diff --git a/notfair/src/components/working-indicator.tsx b/notfair/src/components/working-indicator.tsx
index ca08baf1..6b715121 100644
--- a/notfair/src/components/working-indicator.tsx
+++ b/notfair/src/components/working-indicator.tsx
@@ -47,16 +47,23 @@ export function WorkingIndicator({
<div className="flex min-w-0 items-center gap-2 text-xs">
{ended ? (
<CheckCircle2
- className="size-3.5 shrink-0 text-muted-foreground"
+ className="size-3.5 shrink-0 text-emerald-500"
aria-hidden
/>
) : (
<Loader2
- className="size-3.5 shrink-0 animate-spin text-muted-foreground"
+ className="size-3.5 shrink-0 animate-spin text-[hsl(var(--notfair-accent))]"
aria-hidden
/>
)}
- <span className="font-medium text-foreground/90">{headline}</span>
+ <span
+ className={cn(
+ "font-medium",
+ ended ? "text-foreground/90" : "ns-shimmer-text",
+ )}
+ >
+ {headline}
+ </span>
<span className="text-muted-foreground/45">·</span>
<span className="truncate text-muted-foreground">
{agentDisplayName}