Skip to content

feat: add Agentic AI Contribution Recommender Engine (Issue #611)#614

Open
adityapichikala wants to merge 2 commits into
GitMetricsLab:mainfrom
adityapichikala:feat/agentic-contribution-recommender
Open

feat: add Agentic AI Contribution Recommender Engine (Issue #611)#614
adityapichikala wants to merge 2 commits into
GitMetricsLab:mainfrom
adityapichikala:feat/agentic-contribution-recommender

Conversation

@adityapichikala
Copy link
Copy Markdown
Contributor

@adityapichikala adityapichikala commented May 29, 2026

Related Issue


Description

Implements the Agentic AI Contribution Recommender Engine proposed in Issue #611.

Instead of a Python microservice (optional future follow-up), this PR delivers a fully client-side, three-step agentic pipeline that runs in the browser using the user's own GitHub token — keeping the PR self-contained with zero backend changes required.

🧠 Architecture: Multi-Step Agentic Pipeline

[Step 1] Skill Profiler → GET /users/{username}/repos → Scores languages weighted by recency + star count → Infers domains: frontend / backend / devops / mobile / data → Determines activity level: high / medium / low

[Step 2] Issue Scout (non-blocking, Promise.allSettled) → Parallel GitHub Search API queries: top 3 languages × ["good first issue", "help wanted"] → Deduplicates results across all queries

[Step 3] Relevance Ranker → Scores each issue: language rank ×30, label quality ×25, star count ×0.1, recency ×20 → Fetches repo metadata for top 15 candidates → Returns top 3 ranked recommendations

✨ New Files

  • src/hooks/useContributionRecommender.ts — core agentic pipeline hook with session-level caching (useRef) to avoid redundant API calls
  • src/components/ContributionRecommender.tsx — premium glassmorphism widget featuring:
    • Gradient accent bar + indigo/sky branded header
    • Skill profile badge row (detected languages + pulsing activity dot)
    • Animated 3-step progress bar + shimmer skeleton during loading
    • Framer-motion stagger card animations
    • Per-card: repo name, star count, issue title linked to GitHub, "Why this matches you" reasoning box, labels, Beginner/Intermediate difficulty badge, "View Issue →" CTA
    • Error state with Retry button, empty state guidance
    • ↺ Refresh button to force re-run pipeline

🔧 Modified Files

  • src/pages/Tracker/Tracker.tsx — integrates widget below DailyActivityStatus, auto-triggers on username submit
  • src/index.css — adds @keyframes recommender-pulse (activity dot) and @keyframes recommender-shimmer (loading skeleton)
  • backend/.env.example — documents future GITHUB_SERVER_TOKEN for the optional Python microservice follow-up

How Has This Been Tested?

  1. Navigated to /track, entered a GitHub username (with and without a PAT)
  2. Verified the widget auto-runs after username submission and the 3-step progress bar advances: Building profile → Scouting issues → Ranking
  3. Confirmed skill badge row shows correct detected languages with matching color dots
  4. Verified 3 recommendation cards render with repo name, star count, issue title, reasoning text, labels, and difficulty badge
  5. Clicked "View Issue →" links — all resolve to valid open GitHub issues
  6. Clicked ↺ Refresh — pipeline re-runs with fresh API calls
  7. Tested rate-limit error state (unauthenticated) — graceful warning with Retry button shown
  8. Verified session caching — navigating away and back does not re-trigger API calls
  9. Ran npm run build✓ 3027 modules transformed, zero TypeScript errors, built in 21s

Screenshots (if applicable)

Widget renders below the Daily Activity section on the /track page with:

  • Indigo/sky gradient header bar + AI Contribution Recommender title
  • Skill profile badges (e.g. ● TypeScript, ● Python, ● Go) + activity pulse
  • 3 animated recommendation cards with language dot, repo, issue, reasoning, labels, CTA

Type of Change

  • Bug fix
  • New feature
  • Code style update
  • Breaking change
  • Documentation update

Summary by CodeRabbit

  • New Features

    • Added AI-powered contribution recommendations that analyze your GitHub activity and suggest personalized "good first issue" opportunities matched to your skill level and language expertise
    • Displays your developer profile with activity level, top languages, and recommended contribution areas
  • Chores

    • Updated environment configuration template

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 29, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit bb8858b
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a19d5f2f62ccf000811c917
😎 Deploy Preview https://deploy-preview-614--github-spy.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
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

Warning

Review limit reached

@adityapichikala, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 31 minutes and 9 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b4190d36-6381-45c2-83c7-aea82dba979d

📥 Commits

Reviewing files that changed from the base of the PR and between c752ab0 and bb8858b.

📒 Files selected for processing (4)
  • src/components/ContributionRecommender.tsx
  • src/hooks/useContributionRecommender.ts
  • src/index.css
  • src/pages/Tracker/Tracker.tsx
📝 Walkthrough

Walkthrough

This PR introduces an AI-powered contribution recommender that analyzes a GitHub user's coding patterns and recommends open-source issues they are best positioned to contribute to. It builds a skill profile from public repositories, scouts matching issues via GitHub API searches, ranks them by relevance, and displays the top 3 through an interactive animated component integrated into the Tracker dashboard.

Changes

AI Contribution Recommender

Layer / File(s) Summary
Recommendation Engine Hook
src/hooks/useContributionRecommender.ts
SkillProfile and Recommendation types define the recommendation data model. The hook infers top languages (weighted by recency and star count), detects domains from repository names, calculates 90-day activity level, scouts open/public GitHub issues labeled good first issue and help wanted, enriches results with repository metadata, scores each by language rank, label alignment, capped star signal, and issue age, returns top 3 ranked entries, and caches per-username to avoid session reruns. Error handling maps GitHub 403 to rate-limit message, 404 to user-not-found, and generic fallback for connectivity issues.
UI Components and Styling
src/components/ContributionRecommender.tsx, src/index.css
Language color map and agent step labels are defined locally. Subcomponents render language/difficulty badges, a recommendation card with repo/issue links, star formatting, match reasoning, and labels. LoadingSkeleton shows an animated step indicator and shimmer placeholders. SkillProfileRow displays inferred languages and activity. Main component auto-runs once per username (with ref-based deduplication), exposes manual refresh and error retry, conditionally renders skill summary, loading animation, error alert, result list with Framer Motion transitions, and empty state. CSS adds flow-line styling, recommender-pulse and recommender-shimmer animations, card hover effects, and step-bar transitions.
Page Integration and Configuration
src/pages/Tracker/Tracker.tsx, backend/.env.example
ContributionRecommender is imported and mounted conditionally when submittedUsername is set, passing through username and getOctokit props. Environment documentation notes an optional GITHUB_SERVER_TOKEN for future asynchronous Python microservice tasks (Issue #611).

Sequence Diagram

sequenceDiagram
  participant User as User / Tracker
  participant Component as ContributionRecommender
  participant Hook as useContributionRecommender
  participant GitHub as GitHub API

  User->>Component: Mount with username + getOctokit
  Component->>Hook: runRecommender(username)
  Note over Hook: agentStep = "building-profile"
  Hook->>GitHub: Fetch user repositories
  GitHub-->>Hook: Repos (languages, stars, recency)
  Note over Hook: agentStep = "scouting-issues"
  Hook->>GitHub: Search good-first-issue + help-wanted<br/>(across top languages)
  GitHub-->>Hook: Candidate issues
  Note over Hook: agentStep = "ranking-matches"
  Hook->>GitHub: Fetch repository metadata for candidates
  GitHub-->>Hook: Repo data (stars, owner, etc.)
  Hook->>Hook: Compute match scores & rank
  Hook-->>Component: recommendations[], skillProfile, agentStep
  Component->>Component: Render skill profile + results list
  Component->>User: Display top 3 recommendations
  User->>Component: Click refresh button
  Component->>Hook: runRecommender(username, force=true)
  Hook-->>Component: Updated recommendations
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested labels

level:advanced, type:feature, quality:clean

Poem

🐰 Hops through the GitHub API with glee,
Matching your skills to where you ought to be!
Python? TypeScript? Let's search and find,
The perfect issue, tailor-designed.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely summarizes the main change: adding an Agentic AI Contribution Recommender Engine tied to Issue #611.
Description check ✅ Passed The PR description is comprehensive, follows the template structure, includes Related Issue, detailed Description with architecture overview, testing methodology, and Type of Change selection.
Linked Issues check ✅ Passed All primary coding objectives from Issue #611 are met: multi-agent pipeline (skill profiler, issue scout, relevance ranker) [#611], asynchronous non-blocking API calls [#611], top 3 recommendations with explanations [#611], and frontend widget integration [#611].
Out of Scope Changes check ✅ Passed All changes are directly scoped to Issue #611 objectives. The three new core files (hook, component, CSS) and two modified files (Tracker integration, .env documentation) align with the agentic pipeline and widget requirements; no unrelated changes detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

…sLab#611)

- Add useContributionRecommender hook with 3-step agentic pipeline:
  * Step 1 (Skill Profiler): fetches user repos, detects top languages
    weighted by recency and stars, infers domain (frontend/backend/devops)
  * Step 2 (Issue Scout): searches GitHub for open issues tagged
    'good first issue' or 'help wanted' matching top languages,
    using Promise.allSettled for non-blocking async parallelism
  * Step 3 (Relevance Ranker): scores issues by language rank,
    label quality, repo star count, and recency; returns top 3

- Add ContributionRecommender.tsx widget with premium glassmorphism UI:
  * Gradient accent bar and indigo/sky branded header with Sparkles icon
  * Skill profile badge row showing detected languages + activity level
  * Loading state with animated 3-step progress bar and shimmer skeleton
  * Framer-motion stagger animations on recommendation cards
  * Each card: repo name, star count, issue title, 'Why this matches you'
    reasoning box, labels, difficulty badge (Beginner/Intermediate), CTA
  * Error/empty states with retry button
  * Session-level caching via useRef to avoid redundant API calls
  * Refresh button to force re-run

- Integrate widget into Tracker.tsx below DailyActivityStatus
- Add @Keyframes recommender-pulse and recommender-shimmer to index.css
- Document future GITHUB_SERVER_TOKEN env var in backend/.env.example

Closes GitMetricsLab#611
@adityapichikala adityapichikala force-pushed the feat/agentic-contribution-recommender branch from de48013 to 37ef3a6 Compare May 29, 2026 17:45
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/hooks/useContributionRecommender.ts`:
- Around line 139-149: The current scoutIssues implementation maps queries to
octokit.request calls but swallows every request error with .catch(() => []), so
Promise.allSettled never sees rejections; remove the per-request .catch on the
octokit.request in the searchRequests creation inside useContributionRecommender
(the mapped call that builds searchRequests) and instead await
Promise.allSettled(searchRequests) in scoutIssues/runRecommender, inspect each
settled result (status === 'fulfilled' collect value, status === 'rejected'
collect errors), and if all are rejected throw one of the errors (or a composed
error) to surface auth/rate-limit/validation failures to the outer try/catch; if
some are fulfilled, use those partial results (combine fulfilled values) rather
than treating a mixed outcome as an empty result.
- Around line 329-409: The runRecommender pipeline can be overwritten by slower,
earlier runs; add a run guard (request id or AbortController) inside
runRecommender to ignore stale results: create a local runId (or controller) at
the start of runRecommender, store it in a ref (e.g., currentRunRef), and check
it before setting state and before caching (references: runRecommender,
cacheRef, setSkillProfile, setRecommendations, setRecommenderError,
setRecommenderLoading, setAgentStep); ensure any async branches return early if
the runId no longer matches (or if the controller is aborted) so only the latest
invocation updates state and cache.
- Around line 126-167: scoutIssues currently returns only GitHubSearchIssue[]
which loses the query language; modify scoutIssues to carry the original query
language and computed langRank through to ranking (either return an array of {
issue, matchedLanguage, langRank } or build and return a Map keyed by issue.id
with {matchedLanguage, langRank}), ensure you de-duplicate by keeping the lowest
langRank when an issue appears in multiple queries, and update
rankIssues/scoreIssue/computeMatchReason to read matchedLanguage/langRank from
the new structure instead of inferring from labels (use
skillProfile.topLanguages to compute langRank consistently).
- Around line 121-123: The buildSearchQuery function is incorrectly replacing
spaces inside quoted labels and omitting the is:issue filter; update
buildSearchQuery(language: string, label: string) to keep the label verbatim
inside the quotes (do not replace spaces with '+') and include the is:issue
token in the returned query string (e.g., add +is:issue) so the GET
/search/issues request only returns issues; refer to the buildSearchQuery
function to make this change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4d62833f-3c33-4e04-8d9b-3e43b08b5a75

📥 Commits

Reviewing files that changed from the base of the PR and between e7b8fc8 and c752ab0.

📒 Files selected for processing (5)
  • backend/.env.example
  • src/components/ContributionRecommender.tsx
  • src/hooks/useContributionRecommender.ts
  • src/index.css
  • src/pages/Tracker/Tracker.tsx

Comment thread src/hooks/useContributionRecommender.ts Outdated
Comment thread src/hooks/useContributionRecommender.ts
Comment thread src/hooks/useContributionRecommender.ts Outdated
Comment thread src/hooks/useContributionRecommender.ts
- Fix search query construction to preserve spaces and include is:issue
- Preserve language query context from scout to ranker to avoid inaccurate inference
- Throw error on all search queries failing to properly bubble up rate limit / auth errors
- Add requestId guard in runRecommender to prevent stale concurrent runs
- Remove unused DailyActivityStatus and Backtotop imports from Tracker.tsx
@adityapichikala
Copy link
Copy Markdown
Contributor Author

hi @mehul-m-prajapati ,
check it out ,i made the relevant changes ,if anything needs to be changed remind me ,i would love to do it as gssoc 2026 contributor

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🚀 Feature: Agentic AI Contribution Recommender Engine

1 participant