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 handlingeq,neq,in,notIn,lt,gt,lte,gte,empty, andnotEmptyoperator 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()andwireUp()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-evaluatorutility 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 (controllerIndexandvisibilityMap), 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 ofbuildForm(). - Added:
dependency-evaluator.util.jest.spec.tsfor unit assertions against base numeric and string operators.