Files
buzz/desktop
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7andWill Pfleger 6cb0a4aac7 feat(desktop): scope-stable restore, shutdown, and runtime list
Convert restore.rs, shutdown.rs, and list_managed_agent_runtimes to use
a single captured workspace scope per logical operation rather than
re-resolving the active scope on every load/save call.

restore.rs:
- backfill_persona_snapshots captures scope at entry; uses
  load_managed_agents_at / save_managed_agents_at / load_personas_at
  throughout the single store-lock epoch.
- restore_managed_agents_on_launch captures scope at function entry and
  clones definitions_dir; all three phases (A: collect, B: spawn,
  C: write-back) use the same captured path, preventing a concurrent
  workspace switch from writing Phase C results into the wrong scope.
- persist_restore_error receives definitions_dir explicitly.
- Both functions return Err (with a clear message) when no scope is
  active, keeping the fail-closed invariant.

shutdown.rs:
- When no workspace scope is active (boot before apply_workspace, or
  after import_identity cleared the scope) skip load_managed_agents
  and drain only from the in-memory runtime map. Prevents the
  shutdown path from panicking with 'no active workspace scope'.
- record_idx: Option<usize> on AgentToStop distinguishes runtimes
  with a backing record from those drained without one.
- save_managed_agents only called when records were actually loaded.

runtime_commands.rs:
- list_managed_agent_runtimes captures scope at function entry and
  uses load_personas_at / load_global_agent_config_at /
  load_managed_agents_at / save_managed_agents_at so all reads in
  one poll see the same scope, even if a workspace switch races
  between the pre-lock and in-lock loads.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-08-02 23:23:32 -04:00
..
2026-06-11 15:06:24 +00: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