fix(full-page): preserve large page rects and force image/graphics redaction#62
Merged
theodubus merged 1 commit intoFeb 15, 2026
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.
Motivation
Description
_tighten_rect_verticalwhen rectangle height exceeds24.0pt to preserve full-page rect coverage (backend/app/redaction.py).test_redact_rectangles_full_page_rect_redacts_targetthat posts a full-page rectangle to/redact/rectanglesand asserts the secret is removed (backend/tests/test_redact_rectangles.py).pagerules' rects in the API payload and detect when at least one full-page rule exists (frontend/src/App.tsxandfrontend/src/types/uiRules.ts).options.apply_imagesandoptions.apply_graphicsto/redact/applywhen full-page rules are present so images and vector graphics are also redacted (frontend/src/api.ts).IntersectionObserverinPdfViewer, exposeonCurrentPageChange, render the page censor preview, and wire a "censor page" action to create page rules (frontend/src/components/PdfViewer.tsx,frontend/src/components/Rules/RulesSection.tsx,frontend/src/components/Rules/RulesList.tsx,frontend/src/components/Rules/EditRuleModal.tsx).rules.badge.pageandrules.page.titletranslations for EN/FR (frontend/src/locales/en.json,frontend/src/locales/fr.json).Testing
npm run buildinfrontend/and it completed successfully. ✅test_redact_rectangles_full_page_rect_redacts_targetto prevent regressions, but the new backend integration test was not executed in this environment due to missing test dependencies (the test harness dependencyhttpx/ test client environment was not available). ⛔Codex Task