Files
DuncanandWill Pfleger 3d723a7954 feat(desktop): NIP-AM agent-usage UI — bars, range tabs, focused view
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>
2026-08-12 17:31:57 -04:00
..
2026-08-10 14:33:23 -07:00