Monitor: implement the #70 Penpot mockups into src/dashboard.html #122

Closed
opened 2026-04-20 10:21:45 +00:00 by claude-desktop · 0 comments
Collaborator

User story

As the operator running claude-hooks, I want the rendered monitor at / (served from src/dashboard.html) to match the Penpot mockups produced by #70 so the pain points that ticket enumerated — scroll-of-doom event stream, invisible cost/duration, queue/running/history mixed, no per-agent filter, read-only storage card — get actually fixed in the UI, not only in mockups.

#70 is closed (designs accepted). This ticket is the implementation follow-up it explicitly blocked.

Acceptance criteria

Pages / layout

  • Populated state — task list shows queued / running (pulse dot) / completed-with-PR / failed (retry affordance) / cancelled variants as per the designed Task row component.
  • Queue focus — visible separation between "what's running now" and "what's queued behind it". A collapsed-sidebar mode or a tabbed sidebar with Running / Queued / History tabs, matching the designer's choice.
  • Empty state — fresh service with no tasks renders a first-run helper card with links to docs + /health.
  • Event stream (long) — the designer's pick for the scroll-of-doom problem is implemented (collapsed tool-call blocks by default, turns summary at top, and/or timeline strip). Follow the mockup verbatim unless the mockup is physically unrealizable in HTML/CSS — in which case document the deviation in the PR.
  • Cost / usage card — spend-per-agent and spend-per-day derived client-side from /history[].cost_usd. No new backend endpoint required; if aggregation becomes expensive at scale, a follow-up can lift it server-side.
  • Disconnect state — SSE drop shows last-known-as-of timestamp + a retry button + a pointer to journalctl.

Components

  • Task row — state variants (idle / running / queued / failed / completed-with-PR / cancelled) with agent colour chip, repo·#issue, elapsed time, $cost.
  • Event block — collapse affordance, per-type styling (assistant, tool_call with per-tool icon, tool_summary, result, error, progress).
  • Agent filter chip-strip — toggles which agents' tasks render in the sidebar.
  • Storage bar — three stacked bars (cache-clones, worktrees, sessions) with warning thresholds; clicking reveals per-agent breakdown and a "sweep now" button (backed by a new POST /sweep endpoint — add it if missing).

Interaction behaviors

  • Auto-scroll vs. user scroll-lock in the event stream — if the user scrolls up, stop auto-scrolling; a "jump to live" button reappears. Resume auto-scroll when the user returns to the bottom.
  • Cancel flow — button location per mockup, confirm modal, post-cancel row state visible.
  • Re-dispatch — after a failed task, a one-click "re-dispatch" affordance that unassigns + reassigns the issue (same mechanism the operator uses today manually).

Design system

  • Colour tokens, type scale, spacing lifted verbatim from design/tokens.json (Tokyo Night). No new palette values introduced.
  • CSS is inline in src/dashboard.html per existing convention (single-file dashboard).

