Who it is forA product engineer building an AI assistant that takes actions on a user's behalf and needs a clear place for the user to approve, edit or discard them.
The problemAgents that send emails or ask for decisions need a review step, and a plain list of pending items is hard to scan and act on quickly.
The outcomeA review screen that lists open decisions with two quick answers, shows an agent-written email with send or discard, and shows agent replies in a thread.
What you need first
- A React 19 project, with or without TypeScript
- A setup that supports the shadcn CLI, such as Next.js or shadcn-configured projects with the @/* import alias
- Access to the affectui.com registry URLs
Steps
- Run
npx shadcn@latest add https://www.affectui.com/r/decision-inbox.jsonfor open decisions with two quick answers. - Run
npx shadcn@latest add https://www.affectui.com/r/email-draft.jsonfor agent-written email review. - Run
npx shadcn@latest add https://www.affectui.com/r/comment-thread.jsonfor agent replies that report what they did. - Pass your agent's pending items into each component and map the answer, send and discard events to your backend.
- Trigger one pending decision and one draft from a test agent run and confirm each answer updates your data.
Prompt for your agent
Install the decision-inbox, email-draft and comment-thread items from https://www.affectui.com/r/<name>.json into the <project-path> React 19 project, then build an approvals page in <page-file> that passes pending agent items into them. Expected output: one page that renders all three components with your data and event handlers. Verify that answering a decision and discarding a draft each call your handler once.
Caveat. The components display and collect decisions, but sending email or saving answers is your own backend code, which the README does not cover.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for flohoeller/affectui and "Build a review inbox where humans approve agent actions"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer