Repository navigation
refactor: paper keeps one stored document format (#1954) - #1960
Merged
Merged
Conversation
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.
Closes #1954
Part C of #1954 (one stored Paper format). Part A was #1955 (PR 1956) and Part B was #1957 (PR 1958); both are merged.
Summary
After Part B every stored Paper is a rich document. This part deletes the code that only served the old formats:
openPaperClient, the prose adapter) is gone. So are editor-write, inspect, native CV, native formatting import/letter/mount/transaction, presentation codec/inline/reverse and revert.PaperClientnow defaults to the rich document, and the stored-document module accepts only the rich document.storedPaperDocumentSchemais now the rich document schema. Block-document modules used only by the deleted code are deleted (cv-field-edits,cv-projection,merge,safety,undo,upgrade), and exports nothing imports any more are un-exported.admitDocumentno longer has an old-format branch, because its input type is rich-only.interleave.test.ts, which is deleted, so it now requires the live fast-check test (mapping.test.ts). Its ledger row proves quiet on the fixed version of the deleted file at the commit that fixed it.Evidence
npx tsc --noEmitinapps/api,apps/web,packages/domainandpackages/paper-crdtafter mergingmain: 0 errors each.pnpm testinpackages/domain: 192 passed, 0 failed.npx vitest runinpackages/paper-crdt: 23 files, 230 passed.node --test scripts/*.test.mjs packages/guards/*.test.mjson this branch after mergingmain(with Part B): 1050 passed, 0 failed.branchVerdictagainstorigin/main): 0 refusals after the retirements below.Merge Danger
Door: two-way. Only code is deleted; no data or migration.
Blast Radius: the Paper CRDT package and the domain's Paper document modules. The API and web no longer import any deleted name; typecheck of every package proves it.
Retired checks:
scripts/retired/1954.jsonrecords 31 test files. They tested the deleted prose client, its sync and merge, native formatting, and the block document code. The rich client and rich stored document keep their tests.Closes #1954
Retired 287 checks without self-serve replacement proof: packages/domain/src/paper-blank-edits.test.ts (no replacement test); packages/domain/src/paper-cv-fields.test.ts (no replacement test); packages/domain/src/paper-cv-projection.test.ts (no replacement test); packages/domain/src/paper-doc-edits.test.ts (no replacement test); packages/domain/src/paper-doc-merge.property.test.ts (no replacement test); packages/domain/src/paper-doc-merge.test.ts (no replacement test); packages/domain/src/paper-doc-rebase-header.test.ts (no replacement test); packages/domain/src/paper-doc-repair.property.test.ts (no replacement test); packages/domain/src/paper-doc-rich-text.test.ts (no replacement test); packages/domain/src/paper-doc-safety.test.ts (no replacement test); packages/domain/src/paper-doc.test.ts (no replacement test); packages/domain/src/paper-doc-upgrade.test.ts (no replacement test); packages/domain/src/paper-doc-words.test.ts (no replacement test); packages/domain/src/paper-native.test.ts (no replacement test); packages/domain/src/paper-native-text.test.ts (no replacement test); packages/paper-crdt/src/client-fallback.test.ts (no replacement test); packages/paper-crdt/src/client-header.test.ts (no replacement test); packages/paper-crdt/src/client.test.ts (no replacement test); packages/paper-crdt/src/crdt.test.ts (no replacement test); packages/paper-crdt/src/interleave.test.ts (no replacement test); packages/paper-crdt/src/merge.test.ts (no replacement test); packages/paper-crdt/src/moved.test.ts (no replacement test); packages/paper-crdt/src/native-cv.test.ts (no replacement test); packages/paper-crdt/src/native-formatting-engine.test.ts (no replacement test); packages/paper-crdt/src/native-formatting-mount.test.ts (no replacement test); packages/paper-crdt/src/native.test.ts (no replacement test); packages/paper-crdt/src/presentation-codec.test.ts (no replacement test); packages/paper-crdt/src/probes.test.ts (no replacement test); packages/paper-crdt/src/rich-client.test.ts (no replacement test); packages/paper-crdt/src/stored-document.test.ts (no replacement test); scripts/guard-ledger/property-seed.json (no replacement test)