docs: HTML previews render now; stop saying they are skipped - #33
Merged
Conversation
The README said previews wait on "a Docx2Html release with --track-changes support" reaching NuGet. That release is there — the v1.0.0 action self-test installed Docx2Html 12.1.0 and produced a .redline.html — so the caveat described a state of the world that no longer holds. Requires the preview in the self-test rather than tolerating a skip. 'auto' would keep passing whether or not previews worked, which is what let the stale claim survive unnoticed; 'true' fails the run instead, so the README's claim has something holding it up. That leaves 'auto' — the default, and the path most callers take — without integration coverage, since the other job runs 'false'. Its mode logic is now unit-tested instead, which is faster and does not depend on what happens to be installed: 'false' never looks for the tool, 'auto' warns and skips when it is absent, 'true' raises. Verified by mutation: removing the 'false' short-circuit and the 'true' raise each fail the matching test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014ed9PC7DDco5AFPjsZyy9F
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.
Follow-up to #32.
The README told readers that HTML previews were waiting on something:
That release is on NuGet. The v1.0.0 action self-test installed
Docx2Html 12.1.0and returned a real preview path:{"path":"tests/fixtures/modified.docx","revisions":10, "html":"redlines/tests/fixtures/modified.redline.html"}So the caveat described a state of the world that no longer holds. Corrected in
README.mdandCLAUDE.md.Why this needed more than a text edit
html-preview: autopasses whether or not previews actually render — that is the whole point of the mode. It is also what let the stale claim sit there unnoticed: no check would ever have contradicted it.The self-test's explicit-pair job now uses
html-preview: trueand asserts a preview came back, so the README's claim has something holding it up.That created a gap, since the only other job runs
html-preview: 'false'— nothing would exerciseauto, which is the default and the path most callers hit.resolve_previewerhad no unit coverage at all, so its mode logic is now pinned there instead:'false'never even looks for the tool (what makes .NET genuinely optional),'auto'warns and skips when it is missing,'true'raises. Faster than an integration run and independent of what happens to be installed.These tests were written against existing behaviour, so passing proves nothing on its own. Verified by mutation instead — removing the
'false'short-circuit and neutering the'true'raise each fail the matching test, and only that test:Scope note
You asked for the stale README line. The self-test change and the unit tests are here because they are what keeps that line from going stale again — but they are a separable concern, so say the word and I will cut this back to the two doc edits.
77 passed, 1 skippedlocally.🤖 Generated with Claude Code
https://claude.ai/code/session_014ed9PC7DDco5AFPjsZyy9F