mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
The activity-feed UI components claimed coverage "for grouping, presentation, and tool summaries" but the render-decision logic wiring those helpers into the rendered components had none. The node test harness only strips .ts (no JSX/DOM), so this extracts the pure decision logic out of the .tsx components into sibling .ts modules and tests it directly — matching the existing helper-test convention. - AgentSessionToolItem.tsx: extract isInlineImageData (the data:image/ passthrough guard), getToolDurationDisplay/formatDurationMs (duration fallback chain), and parseToolResultValue (JSON double-parse) into agentSessionUtils.ts. resolveImageSrc stays in the component (Tauri dep) but is now built on the testable isInlineImageData predicate. - ManagedAgentSessionPanel.tsx: extract scopeByChannel, deriveLatestSessionId, and resolveRawRailLayout (the raw-ACP toggle decision) into agentSessionPanelLayout.ts. - describeRawEvent (raw-view labels) gets direct coverage. New tests: agentSessionToolItemHelpers.test.mjs, rawEventRail.test.mjs, agentSessionPanelLayout.test.mjs (32 cases). Total suite 766 -> 798. Also sweeps the two parked dead branches: - agentSessionTranscriptGrouping.ts: the isSetupLifecycle guard in the activity loop can never fire (setup items are already in `consumed` and filtered out of `activity`). - agentSessionToolSummary.ts: the `base === "shell"` ternary inside the DEVELOPER_TOOL_BASES branch is unreachable (shell returns earlier); simplified to return "dev_mcp". Gates: biome check, tsc, vite build, 798 unit tests all green.
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