Skip to content

fix: Enhance external image fallback reliability and prevent endless error loops - #8983

Open
Aditya8369 wants to merge 1 commit into
JhaSourav07:mainfrom
Aditya8369:fix/External-image-fallback
Open

fix: Enhance external image fallback reliability and prevent endless error loops#8983
Aditya8369 wants to merge 1 commit into
JhaSourav07:mainfrom
Aditya8369:fix/External-image-fallback

Conversation

@Aditya8369

Copy link
Copy Markdown
Contributor

Summary of Changes
Guarded Fallback Attempt: Updated onError in

LandingPageClient.tsx
to mark img.dataset.fallbackAttempted = 'true' when an avatar image fails to load.
Prevented Endless Error Loops: When fallbackAttempted is already 'true' (or when src is already the fallback URL and fails), the handler sets img.style.display = 'none' and stops modifying src.
Unit Testing: Added unit tests in

LandingPageClient.avatar-fallback.test.tsx
verifying single fallback attempt behavior and UI stabilization.

closes #3607

Copilot AI lite review requested due to automatic review settings August 9, 2026 15:52
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

@Aditya8369 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@retenta-bot

retenta-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

This pull request addresses issues with the external image fallback mechanism by implementing a guard to prevent endless error loops and ensuring that fallback attempts are tracked. This aligns with previous decisions made to enhance user experience by preventing invalid fallback URLs. The addition of unit tests further strengthens the reliability of this feature. Thank you for your contribution!

@retenta-bot retenta-bot Bot changed the title fix: External image fallback may not work reliably because it overwri… fix: Enhance external image fallback reliability and prevent endless error loops Aug 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Size Report (Gzipped Sizes)

Asset PR Size Base Size Difference Status
static/chunks/app/page-[hash].js 22.71 KB 22.65 KB +0.06 KB (+0.28%) 🔴 Regression

📊 Summary of Totals

Category PR Size Base Size Difference
Total JS 4961.66 KB 4961.50 KB +0.16 KB (+0.00%)
Total CSS 347.36 KB 347.36 KB 0 B

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.

bug: External image fallback may not work reliably because it overwrites src without guarding

2 participants