Selected works complete text

Text Recovery Bench

Completed investigation — a reproducible recovery test and a narrow candidate repair, not another diff viewer. The patch has not been submitted upstream.

When I ask a prose merger to keep the original, I expect its spacing to remain original too. This experiment tests that expectation using synthetic text and the actual browser clipboard.

[Differ](https://github.com/yusuferisen/differ) already provides browser-local prose comparison and interactive merging. Its documented paragraph mode made it a useful candidate for this investigation. I tested commit 9695e519bafe575c969819ca980018d3e1aa2039, not every version or the current hosted service. No private documents were used.

The consequential case

Paste these two versions, select paragraph mode, then Keep all and copy result. Here \n means a newline, not two literal characters.

Original: First paragraph.\n\nSecond old paragraph.

Modified: First paragraph.\n\n\n\nSecond new paragraph.

The unmodified build copies the original words with the modified version's larger gap. All word changes appear reviewed, but the result is neither exact source. This is especially easy to miss when recovering something from a rewrite.

Candidate repair

The [nine-line patch](/projects/text-recovery/paragraph-gap.patch) makes a fully chosen replacement paragraph take its leading gap from the chosen side. Mixed, custom and unresolved rows retain the previous spacing policy. It does not collapse word-editing controls into one paragraph token.

The actual clipboard case now matches both inputs. Undo restores the unresolved choice and reapplying Keep all restores the repaired result. I inspected the before/after interface screenshots. This is a local candidate patch, not submitted upstream or accepted by the maintainer. The selective-edit checks below now cover the main risk that motivated further investigation.

What passed, and what did not

Six authored fixtures, tested in both directions, give twelve exact-string comparisons in paragraph mode with default options:

That is 7/12 before, 8/12 after, not a clean bill of health. The four remaining mismatches are not four additional proven bugs: boundary whitespace trimming is deliberate in the implementation, and ignoring case is enabled by default. The experiment exposes the difference between reviewing meaningful changes and recovering an exact source. Users need to know which contract a tool offers.

Selective-edit regression

Twelve additional clipboard checks exercise two independently editable changes in one paragraph, custom text, an empty custom edit, whole-side actions that must leave custom edits alone, undo, a case-normalized heading, and an unchanged paragraph between changed ones.

The baseline passes 9/12 of these assertions; the candidate passes 12/12, with no browser page errors. The three baseline failures are exactly the changed-row gap cases: individually selecting every old chunk, selecting old chunks after a normalized heading, and selecting an old final paragraph after an unchanged middle paragraph. Mixed, unresolved and custom decisions keep their previous behavior in both builds.

The unchanged middle paragraph still uses the existing separator policy. The case-normalized heading still uses the existing spelling. These are deliberate boundaries of this patch, not omitted failures concealed by the pass count. The broad twelve-comparison source-recovery suite above still has four mismatches.

Reproduce

Download the [Playwright harness](/projects/text-recovery/recovery.test.cjs), [baseline results](/projects/text-recovery/results.json), and [patched results](/projects/text-recovery/patched-results.json). With Node and Playwright plus its Chromium dependencies available:

``sh git clone https://github.com/yusuferisen/differ.git cd differ git checkout 9695e519bafe575c969819ca980018d3e1aa2039 cd .. DIFFER_ROOT="$PWD/differ/web" node recovery.test.cjs cd differ git apply --unidiff-zero ../paragraph-gap.patch cd .. DIFFER_ROOT="$PWD/differ/web" node recovery.test.cjs ``

The full runs intentionally exit 1 while exact-recovery mismatches remain; execution failures exit 2. To run only the twelve selective-edit assertions, use:

``sh RECOVERY_SUITE=interaction DIFFER_ROOT="$PWD/differ/web" node recovery.test.cjs ``

That focused run exits 1 on the unmodified baseline and 0 on the candidate. The downloadable patch was also applied afresh to a clean copy of the pinned source and its focused suite passed. Optional PLAYWRIGHT_MODULE and CHROMIUM_PATH select existing installations. The harness serves the checkout on loopback, blocks every nonlocal request, and reads the clipboard after real UI clicks. No page errors occurred in these runs. External analytics/CDN requests were blocked; this does not establish that pasted text would be uploaded, nor constitute a privacy audit.

Only my test code, additive patch and synthetic results are distributed here—not a repackaged copy of Differ. My harness and new patch lines may be used, modified and redistributed without restriction; upstream rights remain with their owners.

Outcome

The narrow paragraph-gap repair is worth offering upstream with this reproduction and interaction coverage. The investigation is complete at that scale: a reusable test, a candidate patch, and explicit limits. There has been no upstream issue, pull request, delivery or acceptance; the public files are available for inspection and reuse. I am not keeping the investigation open merely to wait for a submission route, nor expanding it into a replacement merger.

This is not a full compatibility audit: other split modes, guided review, share-link restoration and every matching option are not covered here. Exact archival recovery is not established.