Skip to content

fix: search matching aggregate metrics on people page - #161

Merged
naman79820 merged 1 commit into
CircuitVerse:mainfrom
haaasini01:fix-people-search-username-only-#159
Jan 9, 2026
Merged

fix: search matching aggregate metrics on people page#161
naman79820 merged 1 commit into
CircuitVerse:mainfrom
haaasini01:fix-people-search-username-only-#159

Conversation

@haaasini01

@haaasini01 haaasini01 commented Jan 8, 2026

Copy link
Copy Markdown

Description

this PR fixes an issue where the search bar on the people page was matching aggregate values such as total contributors and total points along with contributor usernames
the search behavior is now limited to filtering contributors by username only, making it clearer

Related Issue

Fixes #159

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation

Checklist

  • Code follows project style
  • Tested locally
  • No unnecessary files added
  • PR title is clear and descriptive

Screenshots (if applicable)

after
image

Summary by CodeRabbit

  • New Features

    • Added a contributors summary row displaying the current filtered contributor count with dynamic text labels.
    • Repositioned search functionality within the updated page layout.
  • Style

    • Reorganized header structure for improved visual hierarchy.
    • Adjusted spacing throughout the contributors section.

✏️ Tip: You can customize this high-level summary in your review settings.

@netlify

netlify Bot commented Jan 8, 2026

Copy link
Copy Markdown

Deploy Preview for cv-community-dashboard ready!

Name Link
🔨 Latest commit c58df31
🔍 Latest deploy log https://app.netlify.com/projects/cv-community-dashboard/deploys/69600d27593f7700087ec321
😎 Deploy Preview https://deploy-preview-161--cv-community-dashboard.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jan 8, 2026

Copy link
Copy Markdown

Walkthrough

The pull request modifies app/people/page.tsx to restructure the contributor page layout. The search input was relocated from the header title area to a separate section. A new contributors summary row was added displaying the filtered contributor count along with "Contributor" or "Contributors" text. The header section was reorganized with improved spacing. A Users icon from lucide-react was imported. The layout now presents the summary row and search input side-by-side with other page content.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and specifically describes the main change: fixing search behavior to match only usernames instead of aggregate metrics on the people page.
Description check ✅ Passed The PR description follows the template with all required sections completed: description, related issue, type of change marked, checklist items checked, and a screenshot provided.
Linked Issues check ✅ Passed The code changes successfully address the linked issue #159 by restricting search filtering to contributor usernames only, preventing aggregate metric matches as described in the bug report.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the search functionality on the people page to match only contributor usernames, with no unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eca4cb9 and c58df31.

📒 Files selected for processing (1)
  • app/people/page.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
app/people/page.tsx (1)
components/ui/input.tsx (1)
  • Input (21-21)
🔇 Additional comments (4)
app/people/page.tsx (4)

6-6: LGTM! Users icon import is appropriate.

The Users icon is correctly imported and used in the contributor count display section.


265-278: LGTM! Header restructuring improves layout clarity.

The separation of title and description into distinct blocks with clear comments enhances maintainability. The spacing adjustment (mb-6) provides appropriate visual hierarchy.


91-101: Filtering logic correctly excludes aggregate data.

The useMemo-based filtering appropriately filters only by name and username fields, ensuring aggregate metrics like total_points and activity counts are not matched during search. This logic has remained unchanged and is correct.


287-308: The fix correctly resolves the aggregate metrics search issue.

The PeopleStats component now receives filteredPeople and calculates aggregate metrics (totalContributors, totalPoints, averagePoints) from the filtered dataset rather than the full dataset. This means when users search for a name or username, the stats dynamically update to reflect only matching contributors, and aggregate numbers can no longer be matched by search queries.

The structure is sound: the topContributors ranking appropriately uses allContributors for global rankings while aggregate metrics reflect the filtered set.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@haaasini01

Copy link
Copy Markdown
Author

@naman79820

@Heyy-Himanshuu Heyy-Himanshuu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed , looks good to me @naman79820 !

@haaasini01

haaasini01 commented Jan 9, 2026

Copy link
Copy Markdown
Author

hey @naman79820 @Atharva7126 can you merge this PR of mine
I can't seem to work on anything rn, the bot wouldn't assign any issues to me bcuz of an open issue
ty

@naman79820
naman79820 self-requested a review January 9, 2026 16:57
@naman79820
naman79820 merged commit 2339e60 into CircuitVerse:main Jan 9, 2026
5 checks passed
@naman79820

Copy link
Copy Markdown
Member

Thankss @haaasini01

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search bar matches aggregate stats instead of only contributor names

3 participants