fix: prevent LogoCarousel DOM cloning leak#3801
Conversation
Replace DOM cloning in LogoCarousel with declarative rendering to avoid node accumulation on re-renders. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary by CodeRabbit
WalkthroughReplaces imperative DOM cloning in the LogoCarousel with declarative JSX rendering: adds a renderSponsorCard helper, computes a stable animation duration, and renders sponsors twice (original + loop) to simulate continuous scrolling without DOM mutation or cleanup logic. No public API changes. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
52963ef
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3801 +/- ##
==========================================
- Coverage 90.25% 90.24% -0.01%
==========================================
Files 463 463
Lines 14412 14410 -2
Branches 1934 1936 +2
==========================================
- Hits 13008 13005 -3
Misses 987 987
- Partials 417 418 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|



Summary
LogoCarouselby removing DOM cloning inuseEffectand rendering the duplicated sponsor list declaratively.sponsorscontains repeated items.Fixes #3754.
Test plan
make check-test-frontend(format + lint passed;graphql-codegenrequires backend running locally)pnpm exec jest __tests__/unit/components/LogoCarousel.test.tsx --coverage=false(pass)Made with Cursor