MD.OFFICE
FAL

Daily Log - 2026-04-27

Dynaforms: Dependent Fields v3 (Phase 1 & 3)

Achievements

  • Dependency Type Contracts: Established a stable type schema (DependencyCondition, DependencyEffect, DependencyRule, FieldDependency) to support dependency-driven fields without altering runtime behavior for existing forms.
  • Runtime Skeleton: Implemented the base dependency engine wiring (dependency-engine.service.ts) alongside a pure condition evaluator utility (dependency-evaluator.util.ts) capable of handling eq, neq, in, notIn, lt, gt, lte, gte, empty, and notEmpty operator evaluations safely without applying mutations yet.
  • Form Build Lifecycle Hook: Wired the core renderer form build lifecycle to invoke the new dependency engine's tearDown() and wireUp() sequences properly, paving the way for targeted dependency execution in the upcoming phase.

Decisions

  • Strict Generic Schema: Kept condition and effect values generically typed (unknown / Record<string, unknown>) to ensure maximum operator and effect flexibility downstream.
  • Isolated Evaluator: Designed the pure dependency-evaluator utility to hold zero side effects, allowing focused test coverage strictly centered on algorithmic correctness.

Technical Details

  • Added: dependency-engine.service.ts -> Engine wrapper housing the compilation, indexing (controllerIndex and visibilityMap), subscriptions, and evaluation structure.
  • Added: dependency-evaluator.util.ts -> Operator condition evaluation utility.
  • Modified: form-engine.service.ts -> Enforced dependency injection of the new service and appended wiring logic at the end of buildForm().
  • Added: dependency-evaluator.util.jest.spec.ts for unit assertions against base numeric and string operators.