Metadata-Version: 2.4
Name: approvalui
Version: 0.1.1
Summary: Generate a clickable HTML approval page for reviewing UI fixes inside terminal-based AI agents.
Project-URL: Homepage, https://github.com/floomhq/approvalui
Project-URL: Repository, https://github.com/floomhq/approvalui
Project-URL: Issues, https://github.com/floomhq/approvalui/issues
Project-URL: Changelog, https://github.com/floomhq/approvalui/blob/main/CHANGELOG.md
Author: Federico de Ponte
License: MIT License
        
        Copyright (c) 2026 Agent UI Approval contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agent,ai,approval,claude,codex,terminal,ui
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: mypy>=1.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Description-Content-Type: text/markdown

# ApprovalUI

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Python 3.10+](https://img.shields.io/badge/Python-3.10%2B-blue.svg)](pyproject.toml)
[![Tests](https://github.com/floomhq/approvalui/actions/workflows/ci.yml/badge.svg)](https://github.com/floomhq/approvalui/actions)
[![PyPI](https://img.shields.io/pypi/v/approvalui.svg)](https://pypi.org/project/approvalui/)

A tiny open-source loop for reviewing UI fixes inside terminal-based AI agents.

Terminal agents are great for code. They are bad at UI feedback, because UI feedback needs eyes, not paragraphs.

ApprovalUI renders a clickable HTML approval page from a simple JSON spec. You open it in a browser, tick approve or reject per item, generate a review, and paste it back into the agent.

Binary signal. Screenshot attached. No drift.

![ApprovalUI demo](docs/assets/approvalui-demo.gif)

---

## Why

When you iterate on frontend with a terminal agent, the feedback loop is verbal:

> “The divider looks weird — can you make it full height?”

The agent reads text, not pixels. You end up describing the same fix five times.

ApprovalUI short-circuits that loop. The agent writes a structured spec of the fixes, you review them visually, and the page gives you a structured text block to paste back.

Works with Claude Code, Codex, Kimi, or any terminal agent that can write JSON and open a browser.

---

## How it works

1. The agent writes a JSON spec describing each UI fix: title, issue number, screenshot, root cause.
2. `approvalui` turns the spec into a self-contained HTML page.
3. You open the page, review each item, tick **Approve** or **Reject**, add comments.
4. Click **Generate review** to get a structured text block you paste back into the agent.

---

## Install

```bash
pip install approvalui
```

Or clone and install in editable mode:

```bash
git clone https://github.com/floomhq/approvalui.git
cd approvalui
pip install -e ".[dev]"
```

---

## Quick start

```bash
approvalui example/fixes.json example/approval.html
open example/approval.html
```

Tick approve or reject, add a comment, and click **Generate review**.

---

## JSON spec format

```json
{
  "title": "Workeros — Fix Approval",
  "instructions": "Tick the ones you approve, click Generate review, paste it back to me.",
  "items": [
    {
      "id": 1218,
      "title": "Brain split-view divider now runs FULL HEIGHT to the bottom",
      "status": "pending",
      "root_cause": "wrapper used min-h-full so Collection height:100% could not resolve",
      "screenshot": "screenshot.svg"
    }
  ]
}
```

Only `id` and `title` are required. `root_cause`, `screenshot`, and `instructions` are optional.

---

## Generated review format

```text
[APPROVE] #1218 — Brain split-view divider now runs FULL HEIGHT to the bottom
[REJECT] #1219 — Sidebar scrolls horizontally on mobile — comment: still broken on iPhone SE
```

---

## Documentation

- [Docs site](https://floomhq.github.io/approvalui/)
- [Architecture](docs/architecture.md)
- [Advanced usage](docs/advanced.md)
- [Troubleshooting](docs/troubleshooting.md)
- [Claude Code example](docs/examples/claude.md)
- [Codex example](docs/examples/codex.md)
- [Kimi example](docs/examples/kimi.md)

---

## Files

- `src/approvalui/` — the Python package.
- `example/` — sample spec, screenshot placeholder, and generated page.
- `SKILL.md` — Floom skill instructions for agent integration.

---

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md).

---

## License

MIT. See [LICENSE](LICENSE).
