mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
The desktop kind registry was a hand-maintained mirror of crates/buzz-core/src/kind.rs: 55 constants vs 121 upstream, no drift check, and 10 names that diverged from their canonical buzz-core spelling. Silent drift here means the client simply doesn't recognize an event kind — no error, just missing behavior (launch-readiness review, cross-cutting finding #1). This makes buzz-core the single source of truth for kind numbers: - desktop/scripts/generate-kinds.mjs parses kind.rs (read-only input) and emits kinds.generated.ts — byte-stable output, source order preserved, first doc-comment line carried over, do-not-edit header. - kinds.ts re-exports the full generated registry, keeps the 10 legacy desktop-local names as aliases of the canonical constants (values can no longer drift), and retains the desktop-specific derived kind sets unchanged. - pnpm check now runs generate-kinds.mjs --check, which fails CI on any drift between kinds.generated.ts and kind.rs — including manual edits to the generated file. No values changed: audit of all 55 pre-existing constants found zero name/value mismatches against kind.rs (10 naming aliases only). Behavior is unchanged; all existing imports keep working. Part of the launch-readiness complexity drip (clients queue #1). Next up: extend the same generation to mobile's EventKind. Co-authored-by: Bradley Axen <baxen@squareup.com> Signed-off-by: Bradley Axen <baxen@squareup.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