You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attachment extractor skips valid OpenDocument content when a repeat count uses a leading + or surrounding XML whitespace. For example, an ODS with table:number-rows-repeated="+2", table:number-columns-repeated=" +02 ", and text:c="+2" produces a missing or invalid XML message instead of the sheet text.
Change
Accept the XML Schema positiveInteger spelling when reading repeat counts. The existing row, column, and output limits still bound expansion.
Scope
This is a small parser bug demonstrated by the fixture in userInputAttachments.test.ts. The OpenDocument schema uses positiveInteger for repeat counts, and XML Schema permits the leading sign and collapses XML whitespace. OpenDocument schema · XML Schema datatype
Verification
Added an ODS case to the existing Office extraction test. On 6b6846385a the extractor reports [Skipped document part: content.xml (missing or invalid XML).]. With the patch, extractDocumentText() returns the sheet heading and two rows, each containing two Quarter one cells. The fixture checks the complete extracted text.
Direct extraction output with the patch (JSON-escaped):
Reviewing files that changed from the base of the PR and between 4d4cbbf and 9bfceb2.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The repeat-count parser now accepts surrounding whitespace and an optional leading plus sign. An ODS test verifies extraction of repeated rows and columns with these values.
Changes: ODS repeat-count parsing
Layer / File(s)
Summary
Parse and verify repeat counts apps/server/src/provider/documentTextWorker.ts, apps/server/src/provider/userInputAttachments.test.ts
repeatCount accepts surrounding whitespace and an optional leading plus sign. The ODS test checks the sheet heading, repeated cell text, and lack of truncation.
This change lets valid OpenDocument repeat counts with a leading plus sign or surrounding whitespace be extracted instead of skipped. No actionable merge-blocking risk remains.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: OpenDocument repeat counts are now accepted. It follows the conventional commit form and matches the raw summary, which describes accepting leading '+' signs and surro…
Description check
The description covers the required template sections: Problem, Change, Scope, and Verification. It explains the bug with concrete examples, links the OpenDocument and XML Schema references, and repor…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: OpenDocument repeat counts are now accepted. It follows the conventional commit form and matches the raw summary, which describes accepting leading '+' signs and surrounding whitespace in repeat counts.
Full details: Description check
Explanation
The description covers the required template sections: Problem, Change, Scope, and Verification. It explains the bug with concrete examples, links the OpenDocument and XML Schema references, and reports before/after extraction output and a passing check run. It names the model in the attribution line, as the template asks. The Scope section links no issue and does not say whether a maintainer requested the PR. The author justifies the fix as a small obvious parser bug, so the missing issue link is acceptable.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Uploaded repeat.ods through the real web composer using row/text-space counts +2 and column count +02. Opened the server-generated extraction unchanged in the app's file viewer. Same scenario, fresh databases, Chromium 1280×800, light theme.
Scenario source. scenarios:prove exited 0: failed on base with the reported skipped-part output, passed on head with the exact expected extracted text.
Not shown:
Provider quoting and the follow-up cat request were not exercised: replay does not read attachments, so the actual extracted sidecar was inspected directly in the app.
The digits-only control attachment and expansion-limit boundary cases were not exercised in this focused comparison.
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
size:XS0-9 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
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.
Problem
The attachment extractor skips valid OpenDocument content when a repeat count uses a leading
+or surrounding XML whitespace. For example, an ODS withtable:number-rows-repeated="+2",table:number-columns-repeated=" +02 ", andtext:c="+2"produces amissing or invalid XMLmessage instead of the sheet text.Change
Accept the XML Schema
positiveIntegerspelling when reading repeat counts. The existing row, column, and output limits still bound expansion.Scope
This is a small parser bug demonstrated by the fixture in
userInputAttachments.test.ts. The OpenDocument schema usespositiveIntegerfor repeat counts, and XML Schema permits the leading sign and collapses XML whitespace. OpenDocument schema · XML Schema datatypeVerification
Added an ODS case to the existing Office extraction test. On
6b6846385athe extractor reports[Skipped document part: content.xml (missing or invalid XML).]. With the patch,extractDocumentText()returns the sheet heading and two rows, each containing twoQuarter onecells. The fixture checks the complete extracted text.Direct extraction output with the patch (JSON-escaped):
vp run check:changed origin/mainpassed, including 73 focused tests.