Skip to content

fix: retry premium media proxy fallback#91

Open
AlejandroAkbal wants to merge 1 commit intomainfrom
auto-triage/662-dont-load
Open

fix: retry premium media proxy fallback#91
AlejandroAkbal wants to merge 1 commit intomainfrom
auto-triage/662-dont-load

Conversation

@AlejandroAkbal
Copy link
Copy Markdown
Member

@AlejandroAkbal AlejandroAkbal commented Mar 13, 2026

Summary

  • retry premium media proxy fallbacks up to 3 times instead of failing after the first proxied attempt
  • add a retry nonce to proxied media URLs so repeated fallback attempts do not reuse the same failed request
  • reset retry counters on manual reload so users can retry cleanly

Validation

  • pnpm test (fails: missing @nuxt/test-utils in repo test dependencies)
  • pnpm build (fails on existing assets/js/nuxt-image/imgproxy.provider.ts Buffer/browser build issue)
  • Vue LSP diagnostics unavailable in this environment because @vue/language-server is missing

Feedback

Summary by CodeRabbit

  • Refactor
    • Improved media loading retry mechanism with enhanced control and consistency. Updated internal logic for handling proxy retries across video, image, and animated content loading paths to provide more reliable media loading behavior.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 13, 2026

Caution

Review failed

Failed to post review comments

Walkthrough

PostMedia.vue now implements a controlled proxy retry mechanism with retry attempt counters and a nonce-based URL builder, replacing previous ad-hoc proxy-load flags. The new retry system is integrated across media loading paths, including video, poster images, and GIF handling, with retry counters reset during manual reload operations.

Changes

Cohort / File(s) Summary
Proxy Retry Mechanism
components/pages/posts/post/PostMedia.vue
Introduced controlled proxy retry system with maxProxyRetryAttempts constant, mediaProxyRetryAttempts, posterProxyRetryAttempts, and proxyRetryNonce refs. Added buildProxyRetryUrl() helper function. Replaced triedToLoadWithProxy and triedToLoadPosterWithProxy flags with new retry counters integrated into onMediaError, media loading paths, animated media handling, and manuallyReloadMedia reset logic.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: implementing retry logic for premium media proxy fallbacks, which is the core objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch auto-triage/662-dont-load
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch auto-triage/662-dont-load
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant