fix(compare): prevent comparison loading from getting stuck#8017
Conversation
|
@kiran-madhav is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
This pull request addresses a UI state bug on the Compare Developers page where comparisons could remain stuck on “Comparing…” by preventing duplicate in-flight comparisons, adding a request timeout, and ensuring the loading state is always cleared on completion.
Changes:
- Adds in-flight request de-duplication and a 20s
AbortControllertimeout to prevent comparisons from hanging indefinitely. - Ensures
loadingis reset after success, failure, or timeout; adds a clear timeout error message. - Updates the Vercel vs Netlify preset to use founder accounts and updates/extends tests to cover timeout + duplicate-request prevention.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| components/TopRivalriesTicker.tsx | Switches the Vercel/Netlify rivalry to founders and adds optional display labels for ticker text. |
| components/TopRivalriesTicker.mouse-interactivity.test.tsx | Updates ticker navigation expectations for the new founder-based preset. |
| components/DeveloperArena.tsx | Updates the trending showdown preset to compare founders instead of org accounts. |
| app/compare/CompareClient.tsx | Adds active-request tracking, abort timeout, and more robust loading/error cleanup to avoid “Comparing…” getting stuck. |
| app/compare/CompareClient.test.tsx | Adds test coverage for timeout handling and preventing duplicate in-flight requests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| u1: 'rauchg', | ||
| u2: 'biilmann', | ||
| label: 'Vercel vs Netlify', | ||
| desc: 'Platform Wars', | ||
| desc: 'Founder Showdown', |
| u1: 'rauchg', | ||
| u2: 'biilmann', | ||
| displayU1: 'Vercel', | ||
| displayU2: 'Netlify', | ||
| label: 'Platform Wars', |
📦 Next.js Bundle Size Report (Gzipped Sizes)
📊 Summary of Totals
|
Aamod007
left a comment
There was a problem hiding this comment.
Good catch on the vercel vs netlify rivalry! Since those are orgs and the compare page expects users, changing it to the founders (rauchg vs biilmann) is a smart way to prevent the loading state from hanging. Approved!
|
🎉 Congratulations @kiran-madhav! Your PR has been successfully merged. 🚀 Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.
Keep building! 💻✨ |
Description
Prevents comparison requests from leaving the Compare Developers page stuck on "Comparing...".
Fixes #8009
Changes
AbortControllerrauchgvsbiilmann)Testing
npm run formatnpm run lintnpm run testnpm run test:coverage -- --runtorvaldsvsgvanrossumrauchgvsbiilmannEvidence
Before
Screen recording showing the comparison remaining stuck on "Comparing...":
Screen.Recording.2026-07-12.163706.mp4After
torvaldsvsgvanrossumcomparisonrauchgvsbiilmanncomparisonScreen.Recording.2026-07-12.163706.mp4