LearnNewsExamplesServices
Frontmatter
id7128
titleAdd State Provider Feedback Loop Test
stateClosed
labels
enhancement
assigneestobiu
createdAtJul 30, 2025, 11:57 AM
updatedAtJul 30, 2025, 11:59 AM
githubUrlhttps://github.com/neomjs/neo/issues/7128
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJul 30, 2025, 11:59 AM

Add State Provider Feedback Loop Test

Closed v10.2.0 enhancement
tobiu
tobiu commented on Jul 30, 2025, 11:57 AM

Description

This ticket is to formally add the new test file test/siesta/tests/state/FeedbackLoop.mjs to the repository and the test suite.

This test was created to verify and prevent a potential infinite recursion (feedback loop) when using Neo.state.Provider with form fields.

Key Scenarios Tested

The FeedbackLoop.mjs test file ensures the following:

  1. No Change Event on Programmatic Update: When a component's value is updated programmatically via a state provider binding, it correctly updates the component's config but does not fire a change event. This is critical to prevent controllers from reacting to their own state changes.
  2. Change Event on User-like Interaction: When a component's value is changed directly (simulating a user interaction), it does fire the change event as expected.
  3. Feedback Loop Prevention: It simulates a common controller pattern where a change event handler calls provider.setData(). The test verifies that this sequence does not trigger another change event, thus preventing an infinite loop.

Action Items

  1. Add the new file test/siesta/tests/state/FeedbackLoop.mjs to the project.
  2. Register the new test file in test/siesta/siesta.js to ensure it is run as part of the standard test suite. It should be added to the state group.
tobiu assigned to @tobiu on Jul 30, 2025, 11:57 AM
tobiu added the enhancement label on Jul 30, 2025, 11:57 AM
tobiu referenced in commit c6d1c70 - "Add State Provider Feedback Loop Test #7128" on Jul 30, 2025, 11:59 AM
tobiu closed this issue on Jul 30, 2025, 11:59 AM