fix(cli): improve smoke test image validation with 404 checks and filepath detection#15666
Open
thesandlord wants to merge 2 commits intomainfrom
Open
fix(cli): improve smoke test image validation with 404 checks and filepath detection#15666thesandlord wants to merge 2 commits intomainfrom
thesandlord wants to merge 2 commits intomainfrom
Conversation
…epath detection Replace unreliable naturalWidth checks with: - Network-level interception to catch 404s and failed image requests - Filesystem path pattern detection (drive letters, backslashes, file:// protocol, unresolved file:<uuid> references) Co-Authored-By: Sandeep Dinesh <sandeep@buildwithfern.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Sandeep Dinesh <sandeep@buildwithfern.com>
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.
Description
Replaces the unreliable
naturalWidth > 0check in the docs preview smoke test with more robust image validation that will actually catch broken images on Windows.Changes Made
requestfailedevents during page load to catch image requests that return 4xx/5xx or fail at the network levellooksLikeFilesystemPath()helper that checks for:file:///protocol leaksC:/,D:\)%5C)file:<uuid>references (frontend failed to map to a URL)naturalWidthcheck which could pass even when images fail to render correctly (e.g., browser placeholder icons have non-zero dimensions)waitUntilfrom"domcontentloaded"to"load"to ensure images have had time to start loading before we check network responsesTesting
ubuntu-latest,macos-latest, andwindows-latest— the improved assertions will surface any image resolution failures that the oldnaturalWidthcheck was maskingLink to Devin session: https://app.devin.ai/sessions/33e519fd68c24507b26161112fbb6d74
Requested by: @thesandlord