Files
buzz/desktop
DuncanandWill Pfleger 12b517dfcd fix(agents): wire observed-state settlement, team D-field read-only, coordinator tests
Address all pass-1 CHANGES_REQUIRED findings from Thufir's review:

CRITICAL-1+2: AgentEditDialog now delegates instance contexts entirely to
AgentInstanceEditDialog (all I/L fields, correct testid). Definition-only
contexts use AgentDefinitionDialog + Artifact 3 coordinator. Removed the
type-cast hack (onUpdated?.(undefined as unknown as ManagedAgent)); the
definition-only path correctly does not call onUpdated.

IMPORTANT-3: AgentDefinitionDialog gains definitionReadOnly prop — when set,
all D-fields render disabled and a 'Managed by team' notice is shown; canSubmit
is gated; coordinator also guards against a misconfigured bypass. isDefinitionReadOnly
in agentFormModel.ts checks sourceTeam at the diff layer too.

IMPORTANT-4: Coordinator now settles from observed state on BOTH success and
error paths (not just error). The old 'no firstError → success' branch is gone;
the result is derived entirely from re-fetched observed store comparison.
Absent entity after refetch = not persisted. Per-policy failure tracking:
each policy tracked individually; unattempted policies also reported failed.

IMPORTANT-5: Publish success toast uses personaSaveNotice (not generic 'saved').
Publication status tracked through updatePersonaAndPublish return value.

Tests added:
- agentFormModel.test.mjs: 3 new tests covering team D-field unemittability
  (test_team_definition_emits_no_personaInput_even_when_fields_differ,
   test_team_definition_with_instance_emits_no_personaInput_but_allows_instance_diff,
   plus the env-clobber variants already present)
- agentSaveCoordinator.test.mjs (new file): 11 tests covering write ordering,
  local-save/publish failure, observed-state mismatch, and partial policy failure

Full desktop test suite: 4553/4553 passing. TypeScript clean. Biome clean.
File-size gate: AgentDefinitionDialog.tsx 1041 lines (limit 1041).

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-08-08 12:52:12 -04:00
..
2026-08-03 21:51:17 -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