Tests

  • src/dashboard-smoke.test.ts (the structural HTML checks we already have) grows tests for every new component presence: task-row variants, event-block variants, agent-filter chip-strip, storage bar.
  • If happy-dom is present (from #117), add at least one behavioral test for: auto-scroll lock, agent filter toggling, event-block collapse.

Out of scope

  • New backend endpoints beyond POST /sweep — everything else in the mockups is derivable from existing routes. If the implementer finds a specific screen that genuinely needs new data, flag it as an "asks from backend" in the PR body and skip that screen with a TODO — do not bloat the backend mid-implementation.
  • Mobile layout / light theme — desktop + dark only, per #70's scope.
  • Worker process model changes — this is a pure UI ticket on top of existing data surfaces.

References

  • Parent design ticket: #70 (closed, 3 design rounds, accepted).
  • Penpot file with the mockups: claude-hooks — dashboard (team peon-manager, file-id 689d7fa4-f94b-81d4-8007-e39c5c82f66c). Designer's handoff comments on #70 have the deep-links.
  • Current dashboard: src/dashboard.html.
  • HTTP surface: src/main.ts routes (/health, /queue, /history, /storage, /events, /cancel).
  • Token source: design/tokens.json.

Dependencies

  • Blocked by: nothing.
  • Blocks: nothing.
  • Branch off: main.
## User story As the **operator** running claude-hooks, I want the rendered monitor at `/` (served from `src/dashboard.html`) to match the Penpot mockups produced by #70 so the pain points that ticket enumerated — scroll-of-doom event stream, invisible cost/duration, queue/running/history mixed, no per-agent filter, read-only storage card — get actually fixed in the UI, not only in mockups. #70 is closed (designs accepted). This ticket is the implementation follow-up it explicitly blocked. ## Acceptance criteria ### Pages / layout - [ ] **Populated state** — task list shows queued / running (pulse dot) / completed-with-PR / failed (retry affordance) / cancelled variants as per the designed `Task row` component. - [ ] **Queue focus** — visible separation between "what's running now" and "what's queued behind it". A collapsed-sidebar mode or a tabbed sidebar with Running / Queued / History tabs, matching the designer's choice. - [ ] **Empty state** — fresh service with no tasks renders a first-run helper card with links to docs + `/health`. - [ ] **Event stream (long)** — the designer's pick for the scroll-of-doom problem is implemented (collapsed tool-call blocks by default, turns summary at top, and/or timeline strip). Follow the mockup verbatim unless the mockup is physically unrealizable in HTML/CSS — in which case document the deviation in the PR. - [ ] **Cost / usage card** — spend-per-agent and spend-per-day derived client-side from `/history[].cost_usd`. No new backend endpoint required; if aggregation becomes expensive at scale, a follow-up can lift it server-side. - [ ] **Disconnect state** — SSE drop shows last-known-as-of timestamp + a retry button + a pointer to `journalctl`. ### Components - [ ] **Task row** — state variants (idle / running / queued / failed / completed-with-PR / cancelled) with agent colour chip, repo·#issue, elapsed time, $cost. - [ ] **Event block** — collapse affordance, per-type styling (`assistant`, `tool_call` with per-tool icon, `tool_summary`, `result`, `error`, `progress`). - [ ] **Agent filter chip-strip** — toggles which agents' tasks render in the sidebar. - [ ] **Storage bar** — three stacked bars (cache-clones, worktrees, sessions) with warning thresholds; clicking reveals per-agent breakdown and a "sweep now" button (backed by a new `POST /sweep` endpoint — add it if missing). ### Interaction behaviors - [ ] **Auto-scroll vs. user scroll-lock** in the event stream — if the user scrolls up, stop auto-scrolling; a "jump to live" button reappears. Resume auto-scroll when the user returns to the bottom. - [ ] **Cancel flow** — button location per mockup, confirm modal, post-cancel row state visible. - [ ] **Re-dispatch** — after a failed task, a one-click "re-dispatch" affordance that unassigns + reassigns the issue (same mechanism the operator uses today manually). ### Design system - [ ] Colour tokens, type scale, spacing lifted verbatim from `design/tokens.json` (Tokyo Night). No new palette values introduced. - [ ] CSS is inline in `src/dashboard.html` per existing convention (single-file dashboard). ### Tests - [ ] `src/dashboard-smoke.test.ts` (the structural HTML checks we already have) grows tests for every new component presence: task-row variants, event-block variants, agent-filter chip-strip, storage bar. - [ ] If happy-dom is present (from #117), add at least one behavioral test for: auto-scroll lock, agent filter toggling, event-block collapse. ## Out of scope - **New backend endpoints beyond `POST /sweep`** — everything else in the mockups is derivable from existing routes. If the implementer finds a specific screen that genuinely needs new data, flag it as an "asks from backend" in the PR body and skip that screen with a TODO — do not bloat the backend mid-implementation. - **Mobile layout / light theme** — desktop + dark only, per #70's scope. - **Worker process model changes** — this is a pure UI ticket on top of existing data surfaces. ## References - Parent design ticket: #70 (closed, 3 design rounds, accepted). - Penpot file with the mockups: `claude-hooks — dashboard` (team `peon-manager`, file-id `689d7fa4-f94b-81d4-8007-e39c5c82f66c`). Designer's handoff comments on #70 have the deep-links. - Current dashboard: `src/dashboard.html`. - HTTP surface: `src/main.ts` routes (`/health`, `/queue`, `/history`, `/storage`, `/events`, `/cancel`). - Token source: `design/tokens.json`. ## Dependencies - **Blocked by:** nothing. - **Blocks:** nothing. - **Branch off:** `main`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks#122
No description provided.