# REA Analysis Session Dashboard (Streamlit + Plotly)

## PURPOSE
The video's REA session produces a lot of scattered numbers: a target that was *refused*
because the full Loom app is **532 MB**, a fallback run against "Loom's own app code," a HUD
built from **35 window pages**, **55 unnamed IPC channels** traced, decompiled
pause/resume handlers, and a final workspace of **~1.5 GB**. This dashboard gathers those
figures into one screen so a creator (or a student) can *see* what a reverse-engineering
session actually consumed and produced — and whether the two bugs that mattered (dragging the
HUD, freeze/close issues) actually got fixed.

## WHY THIS MATTERS
It teaches that analysis output is data, and data needs a KPI view. The video's punchline is
that REA is not a magic wand: it is an iterative loop whose value shows up as *incremental*
wins. A dashboard makes those increments legible — channels resolved per pass, provider time
per tool, disk growth — instead of burying them in a terminal scrollback.

## HOW TO BUILD
1. `pip install streamlit plotly pandas`.
2. Build a small `pandas` frame of analysis runs with columns `tool`, `target`, `status`,
   `seconds`, `size_mb`, matching REA's tool names (`inspect`, `search`, `trace`, `compare`,
   `workflow`, `observe`, `capture`).
3. Lay out the page with `st.metric` cards: channels resolved (x/55), HUD pages (35), biggest
   refused target (532 MB), workspace footprint (1.5 GB).
4. Add a Plotly horizontal bar of provider time by tool, a Plotly donut of artifact categories,
   and a progress bar for channel resolution.
5. Add a small "issues fixed?" table with the two real outcomes from the video (HUD drag fixed,
   freeze/close fixed) and a checkbox to filter only failed runs.

```python
st.plotly_chart(px.bar(by_tool, x="seconds", y="tool", orientation="h",
                       title="Provider time by REA tool"), use_container_width=True)
```

## WHEN TO USE IN PRODUCTION
Use it in any long-running analysis or migration effort where stakeholders need a live status
view: capacity planning, agent-pipeline observability, and post-mortem reviews. Do **not** use
it as evidence tooling in a legal or forensic context — the video is clear that reverse
engineering is for personal experimentation, and a pretty chart is not a provenance chain.

## HOW IT HELPS STUDENTS
They learn Streamlit layout primitives, Plotly chart construction, and framing metrics around a
real workflow (tool time, disk budget, resolved-vs-total) — the same observability thinking
that production agent platforms require.

## STARTER CODE
See `starter/main.py` for the metrics row, the three Plotly figures, and a deterministic sample
dataset drawn from the video's numbers. Run with `streamlit run starter/main.py`.
