MD.OFFICE
FAL

2026-03-26

  • Fixed Formula Validation for Numeric Labels:
    • Identified a bug where identifiers starting with digits (e.g., 1Property) caused expr-eval parse failures in the backend validation API.
    • Updated DynaformService (generateUniqueJsonKey and generateUniqueJsonKeyWithContext) to automatically prepend an f prefix to any JSON key that starts with a number.
    • Added comprehensive unit tests in dynaform.service.jest.spec.ts to verify the fix across different label types.
    • Successfully ran Jest tests (18/18 tests passed).
  • Hardened Template Import & Autofix Flow:
    • Implemented a new validation rule FORMULA_UNSAFE_NUMERIC_START in TemplateSchemaValidatorService to explicitly block imports containing numeric JSON keys (moving from silent fixing to forced validation).
    • Integrated this blocking error into the CenterPanelComponent Autofix system (autoFixableJsonKeyCodes).
    • Implemented a symmetric ensureNonNumericPrefix utility in CenterPanelComponent used across both repairImportJsonKeys and buildUniqueImportJsonKey.
    • This ensures a "single-click" Autofix experience where both existing malformed keys and newly derived keys (from numeric labels) are sanitized in a single pass.
    • Documented the Error Accumulation Strategy in validation-flow-explainer.md: using independent if blocks instead of else if chains to allow surfacing multiple concurrent errors (Format + Duplicate) for better user feedback.
    • Updated docs/dynaforms-history.md with the final architectural decisions.