Files
buzz/desktop
Duncan 96ccaa847e fix(agents): rebind edit ctx to latest persona so drift guard fires
The concurrent-edit drift guard lives in the coordinator, but the
Agents-library route fed it the open-time snapshot: usePersonaActions
stored the clicked AgentPersona in personaToEdit and AgentsView passed
that stale object straight through as ctx.definition. A same-id
personasQuery refresh never rebound it, so both ctx.updatedAt and the
seed-time ref held the old revision, the guard compared equal, and a
one-field edit still clobbered a concurrent writer's untouched fields
via the full-replacement UpdatePersonaInput.

Re-derive the edited persona from live query data by id so ctx advances
with the store while the seed-time ref stays pinned — which is what
makes the guard trip. Deleted-while-editing falls back to the stored
snapshot (editing still drift-guards against last-known state; close and
delete stay reachable). The agent-origin review route
(AgentManagementDialogs) already derives currentPersona from live
personasQuery.data by useMemo, so it was never exposed.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-08-27 14:15:40 -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