Files
buzz/desktop
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 27aa3e0a8c fix(desktop): order retained agent events by the relay's own comparator
The retention cache resolved an equal-`created_at` collision by skipping the
inbound event unconditionally, while the relay breaks that tie by lowest event
id. The two could therefore disagree about which same-second event is the head,
and every later disk-vs-head compare inherited the error.

Retained rows now carry the event id as a real column so the local compare can
match `replace_parameterized_event`. A pending row still wins its tie
regardless of id: it is durable local intent, arbitrated against a
writer-consistent head by the boot pass rather than dropped by a cache compare.

The id is re-derived from a parsed and verified event, never read from the
JSON's self-asserted `id` field, so a legacy row whose bytes do not verify
stays unresolved instead of receiving a key it could win a tie with.

`RetainedEvent::pending`/`::inbound` replace the hand-built literals at every
call site, which makes it structurally impossible for a row's ordering key to
describe different bytes than its own `raw_event`.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-08-01 14:09:31 -04:00
..
…

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 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