Files
buzz/desktop
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7andWill Pfleger b9f0dd2319 fix(desktop): handle invalid retention rows and remove sentinel file
The migration wrote synthetic events with zero pubkey/sig when signing
keys were unavailable at startup. These rows break load_from_retention
because nostr::Event deserialization rejects the placeholder values.
Additionally, the sentinel file (migration_state.json) caused a
filesystem write on every launch regardless of whether migration ran.

Fix both criticals:

1. Migration now resolves keys from the identity.key file (which exists
   from prior launches), making the no-keys path unreachable in practice.
   When it is reached, stores content-only rows (empty raw_event,
   "unkeyed" placeholder pubkey) instead of invalid synthetic events.

2. load_from_retention branches on raw_event validity: tries nostr::Event
   parse first, falls back to parsing the content column directly as
   PersonaEventContent. Also queries for unkeyed migration rows.

3. Replaces the sentinel file with a DB-row-exists idempotency check,
   eliminating write amplification on every launch.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-06-10 10:42:01 -04:00
..
2026-06-09 20:52:37 -07:00
2026-06-09 20:52:37 -07:00
…

Sprout

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 frontend
  • pnpm tauri dev - run the desktop app
  • pnpm build - typecheck and build frontend
  • pnpm typecheck - TypeScript checks
  • pnpm lint - Biome lint
  • pnpm 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