LearnNewsExamplesServices
Frontmatter
id9565
titleRegression: Store.load({url}) fails when Store has no initial URL config
stateClosed
labels
bugairegressioncore
assigneestobiu
createdAtMar 26, 2026, 7:09 PM
updatedAtMar 26, 2026, 7:10 PM
githubUrlhttps://github.com/neomjs/neo/issues/9565
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 26, 2026, 7:10 PM

Regression: Store.load({url}) fails when Store has no initial URL config

Closed v12.1.0 bugairegressioncore
tobiu
tobiu commented on Mar 26, 2026, 7:09 PM

Goal

Restore the ability for Store.load({ url: '...' }) to function correctly when the Store was initialized without a url or explicit pipeline configuration.

Context

In the recent data layer refactoring (moving toward explicit Pipelines), we introduced a regression. A Store that is instantiated without a url gets a dummy Pipeline without a Connection assigned.

When a dynamic URL is later passed directly to store.load({ url: 'data.json' }), the Pipeline attempts to read from a missing connection (me.pipeline.connection is undefined) because the legacy bridge in beforeSetPipeline only builds the Xhr connection if me.url is set during initialization.

This specifically broke the Portal App's learning and release notes views (apps/portal/view/learn/MainContainerController.mjs), as they load their Content stores dynamically based on route parameters rather than having a static URL on the Store class definition.

Acceptance Criteria

  1. Update Store.load() to check if opts.url is present but the pipeline lacks a connection.
  2. If so, dynamically import and assign a Neo.data.connection.Xhr instance to the pipeline just-in-time, using the provided URL.
  3. Ensure this logic executes correctly before await me.pipeline.read(params).
  4. Create a new unit test test/playwright/unit/data/StoreDynamicUrl.spec.mjs that verifies this specific scenario (no initial URL, but URL passed to load()).
tobiu added the bug label on Mar 26, 2026, 7:09 PM
tobiu added the ai label on Mar 26, 2026, 7:09 PM
tobiu added the regression label on Mar 26, 2026, 7:09 PM
tobiu added the core label on Mar 26, 2026, 7:09 PM
tobiu referenced in commit 6ba36df - "fix(data): Re-enable dynamic URL connection instantiation in Store.load() (#9565)" on Mar 26, 2026, 7:09 PM
tobiu assigned to @tobiu on Mar 26, 2026, 7:09 PM
tobiu
tobiu Mar 26, 2026, 7:09 PM

Input from Gemini 3.1 Pro:

✦ I have resolved the regression.

Fix Details: The issue was caused by the Pipeline refactoring. If a Store is created without an initial url, it gets a dummy Pipeline without a Connection. If a URL is then passed dynamically during store.load({ url: '...' }), the Pipeline had no connection to execute the read() against.

I updated src/data/Store.mjs within the load() method to check for this exact edge case. If a dynamic opts.url is provided and the pipeline lacks a connection, it now uses a dynamic import to grab connection/Xhr.mjs and instantiates it just-in-time on the pipeline before executing pipeline.read().

I also created test/playwright/unit/data/StoreDynamicUrl.spec.mjs with a mocked global XMLHttpRequest to explicitly test and prevent this regression in the future.

The fix has been committed and pushed. I will close this issue now.

tobiu closed this issue on Mar 26, 2026, 7:10 PM