feat(compare): add recent comparison history support#6258
Open
SujalMahapatra wants to merge 1 commit into
Open
feat(compare): add recent comparison history support#6258SujalMahapatra wants to merge 1 commit into
SujalMahapatra wants to merge 1 commit into
Conversation
Contributor
|
@SujalMahapatra is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
📦 Next.js Bundle Size Report (Gzipped Sizes)
📊 Summary of Totals
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR extends recent search history support to the Compare Developers experience by persisting successful comparison pairs and surfacing them in a dedicated Recent Comparisons section.
Changes Made:
Added recent comparison history integration using the existing useRecentSearches hook.
Stores successful comparison pairs in the format user1 vs user2.
Added a Recent Comparisons UI section below the comparison form.
Added one-click replay for previously compared developer pairs.
Added support for removing individual comparison entries.
Added support for clearing all stored comparison history.
Reused existing localStorage-based search persistence infrastructure without introducing additional dependencies.
Testing:
Verified comparison history persistence across page refreshes.
Verified removal of individual comparison entries.
Verified clear-all functionality.
Verified replay of previous comparisons from history.
Ran:
✅ npm run lint
✅ npm run typecheck
✅ npm run test
Fixes #6245
Pillar
Visual Preview
Unable to provide runtime screenshots because the local development environment currently encounters unrelated Compare page rendering/authentication issues already present in the repository (hydration mismatch and API configuration errors).
The feature implementation has been verified through:
Successful build and TypeScript validation
npm run lint
npm run typecheck
npm run test
The changes are isolated to the Compare Developers page and add persistent Recent Comparison History functionality using the existing useRecentSearches infrastructure.
Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.