MD.OFFICE
FAL

2026-02-20

ifile-teapot-web-dynaforms

  • Implementation: Replaced generic ConfirmationService with showCannotSetDefaultFormulaModal dialog for specific "Cannot Set Default" conflict handling. (requested by user)
  • UI: Added hardcoded "Operation Blocked" dialog structure directly to right-panel-static.component.html, matching center-panel validation modal styles. Added appendTo="body" to ensure full-screen overlay.
  • Polish: Updated "Use Rules" tooltip to be clearer and more professional.

ifile-teapot-web-dynaforms (Session 2)

  • Feature: Implemented "Use Rules" toggle confirmation dialog in right-panel-static.component.ts.
  • UX: Added dynamic feedback in the confirmation message showing the name of the formula that will be restored. Constrained dialog width to 450px.
  • Logic Refinement: Implemented conditional dialog skip—if no library items or rules exist, data cleanup happens instantly without a prompt.
  • Refactoring: Extracted formula migration and data clearing logic into private helper methods (initializeRulesData, clearRulesData, hasRulesData, findDefaultFormula) for improved maintainability.
  • Bug Fix: Fixed a race condition/lifecycle issue where formula validation success messages were cleared prematurely. Updated selectedItem$ subscription to only reset the message when switching between different items (UUID check).

ifile-teapot-web-dynaforms (Session 3)

  • Bug Fix: Resolved a critical formula persistence bug in where the formula builder incorrectly retained values from the library editor when switching items or dropping new components.
  • Architecture: Identified and resolved a race condition between and subscriptions.
  • Self-Healing Logic: Implemented a "Tab Change Re-sync" mechanism that automatically synchronizes the shared with the selected item's legacy formula whenever the user returns to the 'Main' properties tab. This ensures visibility consistency across item clicks, new drops, validation redirects, and manual tab navigations.
  • State Cleanup: Fixed a UI bug where persisted when toggling "Use Rules". Added cleanup logic in to wipe validation feedback when switching modes.
  • Refactoring: Simplified the selection logic by removing complex UUID-based guards in favor of the more robust re-sync trigger.

ifile-teapot-web-dynaforms (Session 4) — Formula Builder Extraction

  • Architecture: Created implementation plan for extracting the formula builder from right-panel-static into a standalone reusable FormulaBuilderComponent.
  • Extraction (Phase 1): Created new formula-builder/ component with 3 files (component.ts, component.html, component.scss). Moved ~300 lines of formula logic out of right-panel-static.component.ts.
  • What moved: formulaInput, showFormulaSuggestions, filteredFormulaSuggestions, selectedFormulaSuggestionIndex, formulaMessage, isFormulaValid, operators, @ViewChild('formulaInputRef'), @ViewChildren('formulaSuggestionItem'), and methods: onFormulaInput(), onFormulaKeyDown(), onFormulaBlur(), selectSuggestion(), addToOperatorFormula(), toValueFormula(), toLabelFormula(), escapeRegex(), scrollSelectedSuggestionIntoView(), onValidateFormula().
  • Component API: @Input() availableFields, @Input() formulaValue (jsonKey format), @Output() formulaChange (emits jsonKey on valid), @Output() validationResult.
  • Template migration: Replaced both ng-container *ngTemplateOutlet="formulaBuilderTemplate" usages (main tab + formula editor tab) with <app-formula-builder> instances. Removed the #formulaBuilderTemplate ng-template.
  • Right-panel kept: Thin handlers onFormulaBuilderChange() (saves formula + clears error state) and onFormulaValidationResult(), plus all library/rule CRUD methods.