Skip to content

Fix/10505 overlapping api requests - #11084

Merged
dhairyagothi merged 3 commits into
dhairyagothi:Mainfrom
Ishani-Prajapati:fix/10505-overlapping-api-requests
Aug 14, 2026
Merged

dhairyagothi merged 3 commits into
dhairyagothi:Mainfrom
Ishani-Prajapati:fix/10505-overlapping-api-requests

Conversation

@Ishani-Prajapati

Copy link
Copy Markdown
Contributor

Description

Fixes #10505

This PR prevents overlapping GitHub API requests when users rapidly perform profile searches or comparisons.

Changes Made

  • Added a shared request lifecycle using AbortController and an operation ID.
  • Cancels the previous profile search or comparison when a new one starts.
  • Propagates the cancellation signal through profile, repository, contribution, and language API requests.
  • Prevents stale requests from updating the UI after a newer request has started.
  • Prevents intentionally cancelled requests from displaying error messages.
  • Stops contribution-data retries when the operation has been cancelled.
  • Preserves the existing timeout and retry behavior for genuine failures.

Result

Only the most recent search or comparison can update the UI, preventing stale results and unnecessary concurrent API requests.

Testing

  • git diff --check ✅
  • node --check public/github_profile_finder/script.js ✅
  • Verified rapid profile searches and comparison flows are protected against stale results.
  • Verified only the intended script.js file was modified.

@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Dhairya Gothi 's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@dhairyagothi dhairyagothi added gssoc:approved Approved by admin level:advanced Advanced difficulty task type:refactor Refactoring/improvement labels Aug 14, 2026
@dhairyagothi
dhairyagothi merged commit 1ec32f8 into dhairyagothi:Main Aug 14, 2026
4 of 5 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to our project. Your efforts are greatly appreciated. Feel free to reach out if you have any more contributions or if there's anything else we can assist you with. Keep up the fantastic work! 🚀

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

Labels

gssoc:approved Approved by admin level:advanced Advanced difficulty task type:refactor Refactoring/improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: GitHub Profile Finder allows overlapping API requests during rapid searches

2 participants