mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
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>
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 frontendpnpm tauri dev- run the desktop apppnpm build- typecheck and build frontendpnpm typecheck- TypeScript checkspnpm lint- Biome lintpnpm 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