Frontmatter
| id | 8569 |
| title | bug: Neo.setupClass fails to unwrap non-reactive config descriptors |
| state | Closed |
| labels | core |
| assignees | tobiu |
| createdAt | Jan 12, 2026, 2:00 AM |
| updatedAt | Jan 12, 2026, 2:08 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8569 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 12, 2026, 2:08 AM |
bug: Neo.setupClass fails to unwrap non-reactive config descriptors

tobiu
Jan 12, 2026, 2:07 AM
Input from Gemini 3 Pro:
✦ I have fixed the issue where
Neo.setupClassfailed to unwrap non-reactive config descriptors in the staticconfigobject.Fix Details:
- Modified
src/Neo.mjsto assign the unwrappedvaluetocfg[key]when a descriptor is processed for a non-reactive config.- This ensures that
staticConfig(used as the default inmergeConfig) contains the correct value structure, not the raw descriptor.Verification:
- Created new unit tests in
test/playwright/unit/container/ItemsMerging.spec.mjs.- Verified object-based items conversion.
- Verified deep merging of proxy configs (
merge: 'deep').- Verified correct merging of nested, descriptor-based non-reactive configs in child components (the core bug).
- Verified
Neo.mergeConfigisolation logic.All tests passed. This unblocks the object-based container refactoring.
tobiu assigned to @tobiu on Jan 12, 2026, 2:07 AM
tobiu cross-referenced by #8568 on Jan 12, 2026, 2:08 AM
tobiu closed this issue on Jan 12, 2026, 2:08 AM
Neo.setupClassfails to unwrap non-reactive config descriptors in the staticconfigobject.Problem: When a class defines a non-reactive config using a descriptor (e.g., to specify
merge: 'deep'),Neo.setupClasscorrectly identifies the descriptor and applies the unwrapped value to the class prototype. However, it fails to update the static config object (cfg) with the unwrapped value.Consequence: The static
configobject retains the full descriptor object (wrapped). When this class is instantiated,initConfigcallsmergeConfig.mergeConfigusesstaticConfigas the default value. It attempts to merge the wrapped descriptor with the instance's config. This results in a corrupted config object on the instance, where the merged value contains[isDescriptor]: trueandvalue: ...properties, instead of the intended merged structure.Reproduction: See failed test in
test/playwright/unit/container/ItemsMerging.spec.mjs.Proposed Fix: In
src/Neo.mjs, insidesetupClass, ensure thatcfg[key]is updated with the unwrappedvaluewhen a descriptor is processed for a non-reactive config.