mirror of
https://github.com/block/buzz.git
synced 2026-11-06 09:21:45 +00: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>
Buzz
Desktop chat shell with:
- Tauri + React + TypeScript + Vite
- Tailwind CSS
- shadcn/ui-ready shared components
- Biome (lint/format/check)
- Feature-driven frontend structure
Scripts
pnpm dev- run the web frontendpnpm tauri dev- run the desktop apppnpm build- typecheck and build frontendpnpm typecheck- TypeScript checkspnpm lint- Biome lintpnpm format- Biome format (write)pnpm check- Biome check
Structure
src/shared- reusable app-wide code (ui,lib,styles)src/features- feature modules (vertical slices)src/app- top-level app composition