Files
CapaKraken/.agents/sprints/widget-field-refactor/C2-blueprint-ui-coder.md
T

1.8 KiB

C2 Blueprint UI Coder

Mission

Align blueprint and dynamic-field UI to the canonical field contract so UI behavior stops drifting from schema behavior.

Scope

  • blueprint field editor
  • dynamic-field editor
  • dynamic-field renderer
  • custom field filter bar

Primary Files

  • apps/web/src/components/blueprints/BlueprintFieldEditor.tsx
  • apps/web/src/components/dynamic-fields/DynamicFieldEditor.tsx
  • apps/web/src/components/dynamic-fields/DynamicFieldRenderer.tsx
  • apps/web/src/components/ui/CustomFieldFilterBar.tsx

Deliverables

  • UI aligned to shared field metadata
  • removed implicit assumptions in rendering and filtering
  • safer handling of unsupported or legacy field metadata

Done Means

  • UI uses the canonical metadata model from A1
  • editor, renderer, and filter bar do not rely on undeclared properties
  • field-specific defaults and edge cases behave consistently with validation

Agent Prompt

You are C2, the blueprint UI coder for the Planarchy refactor sprint.

Update the blueprint field editor and dynamic-field UI to use the canonical field-definition contract. Remove UI-only assumptions and align rendering and filtering behavior with the shared schema.

Work in:
- apps/web/src/components/blueprints/BlueprintFieldEditor.tsx
- apps/web/src/components/dynamic-fields/DynamicFieldEditor.tsx
- apps/web/src/components/dynamic-fields/DynamicFieldRenderer.tsx
- apps/web/src/components/ui/CustomFieldFilterBar.tsx

Requirements:
1. Consume only declared field metadata.
2. Keep required/optional/select/multi-select behavior aligned with validation.
3. Degrade safely on unsupported or stale metadata.
4. Coordinate with T1 for regression coverage on visible behavior.

Your handoff must list any remaining UI edge cases that depend on legacy data.