Fix RSS enclosure media types - #1135
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tanstack-com | 7a55af7 | Commit Preview URL Branch Preview URL |
Aug 10 2026, 05:48 PM |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe RSS route detects image MIME types from header image extensions, ignores query strings and fragments, and uses ChangesRSS image media types
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/routes/rss`[.]xml.ts:
- Line 16: Update the extension detection expression in the RSS route to inspect
only the URL pathname, excluding query parameters and fragments before matching.
Preserve the existing lowercase extension behavior and supported-type lookup,
while ensuring dotted values in queries or fragments cannot determine the MIME
type.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 2667c399-120e-4214-859c-e03afe3c0bab
📒 Files selected for processing (2)
src/routes/rss[.]xml.tstests/rss.test.ts
Evidence
The RSS route hardcoded every blog image enclosure as
image/png. Among the current 50 published posts, the feed includes 24 PNG, 13 JPG, 4 WebP, 2 JPEG, and 1 SVG header images. That left 20 enclosure media types inconsistent with their URLs.Change
Derive the enclosure media type from the image extension, including query strings and fragments, and use
application/octet-streamfor unknown extensions. Add focused regression coverage for the supported formats and fallback.Impact
RSS consumers now receive media metadata that matches each blog header asset. Enclosure URLs, post content, and site rendering are unchanged.
Validation
pnpm test— TypeScript and type-aware lint clean; 124 tests passed, 1 environment-gated smoke test skippedgit diff --checkRisk
Low. The change only corrects RSS enclosure metadata; it does not alter asset URLs or response bodies.
Summary by CodeRabbit
Bug Fixes
Tests