You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR fixes a bug where the Spanish blog index page was using a plain <img> tag instead of Astro's <Image> component for rendering hero images. The fix correctly aligns the Spanish page with the English version.
✅ Strengths
Correct Fix: The change properly addresses the issue. Since heroImage is defined with Astro's image() schema (src/content/config.ts:16), it returns an ImageMetadata object, not a string URL. The <Image> component is required to handle this properly.
Consistency: This aligns the Spanish blog index with the English version, maintaining code consistency across internationalized pages.
Performance: Using Astro's <Image> component enables automatic image optimization (WebP/AVIF conversion, responsive sizing, lazy loading), which is a best practice per CLAUDE.md.
Proper Attributes: The added width={600} and height={300} attributes prevent layout shift during image loading.
⚠️ Issues & Concerns
🚨 CRITICAL: Branch Strategy Violation
This PR targets main instead of develop.
Per CLAUDE.md GitFlow workflow:
Important Rules
Always start from develop branch - Never branch from or commit to main directly
Hotfix workflow:
Urgent production fixes, branch from main, merge to mainanddevelop
Action Required:
If this is truly a production hotfix (live site is broken), you must ALSO merge this to develop after merging to main
If this is NOT a production emergency, close this PR and recreate it targeting develop instead
⚠️ Missing Test Checklist Item
The PR description shows:
- [x] npm run build passes
- [ ] Thumbnail displays correctly on /es/blog/
The second checklist item is unchecked. Per CLAUDE.md:
Run npm run test:visual before committing UI changes
Action Required:
Manually verify thumbnails display on /es/blog/ in dev server
Run npm run test:visual to ensure no visual regressions
If visual tests fail (expected since you changed image rendering), run npm run test:visual:update to update baselines
Commit updated snapshots with message: test: update visual regression baselines after Image component fix
📝 Minor: CSS Selector Mismatch
The CSS at src/pages/es/blog/index.astro:102-106 targets .post-image img, which will still work with the <Image> component (Astro renders it as <img>), but consider updating to be more specific if needed in the future.
🧪 Test Coverage
Missing Visual Regression Update:
The visual regression tests (per CLAUDE.md) cover the Spanish blog page at /es/run, but I don't see explicit coverage for /es/blog/ index. However, this change affects image rendering, so:
Visual regression snapshots will likely differ
You should run npm run test:visual locally
CI will catch any regressions automatically
🏁 Verdict
Approve with Required Changes
The code change itself is correct and follows best practices. However, you must:
✅ Address branch strategy - Either merge to both main and develop (if hotfix), or retarget to develop
✅ Complete testing checklist - Run visual regression tests and update snapshots
✅ Verify manual testing - Check the actual page renders correctly
Once these items are addressed, this PR is ready to merge.
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
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
/es/blog/) was using a plain<img>tag instead of Astro's<Image>componentheroImagefield is resolved by Astro'simage()schema into an object, which requires the<Image>component to render<Image>correctly — this aligns the Spanish pageTest plan
npm run buildpasses/es/blog/