Fix product 2 image by normalizing deprecated catalog URLs#327
Draft
aviramha wants to merge 1 commit into
Draft
Conversation
Product 2 in the shared inventory DB still references a removed Cloudinary path (Metal Mart/samples/mirrord-hoodie-front). Map that legacy value to the current front/back public IDs at the API layer and filter blank image_urls entries in the frontend helpers.
Contributor
mirrord Preview Environment - Metal MartChanged services: metal-mart-frontend, inventory-service E2E gate: ✅ passed
To send traffic to this preview:
Preview is stopped when the PR is merged or closed. |
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
Product 2 ("Team Work Makes The Dream Work T-Shirt") failed to show an image in the shop UI because the shared inventory database still stores a removed Cloudinary path (
Metal Mart/samples/mirrord-hoodie-front) with a leading empty string inimage_urls.This PR repairs catalog responses at the inventory API layer and adds defensive filtering in the frontend image helpers.
Changes
GET /productsandGET /products/:idMetal Mart/samples/mirrord-hoodie-frontpath to the current front/back Cloudinary public IDsimage_urlsimage_urlwhenimage_urlsis emptyimage_urlsingetImageUrls/getPrimaryImageUrlVerification
Verified with mirrord (
session: cursor-fix-product-2-image-f256) against the playground cluster:GET /shop/api/products/2returns usableimage_urls[0](team_Work_makes_the_Dream_Work_-_front_w5qdnb)/shop/productsor/shop/products/2Screenshots
Products grid — all 16 products show images, including product 2:
Products grid with all images loading
Product 2 detail — front image and front/back thumbnails load correctly:
Product 2 detail page with hero image and thumbnails
To show artifacts inline, enable in settings.