fix: make nx2 crawl backend-aware via source.list#555
Open
chrischrischris wants to merge 2 commits into
Open
Conversation
The crawler in nx2/public/utils/tree.js listed folder contents by hitting
${DA_ORIGIN}/list directly, bypassing the backend-aware source.list. On a
Helix 6 site that endpoint has nothing, so da-live's delete confirmation —
which crawls a folder to count its files — reported "0 items" and the delete
flow broke (adobe/da-live#1034).
Route getChildren through source.list, which detects the backend per-site via
isHlx6 and returns DA-normalized items. Behavior is unchanged for the legacy
DA backend (DA is the backend, and source.list falls back to the same /list
endpoint); only Helix 6 sites — previously broken — change.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
@chrischrischris is this the same as #553? |
mhaack
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The crawler in
nx2/public/utils/tree.js(getChildren) listed folder contents by hitting${DA_ORIGIN}/list${path}directly, bypassing the backend-awaresource.list. On a Helix 6 site that endpoint has nothing, so any crawl returns no files.This surfaced in da-live as adobe/da-live#1034: deleting a folder crawls it to count its files before showing the confirmation dialog, which reported "0 items" and broke the flow on hlx6 sites.
Fix
Route
getChildrenthroughsource.list(fromnx2/utils/api.js), which:isHlx6and hits the right origin (AEM API for hlx6, DA/listfor legacy), and{ name, path, ext, ... }) — the exact shapegetChildrenalready separates into files vs folders.Removed the now-unused
daFetch/DA_ORIGINimports.Compatibility: Legacy DA behavior is unchanged — DA is the backend, and
source.listfalls back to the same/listendpoint (DA_ORIGINandDA_ADMINresolve to the same origin). Only Helix 6 sites — previously broken — change. nx1'stree.jsis intentionally left DA-only (nx1 is the legacy DA-only world). The only consumer of nx2's crawl is da-live; there are no internal nx2 callers.Tests
Added
test/nx2/public/utils/tree.test.js:source.list(the #1034 regression)source.listfallbackFull suite: 935 passing. (Note: the pre-existing nx1
tree.test.js"Respects throttle parameter" test is timing-flaky under concurrent load —setTimeout(50)occasionally measures 49ms — and is unrelated to this change.)🤖 Generated with Claude Code