Compare literal Markdown off the main thread - #9046
Closed
hweihwang wants to merge 4 commits into
Closed
Conversation
Parse immutable documents, normalize their semantic structure, and emit bounded stable change descriptors. Support one shared schema for both parsed documents. Assisted-by: Codex:gpt-5.6-sol Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
Expose the Text comparison factory and render grouped changes by document section. Preserve every changed-only preview in multi-edit blocks with semantic deletion and insertion markup. Assisted-by: Codex:gpt-5.6-sol Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
Mount both immutable documents once, apply semantic decorations, support independent pane navigation, and provide an accessible single-pane layout for narrow containers. Assisted-by: Codex:gpt-5.6-sol Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
Add bounded source diagnostics for syntax-only and oversized rendered comparisons. Emit the cancellable worker under js so the post-merge asset job includes it. Assisted-by: Codex:gpt-5.6-sol Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
This was referenced Aug 14, 2026
Open
hweihwang
requested review from
max-nextcloud and
mejo-
and removed request for
max-nextcloud
August 14, 2026 16:36
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.
In one sentence: the Markdown source view that catches what rendering hides — line endings, whitespace, syntax — computed in a worker.
What and why
Two revisions can render identically and still differ: LF vs CRLF, trailing whitespace, a missing final newline, link syntax rewritten. The semantic engine works on parsed documents, so by design it cannot see these. This PR adds the view that can.
What's in this PR
Zero rendered changes, stated honestly — the whole reason this view exists.
The source view. Source change groups can differ from rendered ones.
Explicit diagnostics for what the rendered view cannot show.
Design notes
js/(verified:js/markdownSourceComparison.worker-Bn7Bh2ec.worker.mjs, noassets/) so the post-merge asset pipeline regenerates it. Under Vite's defaultassets/it would build locally but disappear after merge.diff@8.0.3(BSD-3-Clause, kpdecker/jsdiff) is declared here only — T1–T3 don't import it.Stack
Depends on: #9045. Last Text unit — after this, Collectives nextcloud/collectives#2697 and #2698. Opened stacked — the diff narrows as predecessors merge; I'll rebase before review.
Verification
ts:checkandlintpass; complete suite 1,917/1,917. Workerready/limitedprotocol responses are tested against the real module. Production build re-run at this tip: emittedjs/markdownSourceComparison.worker-Bn7Bh2ec.worker.mjs, noassets/directory.AI assistance
Commits carry
Assisted-by: Codex:gpt-5.6-sol; an independent review pass was run with Claude Opus 5. Description drafted with Hermes (deepseek-v4-pro) from my notes, then reviewed by me.Related