Files
npub19zza5yyr075j4vvlg2drsh2xe0xy3dqxhfchlgtw8vryglrry3gq8q7tzkandBradley Axen 8db95bfc42 chore(desktop): generate kinds.ts constants from buzz-core kind.rs
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>
2026-07-07 20:47:28 -07:00
..