Repository navigation
Compare mode: convert office/text documents like the folder-scan path does - #60
Merged
Merged
Conversation
… does "Compare two documents" (GUI toggle, -doc1/-doc2) rejected every input that wasn't an image or PDF with "Unsupported file type for comparison ... (only images and PDFs are supported)". CompareRunner had its own image/PDF-only buildTests() and never consulted the ConversionRegistry that Suite uses, so a .docx failed by extension before LibreOffice was ever looked for - installing it changed nothing. - New PdfConversion holds the default registry and the convert-to-temp-PDF step; Suite.tryConvert and CompareRunner both use it so the two paths can't drift apart again. - CompareRunner converts doc1/doc2 up front; precheck, page-range validation and the test objects see the converted PDF, while test names still report the original file (PdfFileTest's source argument). - A document that can't be converted fails the compare run with the reason. When the reason is a missing LibreOffice the install hint is appended (now a shared constant used by the CLI skip summary too). - Unsupported extensions (e.g. .zip) still fail, with a message listing the convertible formats. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PsLo6sSNLARaybn6YaHpaT
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PsLo6sSNLARaybn6YaHpaT
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.
Problem
"Compare two documents" (GUI toggle,
-doc1/-doc2) rejected every input that wasn't an image or PDF:CompareRunnerhad its own image/PDF-onlybuildTests()and never consulted theConversionRegistrythatSuiteuses for normal runs, so a.docxwas rejected by extension before LibreOffice was ever looked for — installing LibreOffice changed nothing. The same file worked fine in a normal-frun.Fix
PdfConversionowns the default converter registry and the convert-to-temp-PDF step.Suite.tryConvert()andCompareRunnerboth go through it so the two paths can't drift apart again.CompareRunnerconverts doc1/doc2 up front; the precheck, page-range validation and test objects all see the converted PDF, while test names still report the original filename (viaPdfFileTest'ssourceargument). Works with-sssplit-steps too..zipetc.) still fail, with a message that lists the convertible formats.Tests
CompareRunnerTest— 3 new: TXT→PDF conversion in compare mode (no LibreOffice needed), same with split-steps, and LibreOffice-missing via an injected registry failing before any Eyes call with the install hint. The old ".txtis unsupported" test now uses.zip.Full suite: 653 tests, 0 failures.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PsLo6sSNLARaybn6YaHpaT