ui.emmanuel-martinez.devEmmanuel Martinez

Approval card

An inline request for permission inside an agent conversation. It says exactly what will run, then gets out of the way.

Run a command on PC

Needs approval

Creates 7 artboards in Paper. Can be undone.
powershell -File .\batch.ps1 -CallsFile s2.jsonl

Focused, waiting for a decision. Press Enter to approve, Escape to deny.

Why inline, not a modal

An agent asks for approval in the middle of a thread. A modal would hide the context the decision depends on. The card sits in the flow, so the messages before it stay visible and the decision stays in the record afterwards.

What it has to say

Three things, in this order: the action in plain words, the consequence ("creates 7 artboards", "can be undone"), and the exact command. If any of the three is missing, the card isn't ready to ship.

States

  1. Waiting. Primary action focused; keyboard first.
  2. Running. The button shows progress and Deny is disabled. The layout doesn't shift.
  3. Decided. Approved, denied or expired. The card freezes with who decided and when, and the buttons are removed.

Implementation notes

The buttons are real <button> elements; Enter and Escape are scoped to the card that has focus, so two pending cards can't be approved by one keypress. The status uses text as well as colour. Motion is limited to the focus ring, at 120ms, and is removed under reduced motion.