From 25f4611772fe00393443d13869c5db13a440c971 Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Sat, 27 Jun 2026 18:17:38 +0200 Subject: [PATCH] =?UTF-8?q?chore:=20delete=20dashboard=20handoff=20?= =?UTF-8?q?=E2=80=94=20Steps=201-3=20done,=20Step=204=20filed=20as=20task?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Steps 1-2 (schema + daemon plumbing): merged. Step 3 (dashboard HTML): built differently than spec, deployed. Step 4 (OSA setup): filed as create-task on the board — tracked, not rotting in a stale doc. --- dashboard-screenshot-HANDOFF.md | 90 --------------------------------- 1 file changed, 90 deletions(-) delete mode 100644 dashboard-screenshot-HANDOFF.md diff --git a/dashboard-screenshot-HANDOFF.md b/dashboard-screenshot-HANDOFF.md deleted file mode 100644 index 5f3db59..0000000 --- a/dashboard-screenshot-HANDOFF.md +++ /dev/null @@ -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=` 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/.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/.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. -- 2.45.3