Frontmatter
| id | 9418 |
| title | Create Data Normalizer Architecture (`Neo.data.normalizer.Base` & `Tree`) |
| state | Closed |
| labels | enhancementaiarchitecturecore |
| assignees | tobiu |
| createdAt | Mar 9, 2026, 4:45 PM |
| updatedAt | Mar 12, 2026, 3:45 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9418 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 9449 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 12, 2026, 3:45 PM |
Create Data Normalizer Architecture (Neo.data.normalizer.Base & Tree)
tobiu added parent issue #9404 on Mar 9, 2026, 4:45 PM
tobiu cross-referenced by #9420 on Mar 9, 2026, 4:46 PM
tobiu assigned to @tobiu on Mar 9, 2026, 4:46 PM
tobiu cross-referenced by #9449 on Mar 12, 2026, 3:20 PM
tobiu removed parent issue #9404 on Mar 12, 2026, 3:21 PM
tobiu added parent issue #9449 on Mar 12, 2026, 3:21 PM

tobiu
Mar 12, 2026, 3:45 PM
Input from Gemini 3.1 Pro:
✦ I have implemented the new
Neo.data.normalizer.BaseandNeo.data.normalizer.Treearchitecture as requested.Changes Made:
src/data/normalizer/Base.mjs: Created the base class that defines thenormalize(data)interface to handle structural reshaping and metadata extraction.src/data/normalizer/Tree.mjs: Created a specific implementation that traverses hierarchical JSON structures based on achildrenProperty, flattens the tree into a 1D array, and injectsparentIdandisLeafdata natively. Memory optimization is also applied by removing the raw nestedchildrenarrays since the TreeStore uses#childrenMap.src/data/Store.mjs: Added thenormalizer_reactive config.test/playwright/unit/data/normalizer/Tree.spec.mjs: Added a test suite that successfully tests single objects, basic flattening, structural injection (isLeaf,parentId), custom configurations (childrenProperty,keyProperty), and the extraction oftotalCount.Tests executed and all 331 unit tests pass flawlessly.
The code has been committed and pushed under
#9418.
tobiu closed this issue on Mar 12, 2026, 3:45 PM
Goal
Introduce a
Neo.data.normalizer.Baseclass and a concreteNeo.data.normalizer.Treeimplementation to decouple geometric data shaping from Stores and Parsers.Context
In our modernized data pipeline (
Connection -> Parser -> Normalizer -> Store), the Normalizer is responsible for taking native JavaScript objects (yielded by a Parser) and reshaping them for the Store. For the Tree Grid epic, external APIs often return nested hierarchical data, whileNeo.data.TreeStorerequires a flattened 1D array withparentIdrelationships.Acceptance Criteria
src/data/normalizer/Base.mjsdefining the standard interface for structural normalization and metadata extraction (liketotalCount).src/data/normalizer/Tree.mjs. This normalizer must take a nested JS object array (e.g.,childrenproperties), recursively flatten it into a 1D array, and injectparentIdlinks before passing the data to theTreeStore.Storeconfigs to accept anormalizerproperty.