mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Adds the agent-usage UI feature on top of the merged NIP-AM backend. - `desktop/src/features/agent-usage/`: daily bars chart, 7/30-day range tabs, focused agent view with caveats, hooks, and lib utilities. All state is driven by the `get_agent_usage_series` Tauri command. - Profile panel: usage ingress row + focused view wired into agent profiles; gated on owner-scoped visibility (`viewerIsOwner && isBot`). - `AgentsView`: agent-usage overview section. - `AgentsScreen`/`ProfilePanelContext`: usage navigation state. - `e2eBridge.ts` + `tests/helpers/bridge.ts`: `get_agent_usage_series` mock handler + fixture types, including the M2 cache fields (`cacheReadTokens`, `cacheWriteTokens`, `freshInputTokens`) the wire type carries. The UI absorbs but does not display these fields. - `tests/e2e/agent-usage.spec.ts` + `agent-usage-screenshots.spec.ts`: Playwright coverage for loading, empty state, bars, range switching, error/retry, focused view, caveats, and cache invalidation. - `desktop/playwright.config.ts`: agent-usage specs added to suite. - `desktop/package.json`: recharts dependency. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>