feat(docx-io): add tracked changes and comments import/export#4836
feat(docx-io): add tracked changes and comments import/export#4836arthrod wants to merge 122 commits into
Conversation
Add full round-trip support for DOCX tracked changes (suggestions) and comments with threading. This enables import/export of Word documents while preserving revision history and comment discussions. Import pipeline: - Custom mammoth.js fork emits [[DOCX_*:...]] tokens for ins/del/comments - importTrackChanges.ts parses tokens, applies suggestion marks - importComments.ts parses comment tokens, creates discussion structures - importDocx.ts orchestrates full pipeline with token cleanup - searchRange.ts provides text-based range finding for token placement Export pipeline: - exportTrackChanges.ts injects tracking tokens into serialized HTML - exportComments.ts handles comment-specific OOXML generation - html-to-docx enhanced with comments.xml, commentsExtended.xml, commentsIds.xml, commentsExtensible.xml, and people.xml generation - Proper paraId threading for reply chains App integration: - import-toolbar-button.tsx: full DOCX import with user registration - export-toolbar-button.tsx: export with discussions and suggestions - suggestion-node-docx.tsx: DOCX-safe suggestion rendering (no ins/del) - discussion-kit.tsx: paraId fields for round-trip fidelity - docx-export-kit.tsx: SuggestionLeafDocx override for clean export Key features: - Suggestion authorship preserved through round-trip - Comment threading via paraId/parentParaId linking - UTC date handling for cross-timezone compatibility - Overlapping comment ranges supported - ImportedUser type for user store registration
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
52af579 to
04d04d8
Compare
…oth.js - Remove redundant biome suppression comment in roundtrip.spec.tsx - Use literal key instead of computed expression in export-comment-ids.spec.ts - Exclude vendored mammoth.js directory from biome linting https://claude.ai/code/session_016HSa8FaK9T51SfKE9TvZX4
fix(docx-io): fix lint errors in test files and exclude vendored mamm…
- Fix roundtrip test: replace registry imports with Base* plugins, resolve mammoth fixtures from npm package, add render.as config for table/link plugins to enable proper HTML serialization - Fix export-replies test: update date expectations to match normalizeDate output format (no milliseconds) - Fix lists test: unskip and update expected output to match BaseListPlugin indent-based flat paragraph behavior - Fix testDocxImporter: rewrite to use Base* plugins instead of React plugin variants that required unavailable packages - Add missing devDependencies for test plugins - Fix type error: use any[] for editorPlugins array in tests All 300 tests pass, 0 failures, 0 skipped. https://claude.ai/code/session_01Re6XP9ZEbTqXe4ng3mFRr1
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Removed the 'generate_from_rules' setting from skills.
Removed 'mammoth' dependency from package.json.
Removes ~700MB of downloads (puppeteer ~500MB Chromium, playwright ~200MB). These caused OOM during CI builds. Scripts now print install instructions instead of failing silently. https://claude.ai/code/session_01Re6XP9ZEbTqXe4ng3mFRr1
- Fix DocxExportPlugin import in DocxIOPlugin.spec.tsx (not re-exported from DocxIOPlugin) - Fix SlatePlugin[] type incompatibility in roundtrip.spec.tsx - Add @playwright/test as devDep to @platejs/playwright (was only peerDep, needed for typecheck after removing from root) - Fix biome lint error (template literal) https://claude.ai/code/session_01Re6XP9ZEbTqXe4ng3mFRr1
Skiller moved .claude/rules/ to .claude/skills/ and added SKILL.md metadata files. Also includes external spec file updates. https://claude.ai/code/session_01Re6XP9ZEbTqXe4ng3mFRr1
…yarn-7f4e323a06 Bump the npm_and_yarn group across 4 directories with 18 updates
…sfy useThrowOnlyError lint rule https://claude.ai/code/session_01V5zGakMe6vBHVZEAinNrsC
tests(docx-io): throw Error objects in applyDocxTracking.spec to sati…
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Sorry I missed this you can only focus on playground I will update template later |
|
I was able to take care of the template! Now just the docxio needs review. |
Apply validated PR #184 review feedback and resolve conflicts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document dot-starting diffs vs main and docxio direct/indirect file inventory. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Supply-chain defense: packages must be 7+ days old before install. Adds [test] root="./packages" in monorepos. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add full round-trip support for DOCX tracked changes (suggestions) and comments with threading. This enables import/export of Word documents while preserving revision history and comment discussions.
Import pipeline:
Export pipeline:
App integration:
Key features:
Checklist
yarn typecheckyarn lint:fixyarn testyarn brlyarn changeset