Conversation
setUI() now checks isEWEnabled (user localStorage flag or site-level ew.enabled config) right after resolving path details, and redirects to /canvas before any old-editor doc-fetch/websocket work starts. Part of #1289.
sharanyavinod
previously approved these changes
Sep 2, 2026
| const details = getPathDetails(); | ||
| if (!details) return; | ||
|
|
||
| const { isEWEnabled } = await getNxEWFlags(); |
Member
There was a problem hiding this comment.
we're gating the whole editor load on two awaits now. if getNxEWFlags/isEWEnabled rejects (flag service blip), does /edit just break? might want a try/catch that falls through to the normal editor so a flag failure doesn't take down editing.
Contributor
Author
There was a problem hiding this comment.
Good catch — wrapped both awaits in a try/catch in e7c3145. On failure it now falls through to the normal editor instead of breaking /edit.
getNxEWFlags()/isEWEnabled() can reject (da-nx module load failure, config fetch blip), which would otherwise throw out of setUI() and break /edit entirely instead of just skipping the redirect.
1 task
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.
Summary
/editnow always checks whether Experience Workspace is enabled — either via the user's personal opt-in (thenx2:ew-user-enabledlocalStorage flag) or the site-levelew.enabledconfig flag — and if either is set, redirects straight to/canvasinstead of loading the old editor.This closes the gap where landing on
/edit(e.g. via a Sidekick "Edit" click, which targets/editregardless of the user's preference) would silently show the old editor even though the user had opted into the new one.Implementation:
setUI()inblocks/edit/edit.jsawaitsisEWEnabled({ org, site })(from da-nx'snx2/utils/ewFlags.js, which itself checks the user flag first and falls back to the site flag) right after resolving path details, and redirects before any old-editor doc-fetch/websocket work starts.Pairs with adobe/da-nx#714, which stops the toggle from clearing the user's localStorage flag when Sidekick lands you on
/edit— without that fix, this redirect would rarely fire since the flag would already be cleared by the time you got here.Fixes #1289
How Has This Been Tested?
Combine this branch with the companion da-nx branch via the
?nx=togglefixoverride:https://ewredir--da-live--adobe.aem.live/edit?nx=togglefix#/aem-sandbox/block-collection/index
/edit, or profile menu on/canvas) — you land on/canvas./edit#...URL above directly (simulating Sidekick bouncing you back to/edit) — you're redirected straight back to/canvasinstead of seeing the old editor.Types of changes
Checklist