feat(sheet): preserve spreadsheet provenance - #163
Open
789987777777 wants to merge 9 commits into
Open
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 25 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Author
|
Review follow-up:
Verification: |
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.
Why
to_document()currently turns spreadsheet tables into the shared document model without retaining worksheet identity or source coordinates. That prevents downstream consumers from tracing a table or cell back to the original workbook, especially after hidden rows/columns and merged cells are normalized.What
SpreadsheetCoordinate,SpreadsheetRange, andSpreadsheetSourcemodel types.Tableand spreadsheet originCellvalues.Coordinates are zero-based and ranges are inclusive. Non-spreadsheet tables and cells keep
None/undefinedsource metadata.Verification
cargo test -p anydoc --all-targets --quiet: 303 passed, 1 ignored, 0 failed.cargo clippy -p anydoc --all-targets -- -D warnings: passed.cargo fmt --all -- --check: passed.cargo check --workspace --target x86_64-pc-windows-msvc --quiet: blocked in this Windows environment becauselink.exeis unavailable; core Rust and Python checks pass below.cargo check -p anydoc-python --quiet: passed.rustup run stable-x86_64-pc-windows-gnu cargo check -p anydoc-wasm --target wasm32-unknown-unknown --quiet: passed.Risk / notes
TableandCellare public Rust structs, so downstream struct literals must account for the new optionalsourcefields.libnode.dlland the MSVC linker are unavailable; the binding Rust code and WASM target compile checks pass, and the JS/Python test sources pass syntax checks.poc-shared-strings.xlsxparsed successfully but its Markdown conversion grew to roughly 15 GB before being stopped. This occurs in the Markdown conversion path and was not attributed to this provenance change; it should be tracked separately.No internal or non-public CSR files are included in this branch or repository.
Summary by cubic
to_document()now preserves worksheet identity and source coordinates for spreadsheet files, so tables and cells can be traced back to their original workbook positions.TableandCellcarry optionalsourcemetadata for XLSX/XLSM, XLSB, XLS, and ODS; non-spreadsheet tables and cells keepNone/undefined. Merged origins keep their complete source rectangle even when hidden rows or columns collapse the visible span or the merge ends in covered cells.Migration
TableandCellare public Rust structs; downstream struct literals must includesource: None.Written for commit d252d16. Summary will update on new commits.
Closes #10