feat: Reuse component IDs and preserve explicit XML line breaks - #2
Merged
Merged
Conversation
u202F
approved these changes
Sep 9, 2026
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.
XML-to-JSON conversion currently replaces internal component IDs on every render, turning small edits into document-wide diffs. Add optional
referenceJsonrendering options that match existing widgets, tabs, documents, blocks, list items, table axes/cells, audio items and video elements before allocating new IDs. Exact content and unique local identities take priority; compatible edits retain IDs, while ambiguous additions receive fresh IDs. XML stays free of identity attributes.Also preserve text newlines as closed
<br></br>elements and parse explicit breaks back into inline newlines. Previously an empty<br>was ignored, concatenating archive text. The containing paragraph and its ID now remain intact. This prepares version 0.6.0; no package publication is part of this PR.Validation:
pnpm check: typecheck, 64 tests and build pass.The consuming extension was verified with 80 unit tests and a mocked Chromium E2E flow, including actual audio/quick-edit submission bodies. Full captured page data remains local; only a minimal public archive excerpt is included as a regression fixture.