feat(pdf-parser): add table correction toggle#106
Merged
Conversation
…ptions Add tableCorrectionEnabled boolean option (default: true) that controls whether table-correction work items are generated during review assistance. - PDFCorrectionOptions: new optional tableCorrectionEnabled field - NormalizedPDFCorrectionOptions: required tableCorrectionEnabled field - PDF_CORRECTION_DEFAULTS: tableCorrectionEnabled defaults to true - normalizePDFCorrectionOptions(): normalizes the new field Backward compatible — existing callers without the option get true.
…nner - ReviewAssistanceRunnerOptions: add tableCorrectionEnabled field - PostDoclingCorrectionPipeline: pass tableCorrectionEnabled to runner - ReviewAssistanceWorkScheduler.build(): accept skipTableItems option, skip table work items when set (called with !tableCorrectionEnabled) Tests updated: makeOptions() default includes tableCorrectionEnabled: true, pipeline test verifies false is forwarded, new test for explicit false.
- Zod schema: tableCorrectionEnabled defaults to true (UI option) - task-worker.ts: passes tableCorrectionEnabled from options to PDF correction options, defaulting to true for backward compatibility
…leItems - Verifies table work items are excluded when skipTableItems: true - Verifies table work items are included when skipTableItems: false - Verifies table work items are included by default (no options)
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.
Affected Package(s)
@heripo/pdf-parser@heripo/document-processor@heripo/model@heripo/logger@heripo/shared(internal)demo-webdocsSummary
Add a dedicated
tableCorrectionEnabledoption so review assistance can run without generating table-correction work items. This keeps the existing parser behavior backward compatible while letting demo-web disable table correction by default for lighter demo runs.Changes
tableCorrectionEnabledtoPDFCorrectionOptions,NormalizedPDFCorrectionOptions,PDF_CORRECTION_DEFAULTS, andnormalizePDFCorrectionOptions().tableCorrectionEnabledthroughPostDoclingCorrectionPipelineintoReviewAssistanceRunnerOptions.ReviewAssistanceWorkSchedulerOptions.skipTableItemsand used it to omittablework items while preserving text OCR, text integrity, footnote, picture, and layout tasks.correction.tableCorrectionEnabled.DEFAULT_FORM_VALUES.correction.tableCorrectionEnabledtofalsein demo-web.Breaking Changes
Checklist
pnpm lintpnpm typecheckpnpm buildpnpm testRelated Issues
Closes #