Repository navigation
fix(confluence): say why an image is not in the bundle, as rw serve does - #1341
Merged
Merged
Conversation
A missing, too large or wrong-case image warned only that the attachment is not in the bundle. The render now asks storage why, as rw serve does, and a wrong-case path names the file on disk. Without a bundle, or for a markdown file outside the project, the generic warning stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merging this PR will not alter performance
Comparing Footnotes
|
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.
Summary
Follow-up from the case-sensitive paths spec's "Later" list (#1326 review).
rw confluence renderdropped a missing, too large or wrong-case image from the bundle with the generic "attachment '…' is not in the bundle; upload it to the page yourself", becauseImageNames::image_srcusedread_file(...).ok(). When that read fails, it now asksStorage::find_filewhy and the render warns withMissingFile's Display, the same textrw serveprints:ConfluenceBackend::imageintoattachment_filename, shared by both), so an image in a dropped title H1 still warns about nothing. Two missing files with one basename each get their own warning.--out -and a markdown file outside the project (no bundle storage), a resolver refusal (outside the project, unsupported type) that already warned on its own, and a read that failed whilefind_filefinds the file.--strictfails on the new warnings, as on the old one.docs/confluence.mddescribes both warnings. No CHANGELOG entry: image bundling is unreleased, and its existing entry links the docs.Validation
rw-confluencerenderer.rs: missing images viaMockStorage(every OS), and a misspelled image via a smallStoragestub returningMissingFile::Misspelled(every OS).render_strict_fails_on_a_missing_image(every OS) andrender_strict_fails_on_a_misspelled_image, which probes the temp dir's case sensitivity and expects the hint on macOS/Windows, plain "not found" on Linux. Both pass--strictand assert exit 1.render_does_not_bundle_a_file_storage_refuses(escape/env symlinks now "not found", the huge file "is larger than 32 MiB") andrender_leaves_images_it_cannot_bundle_to_the_publisher(the missing image).make test,make lint,make formatpass on macOS (case-insensitive APFS).🤖 Generated with Claude Code