mirror of
https://github.com/block/buzz.git
synced 2026-10-29 21:41:33 +00:00
The four sidebar sync engines (sections, sort, stars, mutes) shared nearly all implementation. The two whole-blob lanes (sections + sort) carried the same generation-CAS, outbox, watermark, retained-head confirmation, prior-gen fold, and bounded-retry machinery; the two merge lanes (stars + mutes) differed only in store type and the merge/subsumption functions. Extract: - wholeBlobSyncManager.ts: parameterized by WholeBlobLaneConfig<S> (kind, dTag, parse, serializePayload, writeOutbox, clearOutbox, storesEqual, isLocalNonEmpty). Preserves all pass-2/pass-3/r7 invariants. ChannelSectionSyncManager and ChannelSortSyncManager are now thin wrappers (~75 lines each) that pass lane config and expose their named API methods. - mergeLaneSyncManager.ts: parameterized by MergeLaneConfig<S> (kind, dTag, parse, serializePayload, mergeWithRemote, isSubsumedBy, storesEqual, observe, writeOutbox, clearOutbox, isLocalNonEmpty). ChannelStarSyncManager and ChannelMuteSyncManager are thin wrappers (~90 lines each). All 315 sidebar lib tests pass at this commit with no behavior change. Each lane wrapper still exposes its named public API (publishSections, publishSortPrefs, publishStars, publishMutes, fetchRemoteSections, subscribeToSections, etc.) so no hook changes are required. Co-authored-by: Will Pfleger <wpfleger96@gmail.com> Signed-off-by: Will Pfleger <wpfleger96@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