VWO editor repro

cutPaste nth-of-type + shadow → many grouper tags

Minimal stand-in for “many #main > section siblings + cut/paste reorder + one shadow edit”. Editor looks fine; preview/deploy can hide the wrong section when grouper shards ops into separate tags.

What this proves

Exact VWO steps (editor)

  1. Create a standard AB campaign (not ABT-migrated). Primary URL = this page.
  2. Open the visual editor on this URL. Confirm #main shows six labeled sections in order A Hero → B Practice → C Structured → D Recovery → E Support → F Reviews. Each section paints its live :nth-of-type under the title.
  3. Cut section B Practice. Paste after section D Recovery. Expected live order: A, C, D, B, E, F.
  4. Cut section E Support. Paste after section A Hero (first section). Expected live order: A, E, C, D, B, F.
  5. Cut section C Structured. Paste after section F Reviews. Expected live order: A, E, D, B, F, C.
  6. (Optional but closer to the original bug) Copy section D Recovery and Paste after A Hero so a pasted clone sits early in #main.
  7. Shadow trigger (required for ~many tags): scroll to chat-widget, select the inner text “SHADOW EDIT TARGET”, change the text to SHADOW TOUCHED (or any style). This is the only edit that must touch shadow DOM.
  8. Save. In the console, open <<Groups data>>. With the shadow edit you should see many content tags (roughly one per distinct section path), not a single MAIN#main bucket. Note cutPaste rows whose hide uses #main > section:nth-of-type(N):not([vwo-element-id]).
  9. Open Preview (hard refresh). Compare section titles / visibility to the editor canvas. Bug: a native section that should stay visible is hidden (or a wrong sibling is gone), and/or a cut source still shows while its paste clone exists — because a later paste tag ran before an earlier nth-based hide.
  10. Control contrast: undo/remove only the shadow edit (keep the cutPastes), save again. Groups should collapse toward ~1–3 tags under MAIN#main. Preview should match editor.
  11. HEAD contrast (optional): on a variation without the shadow edit, add trivial Code Editor content (injects a HEAD group). Groups ≈ parent-lifted body groups + HEAD (often ~4 on richer pages; on this fixture expect MAIN + HEAD, and chat only if still edited).

If Groups stay huge after deleting the shadow edit, confirm variation meta no longer has isOpOnElNotPresentInLightDOM and that no other >> selector remains on the stack.

What to look for in Groups / deploy

Fixture DOM (edit these)

A — Hero
B — Somewhere to practice
C — Structured Recovery
D — Recovery Needs
E — Recovery Support
F — Reviews
Footer (ignore). Exists so FOOTER can become its own grouper boundary if you paste under it.

Live nth labels update as you reorder in the editor. They are for humans — deploy still freezes selectors at save.

Local demo (no VWO) — why tag order breaks nth hide

Simulates deploy as separate tags: a late “paste insert” tag runs before an earlier “hide section:nth-of-type(4)” tag. Same frozen selector, different DOM.

Press a button. Uses a cloned #main, does not touch the live editor target above.