handle missing gracefully#13
Merged
Merged
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.
collect()— missing files are now comparable: True, so they render as clickable links into the compare view (keeping their missing in reference (A) / missing in monitored (B) message and different status). Missing directories stay non-linkable, since there's no single file to open./file/<variant>/<path>— when the file is absent on the requested side, it serves a small centered "file missing in reference (A)/monitored (B)" placeholder page instead of a raw 404, so the iframe shows something meaningful while the other side renders normally./image_diff— returns 404 when either side is missing (nothing to diff), so the diff strip'sSo now for a missing file you get:
/update_refneeded no change — it already copied B→A and 404'd on a missing source. All 3 tests still pass.Added a collect_one_sided() helper in root() that walks a directory present on only one side and emits one row per comparable file inside it (recursing into nested subdirectories), each marked missing in monitored (B) / missing in reference (A) with a different status. The old single opaque "directory missing" row is gone.
So if only_a_dir/ exists only in the reference, you now get:
Each row behaves like any other missing file:
blocked by #12