fix(experiments): Bring back functionallity of variants inside/outside UVE - #36493
Conversation
|
Claude finished @KevinDavilaDotCMS's task in 6m 18s —— View job Claude finished @KevinDavilaDotCMS's task in 2m 7s —— View job Code Review
I reviewed all 5 changed files. This is a focused, low-risk fix that correctly restores variant handling behavior. The three logic changes are internally consistent:
New IssuesNo blocking issues found. Notes (non-blocking)
Test coverage
The changes look correct and ship-ready. |
|
Tick the box to add this pull request to the merge queue (same as
|
fix(experiments): enhance DotExperimentsProvider initialization and improve useExperimentVariant logic
2026-07-09.14-54-21.mov
Proposed Changes
DotExperimentsProviderto handle initialization errors gracefully by logging them in debug mode and ensuring the instance is set regardless of success or failure.useExperimentVariantto consider any UVE mode as "inside the editor," aligning its logic with the updated provider check.useExperimentVariantto verify behavior when in PREVIEW mode.Impact
These changes improve the robustness of the experiments handling and ensure that the application can render correctly even if the DotExperiments instance fails to initialize.
Checklist
This PR fixes: #36484
This PR fixes: #36484