Files
buzz/desktop
DuncanandWill Pfleger 45d76bbb90 feat(desktop): Phase 1 R2 — merged agent edit surface (one form, one coordinator)
Build the merged edit surface the spec requires. One dialog (AgentEditMergedDialog)
handles all R1–R7 contexts via a single AgentFormModel, rendering D+I+L sections
together on one form and submitting every save through the Artifact 3 coordinator.

Key changes:

- AgentEditMergedDialog: replaces refetchStores+handleSubmit inline block with
  useAgentEditMergedSubmit hook; moves hook call before canSubmit so isSaving
  is in scope. For instance-with-definition context, renders both D-section
  (definition fields: name, prompt, runtime, model, provider) and I-section
  (instance fields: name, respond-to, harness, env overlay, parallelism) on one
  form. All saves go through emitAgentFormDiff → runAgentSaveCoordinator
  (observed-state settlement for D+I+L together).

- AgentEditMergedDialogDSection: removes !showInst guards from runtime, model,
  and provider fields. These are D-fields and must render for all definition
  contexts, including instance-with-definition (writes to the definition via
  coordinator). Removes the now-unused showInst prop.

- AgentEditMergedDialogInstanceSection: gates model, provider, and API key
  fields on !showDef. When a definition is present, model/provider are D-fields
  shown in the D-section; the I-section renders instance-specific fields only.

- agentFormModel.ts: adds instanceEnvVars field (row 8 contract: per-instance
  env overlay that does not wholesale-replace the definition env).

- agentDialogRouting.test.mjs: adds tests verifying hasDefinitionContext/
  hasInstanceContext predicates and that the D/I section components are exported
  as functions (structural guards for the merged surface).

AgentInstanceEditDialog has no production consumer on any R1–R7 route. The
mode='instance-edit' path in AgentDialog.tsx is unreachable from all production
edit surfaces (UserProfilePanel, AgentsView, AgentManagementDialogs all use
AgentEditDialog with ctx, not AgentDialog with mode='instance-edit').

File-size gate: AgentEditMergedDialog.tsx split count = 981 (< 1000 ceiling).
Full suite: 4562 tests, 0 failures.

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