LearnNewsExamplesServices
Frontmatter
id8569
titlebug: Neo.setupClass fails to unwrap non-reactive config descriptors
stateClosed
labels
core
assigneestobiu
createdAtJan 12, 2026, 2:00 AM
updatedAtJan 12, 2026, 2:08 AM
githubUrlhttps://github.com/neomjs/neo/issues/8569
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 12, 2026, 2:08 AM

bug: Neo.setupClass fails to unwrap non-reactive config descriptors

Closed v11.20.0 core
tobiu
tobiu commented on Jan 12, 2026, 2:00 AM

Neo.setupClass fails to unwrap non-reactive config descriptors in the static config object.

Problem: When a class defines a non-reactive config using a descriptor (e.g., to specify merge: 'deep'), Neo.setupClass correctly 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 config object retains the full descriptor object (wrapped). When this class is instantiated, initConfig calls mergeConfig. mergeConfig uses staticConfig as 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]: true and value: ... 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, inside setupClass, ensure that cfg[key] is updated with the unwrapped value when a descriptor is processed for a non-reactive config.

tobiu added the bug label on Jan 12, 2026, 2:00 AM
tobiu added the core label on Jan 12, 2026, 2:00 AM
tobiu referenced in commit 11189f1 - "fix: Neo.setupClass non-reactive config descriptor handling (#8569) on Jan 12, 2026, 2:07 AM
tobiu
tobiu Jan 12, 2026, 2:07 AM

Input from Gemini 3 Pro:

✦ I have fixed the issue where Neo.setupClass failed to unwrap non-reactive config descriptors in the static config object.

Fix Details:

  • Modified src/Neo.mjs to assign the unwrapped value to cfg[key] when a descriptor is processed for a non-reactive config.
  • This ensures that staticConfig (used as the default in mergeConfig) 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.mergeConfig isolation 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 removed the bug label on Jan 12, 2026, 2:08 AM
tobiu closed this issue on Jan 12, 2026, 2:08 AM