affectUI › Components › Agents
Agent Issue Stack
Issues your agents found or are working on, one card at a time – kind, pull request, priority, users touched and the agent on it, as a stack or a cycling strip.
Part of affectUI Pro. Install: npx shadcn@latest add https://www.affectui.com/r/agent-issue-stack.json · Import from @/components/ui/agent-issue-stack
When to use
- A small spot that shows what your agents are on right now – one issue at a time, going on by itself
- A dashboard corner, a sidebar or a landing page where a full list would be too much and a single card says enough
- Work of any kind side by side – fixes, features, upgrades, docs – each with its pull request or branch, priority and the agent on it
When not to use
- Going through every issue, sorting or filtering them – use Agent Inbox or a list
- Issues waiting for a person to approve or reject – use Approval Gates
- What an agent did step by step – use Agent Sequence or Trace Waterfall
Usage
import { AgentIssueStack, type AgentIssue } from "@/components/ui/agent-issue-stack";
const issues: AgentIssue[] = [
{
id: "auth",
ref: { kind: "pr", label: "#412" },
icon: <KeyIcon />, color: "#EE3E9E", time: "4 min ago",
title: "Fix sign-up after the auth key rotation",
text: "New accounts failed to create sessions once the signing key rotated. Triage found the cause and is testing the fix.",
priority: "high", users: 78,
owner: { id: "triage", name: "Triage", working: true },
},
{
id: "csv",
ref: { kind: "branch", label: "feat/csv-export" },
icon: <CardIcon />, color: "#F28A2E", time: "18 min ago",
title: "Add CSV export to the billing page",
priority: "medium", diff: { add: 214, del: 12 },
owner: { id: "coder", name: "Coder", color: "rgba(166, 81, 240, 0.85)", working: true },
},
];
export function Issues() {
return <AgentIssueStack issues={issues} label="Issues the agents found" />;
}Props
| Name | Type | Default | Description |
|---|---|---|---|
issues | AgentIssue[] | { id, title, text?, icon?, color?, ref?, time?, priority?, users?, diff?, owner? } – in the order they come up | |
variant | "stack" | "cycle" | Stack – the cards behind peek out like toasts; cycle – strips above and below the open card. Stack by default | |
autoPlay | boolean | Goes on to the next issue by itself – on by default; hover, focus, a hidden tab and reduced motion pause it | |
interval | number | How long each issue stays in front, in ms – 3200 by default, never under 1200 | |
label | string | The name screen readers give the carousel – "Issues" by default | |
onChange | (issue, index) => void | The issue in front changed – by itself or by the user | |
icon / color | ReactNode / string | A small glyph for the kind of work and the tint of its tile – the icon's own color works best | |
ref | { kind: "pr" | "merged" | "branch"; label: string } | Where the work lives, with its icon – shown next to the tile and on the strip | |
priority | "urgent" | "high" | "medium" | "low" | Signal bars – one, two or three lit; urgent lights all three in red-orange. Medium by default | |
users / diff | number / { add, del } | How many users it touches, or the size of the change – big numbers shorten to 12.4K | |
owner | { id, name, color?, working? } | The agent on it – its pixel mark comes from the id, in its color; working makes it twinkle and reads "Name is on it" | |
className | string | An extra class on the root |
Accessibility
- A carousel region with its label; each card is a slide that reads "2 of 6: Add CSV export to the billing page"
- One tab stop: the arrows go to the next and previous issue, Home and End to the first and last
- Focus or hover pauses it, so nothing moves away while someone reads; the new issue is announced only while it's paused
- The stack's buttons are labelled Previous issue and Next issue; a focus ring shows only for the keyboard
- Priority, users and the change size have text next to their icons and a title with the full wording
Responsive
- Up to 360px wide, narrower in a smaller container; the open card keeps its layout while it grows
- Long titles end in …, the text stays at two lines, a long branch name shortens before the time does
- In a narrow container (under 320px) the cycle's strips show only the tile and the title
- Fixed heights – cards don't jump between short and long issues
- Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"
Requirements
- React 19
Related
- Agent Inbox – All your background agent tasks in one calm list – live status tags, filter tabs, and rows that unfold to the last steps with Approve, Reject, Retry or Open
- Approval Gates – The approval requests of an agent run as a stack of cards – the one to decide now on top with the diff or arguments, approve, reject or change it, then the next rises
- Collaboration Stream – What agents actually say to each other – a quiet chat showing who each message is from and for, handoffs and questions for you tagged, files as chips and a composer with @
- Agent Sequence – One agent run as a sequence diagram – a lifeline for you, every agent and every tool, with calls solid, replies dashed and parallel or retried messages in frames