chore: delete dashboard handoff — Steps 1-3 done, Step 4 filed as task #236

Merged
clawdie merged 1 commit from chore/delete-dashboard-handoff into main 2026-06-27 18:19:48 +02:00

View file

@ -1,90 +0,0 @@
# Dashboard Screenshot Proof — Agent Handoff
**Status:** Hermes done (Steps 1-2). Claude: Step 3. Codex: Step 4.
## What Hermes Built (Steps 1-2 — done, branch `feat/dashboard-screenshot-proof`)
- **Schema:** `task_costs.screenshot_uuid TEXT` column + `ALTER TABLE IF NOT EXISTS` migration
- **Daemon:** `push_cost_to_mother()` reads `COLIBRI_TASK_SCREENSHOT_UUID` env var, attaches it to the SSH payload
- **SSH wrapper:** `report-task-cost` INSERT includes `screenshot_uuid` via `NULLIF`
Flow: agent harness sets `COLIBRI_TASK_SCREENSHOT_UUID=<uuid>` before spawning colibri. Daemon heartbeat picks it up when task completes, pushes to mother. Mother stores the UUID alongside cost row.
## Step 3 — Dashboard HTML (Claude)
Build a single-page dashboard at a webroot path (TBD with Sam — e.g. `https://osa.taile682b7.ts.net/dashboard/`).
### Data source
Query `task_costs` via a JSON endpoint or a static dump:
```json
[
{
"id": 1,
"node_hostname": "debby",
"task_id": "abc-123",
"provider": "deepseek",
"model": "deepseek-chat",
"input_tokens": 45230,
"output_tokens": 2847,
"cache_read_tokens": 12100,
"cost_usd": 0.0042,
"success": true,
"finished_at": "2026-06-27T13:42:00Z",
"screenshot_uuid": "a1b2c3d4e5f6"
}
]
```
Proposed JSON source: a small CGI script (`query.cgi`) that runs `psql -d mother_hive -tA -c "SELECT json_agg(row_to_json(...)) FROM task_costs LEFT JOIN hive_nodes ON ... ORDER BY finished_at DESC LIMIT 200"`. Or a cron-dumped `dashboard.json` (simpler, no CGI). Your call.
### UI (terminal-printable mockup above)
- **Node rows** grouping cost cards by `node_hostname`
- **Cost cards** with: cache-hit bar (green = cache fraction of total tokens), provider badge, cost, ▸ marker if `screenshot_uuid` is non-null
- **Lightbox** on ▸ click: opens `screenshots/<uuid>.png` (reuse tmux-screenshot's lightbox pattern from its index.html)
- **Filters:** node dropdown, date range, provider, success/fail checkbox
- **Zero dependencies beyond vanilla JS + CSS** (this is FreeBSD, not a Node host)
### Screenshot storage
Screenshots live at a web-accessible path. tmux-screenshot.py already outputs to a content-addressed directory. The dashboard just needs a URL pattern like `screenshots/<uuid>.png`.
### Constraints
- No Node.js, no npm build step — plain HTML/CSS/JS
- Must work from a static directory served by nginx or thttpd on FreeBSD
- Reuse existing tmux-screenshot gallery patterns where possible (lightbox, date filter, grid)
## Step 4 — OSA-Side Setup (Codex)
On osa (FreeBSD), as clawdie user:
1. **Run schema migration:**
```sh
psql -d mother_hive -f packaging/mother/mother_schema.sql
```
Verifies `screenshot_uuid` column exists.
2. **Daemon env:**
```sh
echo 'COLIBRI_MOTHER_HOST=osa.taile682b7.ts.net' >> /var/db/colibri/provider.env
```
3. **SSH key verification:**
```sh
# Confirm authorized_keys has command= restriction for colibri user
sudo cat ~colibri/.ssh/authorized_keys | grep command=
```
4. **Deploy dashboard HTML** (once Claude delivers it):
```sh
sudo mkdir -p /usr/local/www/dashboard
sudo cp ~clawdie/dashboard/index.html /usr/local/www/dashboard/
# Configure nginx location block to serve /dashboard/
```
5. **End-to-end test:**
```sh
echo '{"node_hostname":"debby","task_id":"test-001","provider":"deepseek","model":"deepseek-chat","input_tokens":100,"output_tokens":50,"cost_usd":0.002,"success":true,"screenshot_uuid":"test-uuid-123"}' | ssh colibri@osa.taile682b7.ts.net report-task-cost
psql -d mother_hive -c "SELECT * FROM task_costs ORDER BY id DESC LIMIT 1"
```
## Deletion
Delete this file when Steps 3 and 4 are complete and confirmed working end-to-end.