2026-04-05
Matrix Formula: Sequential Row Evaluation & Duplicate HTTP Fix
Fixed cascading formula rows (e.g. Row 5 referencing Row 3, which is itself a formula row), and eliminated duplicate HTTP calls in the evaluation pipeline.
Decisions & Solutions
- Sequential Processing: Modified parallel arrays to process sequentially using RxJS
from(formulaRows).pipe(concatMap(...))so preceding rows are fully resolved from network calls before calculating subsequent row results. - Row Index Integrity: Maintained full
config.rowsarray indices handling to properly bind@Row.Nindices securely across nested matrix logic. tap()vssubscribe()Side Effects: Fixed an issue causing duplicate HTTP firing by centralizing side-effects directly withintap()instead of multiple sub-listeners, relying solely onforkJoinas the subscription anchor.- Builder Updates: Removed builder-side restrictions preventing formula rows from being listed as references for other formula rows.
Matrix Formula Builder UI Refactor
Improved the UX/UI of the Matrix widget's configuration right-panel by encapsulating the Formula Builders into cleanly toggled accordions.
Decisions & Solutions
- Used standard
<p-accordion>markup to wrap row and column custom nested formula builders. - Configured local controllers (
expandedMatrixRowFormulaIndex) to auto-enforce collapse conditions (single open form). - Tied "tick" verification markers dynamically to successful evaluative save events allowing visual builder success indication.
Matrix Formula Validation Integration & UX
Ensured Matrix widgets correctly trigger and display "Formula not configured" validation errors across the builder UI and central save orchestrator.
Decisions & Solutions
- Orchestrator Search: Updated
BuilderValidationOrchestratorServiceto recursively detect missing sub-formulas specifically withintablestructures. - Real-time UX Sync: Hard-linked
.validateItemFormulacalls instantly to manual right-panel toggles providing immediate visual validation. - Auto-Expansion Expansion: Upgraded builder component to automatically expand corresponding nested
<p-accordion>sections instantaneously when creating a form/col.