Update image proxy webp detection#3117
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughThe PR removes platform-specific branching throughout the codebase. Image proxification now consistently uses 'match' format instead of conditional 'webp' on Android, and post body rendering is changed from Platform.OS checks to unconditional false. Platform imports are removed where no longer needed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
🧹 Nitpick comments (1)
src/components/autoHeightImage/autoHeightImage.tsx (1)
59-61: LGTM — URL comparison will be consistent with the PR-wide'match'change.The
imgUrl === poxifiedUrlequality check works only when both sides are proxified using the same format. Since the PR updates all other proxification call sites to'match'as well (per the AI summary), the metadata-based aspect-ratio lookup will remain correct.One pre-existing nitpick in the changed line:
poxifiedUrlis missing anr("proxified").✏️ Typo fix
- const poxifiedUrl = proxifyImageSrc(url, undefined, undefined, 'match'); + const proxifiedUrl = proxifyImageSrc(url, undefined, undefined, 'match'); - if (imgUrl === poxifiedUrl) { + if (imgUrl === proxifiedUrl) {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/autoHeightImage/autoHeightImage.tsx` around lines 59 - 61, Rename the misspelled variable `poxifiedUrl` to `proxifiedUrl` in the autoHeightImage component so the equality check `imgUrl === proxifiedUrl` is correct; update the declaration where `const poxifiedUrl = proxifyImageSrc(url, undefined, undefined, 'match');` and any subsequent references to use `proxifiedUrl` (referencing proxifyImageSrc, imgUrl, and the equality branch) to fix the typo without changing logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/components/autoHeightImage/autoHeightImage.tsx`:
- Around line 59-61: Rename the misspelled variable `poxifiedUrl` to
`proxifiedUrl` in the autoHeightImage component so the equality check `imgUrl
=== proxifiedUrl` is correct; update the declaration where `const poxifiedUrl =
proxifyImageSrc(url, undefined, undefined, 'match');` and any subsequent
references to use `proxifiedUrl` (referencing proxifyImageSrc, imgUrl, and the
equality branch) to fix the typo without changing logic.
Summary by CodeRabbit