Oleg Isonen c4b26b4173 fix: Persist nested MDX heading edits after refresh (#6707)
Nested headings inside MDX templates should save and remain after
refresh. PR #6692 did not fix that persistence failure.

The staging repro showed the MDX serializer rejecting an unchanged Asset
record. The live record and saved record can have different JavaScript
prototypes while representing the same JSON data, so the raw deep
comparison rejected a valid edit. Reconciliation now compares normalized
JSON data.

Known authored Asset props and path-mapped template assets remain
supported. Unmapped, unreferenced template Asset records are still
rejected; the staging repro did not need a broader provenance-based
exception.

The save status remains pending until the MDX Asset write completes,
even if the last Content Block root unmounts. Failed or conflicting
writes remain visible as errors and keep the unload guard active.

## Checklist
- [x] Add a Builder E2E regression test for nested heading persistence
through the MDX Asset.
- [x] Track Asset saves independently of mounted Content Block roots.
- [x] Keep failed/conflicting Asset writes visible and guarded.
- [x] Preserve authored Asset props and path-mapped template assets
during MDX text edits.
- [x] Add regression tests for omitted asset records and continue
rejecting unknown or modified assets.
- [x] Confirm the asset comparison regression test fails with the
previous comparator and passes with the fix.
- [x] Review Content Block docs; no documentation changes are needed.
- [x] Run the focused MDX suite (62 passed), project-build typecheck,
oxlint, formatter, and diff checks.
- [x] Add the generated Builder E2E schema snapshot required by CI.
- [x] Remove temporary diagnostics and the unneeded broader provenance
exception.
- [x] Verify nested heading persistence on staging after the latest
deployment.
- [x] Verify required CI checks for this staging branch; all passed.

Replaces #6706
Ref #6306
2026-11-17 00:30:11 +01:00
2026-02-05 10:25:17 +01:00
2026-03-20 21:09:47 +01:00
2023-09-06 21:43:29 +03:00

builder-screenshot

Webstudio is an Open Source Visual Development Platform for developers, designers, and cross-functional teams. You own the data, components, and infrastructure. You can use the hosted version or roll out your own.


Learning Resources

Social Media

License

  • Webstudio core (all functionality in this repository) is free/open-source under AGPL-3.0-or-later.
  • sdk-components-animation package (optional) is proprietary. You must accept the Webstudio, Inc. EULA located in sdk-components-animation/LICENSE before using it.
Languages
TypeScript 97.9%
PLpgSQL 1.5%
CSS 0.3%
Shell 0.2%
JavaScript 0.1%