affectUI › Screens › App screens
Agent / Step Inspector
One step of an agent run opened up – what came in, what the agent did with each item and what went out, with Ask why and a re-run for the item that needs a fix.
Part of affectUI Pro. Install: npx shadcn@latest add https://www.affectui.com/r/agent-step-inspector.json · Import from @/components/ui/agent-step-inspector
When to use
- Opening one step of a workflow or agent run to see why an item came out the way it did – for each item what came in, what the agent looked at, planned and wrote, and what went out
- Fixing a single item without running everything again: ask the agent why, take the fix it suggests and only that item runs again
- Comparing a step's output with the last run – what changed shows struck through and new, field by field
When not to use
- Every run of a team at once – use Agent / Executions
- Building the workflow itself – use AI Chat / Workflow Builder
- One run as a timeline of all its steps – use Run Detail
Usage
import { AgentStepInspectorScreen } from "@/components/ui/agent-step-inspector";
export default function Page() {
return (
<AgentStepInspectorScreen
defaultStep="write"
onRerun={(step, item, note) => runs.rerun({ step, item, note })}
onAsk={(step, item, question) => agent.ask({ step, item, question })}
onNavigate={(label) => router.push(routes[label])}
/>
);
}Props
| Name | Type | Default | Description |
|---|---|---|---|
defaultStep | string | "write" | The step open when the screen starts |
onRerun | (step: string, item: string | null, note?: string) => void | Called when a step runs again – item is null for every item; note is what the agent should do differently | |
onAsk | (step: string, item: string, question: string) => void | Called when a question is asked about an item – stream your agent's answer into your copy of the screen | |
loading | boolean | Gray lines in the steps, the list and the item | |
empty | boolean | The run hasn't happened yet – Run step plays it | |
workspace | string | "Northwind" | The workspace in the sidebar |
onNavigate | (label: string) => void | Called with the label of a sidebar item | |
className | string | Extra class on the root |
Keyboard
- ← / →: Along the run's steps
- Home / End: To the first and the last step, or the first and the last item
- ↑ / ↓: In the list: to the item above or below – it opens on the right
- Page Up / Page Down: In the list: a screenful up or down
- Enter / Space: Open the focused item – on phones focus moves to its back arrow, and back to the row on the way back
- ← / →: On the list's edge: make it wider or narrower (Shift for bigger steps), Home / End for the smallest and largest
Accessibility
- The steps are tabs and the items a listbox – each a single Tab stop; in a long list every row says where it is (12 of 1,284); Compare is a toggle button
- An empty field says Empty instead of leaving a gap; long names wrap in the item's title
- A step that needs a fix is named so; an item that needs a fix says why under its output; changed fields read out as Before and Now
- Answers, re-runs and their results are read out through a live region
- Names and text take their direction from their content (dir="auto"); names cut short in the list show in full on hover
- Rings show for the keyboard only – never on the question field, whose edge firms up instead
Responsive
- The sidebar starts folded; the list takes 280px, the picked item the rest – centered at 680px on wide screens
- Drag the list's edge like the sidebar's: 220–400px, the item keeps 380px; a double click goes back to the default
- Long lists (over 80 items) render only the rows in view – 1,284 items scroll and switch steps as fast as three; numbers keep one width, so names stay aligned
- Under 760px the list and the item take turns – picking an item opens it, the arrow beside its name goes back; the steps scroll sideways and keep the open one in view; small text buttons get a bigger touch area
- Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"
Requirements
- React 19
- @hugeicons/react
- @hugeicons/core-free-icons
- App Shell (installed with it)
Related
- Agent / Executions – Every run of a team of agents as one waterfall on a shared timeline, with a side panel to approve, retry or follow each run
- AI Chat / Workflow Builder – A chat that builds your automation on a canvas beside it – it tests each step with sample rows, fixes what breaks and asks before it touches real data
- Agent / Run Detail – One agent run, step by step – thinking, tool calls, sub-agents and failures as bars on one time axis, with time, cost and tokens on top and what went in and out of each step
- Agent Run / Handoffs – One agent run as swimlanes – a lane per person, agent and tool, every handoff as an arrow and a row, approvals you decide right on the page