From d37eff6ddd08863cb192413536fffd7d50bbf08c Mon Sep 17 00:00:00 2001 From: yyyyaaa Date: Fri, 23 Oct 2026 09:36:39 +0700 Subject: [PATCH 1/4] feat(agents-builder): rail and ring status indicators - `statusIndicator: 'rail' | 'rings'` on AgentsBuilder (default `rail`) picks how the sidebar and run panel show an agent's state - Rail: each agent's stretch of its project rail lights up, seamless and centred on the line: a light travels down it while running, amber or blue breathes while waiting, red holds on failure, dashed when queued - Rail, collapsed: a slim capsule beside each agent's square, the same size for every state, no words, nothing once a run is done - Rings: a ring before each name whose arc is the run's progress; in the collapsed rail it circles the initials, with the tag word below - `AgentSummary.progress` (0 to 1) feeds the arc; the template fills it from plan steps while a run plays - Run panel status lines, header, and "Run complete" use the chosen indicator; in-flight names and initials keep their shimmer --- packages/ui/registry.json | 16 + .../agents-builder/agent-run-panel.tsx | 100 +++---- .../agents-builder/agent-status.tsx | 273 ++++++++++++++---- .../components/agents-builder/agent-view.tsx | 7 +- .../agents-builder/agents-builder-context.tsx | 5 +- .../agents-builder/agents-builder.tsx | 11 +- .../src/components/agents-builder/fixtures.ts | 8 +- .../ui/src/components/agents-builder/index.ts | 1 + .../src/components/agents-builder/sidebar.tsx | 130 +++++++-- .../ui/src/components/agents-builder/types.ts | 12 + .../agents-builder/use-agent-run.ts | 7 + .../ui/src/stories/AgentsBuilder.stories.tsx | 14 + packages/ui/src/styles/globals.css | 18 ++ packages/ui/src/theme.ts | 10 + 14 files changed, 464 insertions(+), 148 deletions(-) diff --git a/packages/ui/registry.json b/packages/ui/registry.json index 2d19508..8b5ea30 100644 --- a/packages/ui/registry.json +++ b/packages/ui/registry.json @@ -414,6 +414,22 @@ "opacity": "0.95" } }, + "@keyframes agent-rail-travel": { + "from": { + "top": "-1rem" + }, + "to": { + "top": "100%" + } + }, + "@keyframes agent-pill-breathe": { + "0%, 100%": { + "transform": "scaleY(0.55)" + }, + "50%": { + "transform": "scaleY(1)" + } + }, "@keyframes ai-fade-up": { "from": { "opacity": "0", diff --git a/packages/ui/src/components/agents-builder/agent-run-panel.tsx b/packages/ui/src/components/agents-builder/agent-run-panel.tsx index 35720d6..811cac9 100644 --- a/packages/ui/src/components/agents-builder/agent-run-panel.tsx +++ b/packages/ui/src/components/agents-builder/agent-run-panel.tsx @@ -1,6 +1,6 @@ 'use client'; -import { Bot, Check, ChevronRight, CircleAlert, Clock3, Hand, MessageCircleQuestion, RotateCcw, Sparkles, Square, Zap } from 'lucide-react'; +import { Bot, Check, ChevronRight, RotateCcw, Sparkles, Square, Zap } from 'lucide-react'; import * as React from 'react'; import { cn } from '../../lib/utils'; @@ -17,6 +17,7 @@ import { ThinkingStatus } from '../ai/thinking-status'; import { ToolTrace } from '../ai/tool-trace'; import { Button } from '../button'; import { Spinner } from '../spinner'; +import { type StatusSignal, StatusGlyph, StatusLabel } from './agent-status'; import { useAgentsBuilder } from './agents-builder-context'; import { Composer } from './composer'; import { IntegrationMark } from './integration-mark'; @@ -25,30 +26,28 @@ import { useLatest } from '../workspace-kit/use-latest'; import { RevealText } from './reveal-text'; import { usePlaybackClock } from './playback'; import type { AgentRunScript, RunApproval, RunFailure, RunQuery, RunQuestion, ToolStep } from './types'; -import { type AgentRunState, RUN_TIMING, type RunGroupPlay } from './use-agent-run'; +import { type AgentRunState, RUN_TIMING, type RunGroupPlay, runProgress } from './use-agent-run'; const GROUP_ICON = { subagents: , skills: } as const; const GROUP_NOUN = { subagents: ['agent', 'agents'], skills: ['skill', 'skills'] } as const; -// Status lines for the cards a run stops on. Static, so they are built once. -const APPROVAL_EYEBROW = ( - <> -