Skip to content

docs(experiments): spec for UVE integration behind a dedicated flag (#37005) - #37256

Draft
oidacra wants to merge 1 commit into
mainfrom
issue-37005-experiments-uve-integration
Draft

docs(experiments): spec for UVE integration behind a dedicated flag (#37005)#37256
oidacra wants to merge 1 commit into
mainfrom
issue-37005-experiments-uve-integration

Conversation

@oidacra

@oidacra oidacra commented Aug 27, 2026

Copy link
Copy Markdown
Member

Proposed Changes

The spec covers two halves of the work: switching the Universal Visual Editor's Experiments entry point to the new portlet behind a runtime switch, and completing the portlet's Variants card with the Edit Content round-trip into UVE.

Three premises in the issue did not survive contact with the code. Each is resolved in the spec as D1/D2/D3, and both #37005 and #37008 were corrected on GitHub to match.

D1 — the flag named in the issue is not free. The issue proposed reviving FEATURE_FLAG_EXPERIMENTS, described as "declared, zero consumers today". That holds for the frontend enum entry only. The property is the live backend kill-switch for the whole Experiments feature — ConfigExperimentUtil.isExperimentEnabled(), gating experiment JS injection (ExperimentWebAPIImpl:338) and experiment resolution during page render (HTMLPageAssetRenderedAPIImpl:176,239). Setting it to false, the issue's intended default, would stop running experiments from serving to visitors. The spec requires a new dedicated switch, FEATURE_FLAG_EXPERIMENTS_PORTLET, shipped explicitly false. The explicit default is required rather than optional: getFeatureFlags() and withFlags() both map an absent flag to enabled, so a merely-declared flag ships on.

D2 — the flag-on destination. The issue deferred it. The spec settles it as the site-wide list filtered to the page in hand, with defined behavior for zero, one and many experiments, and a filter the editor can clear.

D3 — no "edited" signal. The issue asked a variant's meta line to read "Edited in the Universal Visual Editor". No such signal exists on the variant model on either side of the wire, and the legacy per-page card shows no edit indication at all. The spec forbids inventing one. It does require the consequence: the new Variants card renders the fixed string No content changes yet for every non-control variant, true today only because the Edit Content button beside it is disabled. This work is what makes it capable of being false, so the claim has to go.

Checklist

  • Tests — none yet; this PR is spec only. Test-first per Constitution Principle V applies when implementation starts.
  • Translations — no user-facing strings added. One existing key (experiments.configure.variants.meta.variant) is flagged for rewording at implementation time.
  • Security Implications Contemplated — no new surface. The spec explicitly protects the existing visitor-facing experiments kill-switch from being repurposed or disabled (FR-014, FR-015a), which is the security-relevant risk here.

Additional Info

Closes #37005

…37005)

Specification for the Experiments Portlet UVE integration: the flagged
entry-point switch plus the variant Edit Content round-trip.

Three points in the issue did not survive contact with the code, and the
spec resolves each one (recorded as D1/D2/D3 with rationale, since a
reader would otherwise assume the issue text is correct):

D1 - The issue proposes reviving FEATURE_FLAG_EXPERIMENTS, calling it
"declared, zero consumers today". That holds for the frontend enum entry
only. The property is the live backend kill-switch for the whole
Experiments feature (ConfigExperimentUtil.isExperimentEnabled, read by
ExperimentWebAPIImpl and HTMLPageAssetRenderedAPIImpl), so setting it to
false - the issue's intended default - would stop running experiments
from serving to visitors. The spec requires a new, dedicated switch,
shipped explicitly off, and leaves the kill-switch untouched. "Off by
default" also needs an explicit shipped default, because getFeatureFlags
and withFlags both map an absent flag to enabled.

D2 - The issue defers the flag-on destination. The spec settles it: the
site-wide list filtered to the page in hand, with defined behavior for
zero, one and many experiments, and a filter the editor can clear.

D3 - The issue asks a variant's meta line to read "Edited in the
Universal Visual Editor". No such signal exists on the variant model on
either side of the wire, and the legacy per-page card displays no edit
indication at all, so the spec forbids inventing one. It does require
one fix that follows from that: the new Variants card renders the fixed
string "No content changes yet" for every non-control variant, true
today only because the Edit Content button beside it is disabled. This
work is what makes it capable of being false, so the claim has to go.

Also records an impact on #37008, which currently says to remove
FEATURE_FLAG_EXPERIMENTS during migration. Under D1 what gets removed is
the new switch; the property must survive.

Spec only - no implementation.
@claude

claude Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Claude finished @oidacra's task in 52s —— View job


I'll analyze this and get back to you.

@erickgonzalez erickgonzalez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback:

  • Missing user story to turn off the FF in case something goes wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Experiments Portlet — UVE integration behind FEATURE_FLAG_EXPERIMENTS_PORTLET + variant Edit Content round-trip

3 participants