Skip to content

feat(compare): add recent comparison history support#6258

Open
SujalMahapatra wants to merge 1 commit into
JhaSourav07:mainfrom
SujalMahapatra:feat/recent-search-history
Open

feat(compare): add recent comparison history support#6258
SujalMahapatra wants to merge 1 commit into
JhaSourav07:mainfrom
SujalMahapatra:feat/recent-search-history

Conversation

@SujalMahapatra

Copy link
Copy Markdown

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

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs)

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:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have started the repo.
  • I have made sure that i have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown
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.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Size Report (Gzipped Sizes)

Asset PR Size Base Size Difference Status
static/chunks/1359-[hash].js 15.53 KB 15.74 KB -0.21 KB (-1.33%) 🟢 Improvement
static/chunks/1841-[hash].js 2.17 KB - +2.17 KB (++100%) 🆕 New
static/chunks/3981-[hash].js - 2.25 KB -2.25 KB (-100.00%) 🗑️ Deleted
static/chunks/6043-[hash].js - 3.70 KB -3.70 KB (-100.00%) 🗑️ Deleted
static/chunks/9876-[hash].js 3.04 KB - +3.04 KB (++100%) 🆕 New
static/chunks/app/(root)/dashboard/[username]/page-[hash].js 41.02 KB 40.50 KB +0.53 KB (+1.30%) 🔴 Regression
static/chunks/app/(root)/dashboard/error-[hash].js 1.22 KB 1.37 KB -0.15 KB (-11.06%) 🟢 Improvement
static/chunks/app/compare/page-[hash].js 15.16 KB 14.56 KB +0.59 KB (+4.07%) 🔴 Regression
static/chunks/app/generator/page-[hash].js 26.53 KB 26.86 KB -0.33 KB (-1.22%) 🟢 Improvement
static/css/[hash].css 37.15 KB 36.65 KB +0.49 KB (+1.35%) 🔴 Regression

📊 Summary of Totals

Category PR Size Base Size Difference
Total JS 3699.00 KB 3700.29 KB -1.29 KB (-0.03%)
Total CSS 296.63 KB 290.22 KB +6.41 KB (+2.21%)

@github-actions github-actions Bot added the type:feature New features, additions, or enhancements label Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New features, additions, or enhancements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Extend Recent Search History Support Across Repository Analysis Tools

1 participant