Skip to content

Add stale pr indicators#320

Closed
Mash4-4-4-4 wants to merge 4 commits into
Priyanshu-byte-coder:mainfrom
Mash4-4-4-4:add-stale-pr-indicators
Closed

Add stale pr indicators#320
Mash4-4-4-4 wants to merge 4 commits into
Priyanshu-byte-coder:mainfrom
Mash4-4-4-4:add-stale-pr-indicators

Conversation

@Mash4-4-4-4
Copy link
Copy Markdown

Summary

Added stale PR indicators in the PR Analytics section to help users quickly identify pull requests that have been open for too long.

Closes #257

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup

Changes Made

  • Added stale PR detection logic based on configurable thresholds
  • Added threshold selector for 7 / 14 / 30 days
  • Added stale PR count chip in the PR Analytics section
  • Added stale PR list with orange "Stale" badges
  • Added clickable links to open stale PRs directly
  • Extended PR metrics API response to include PR metadata required for stale calculations

How to Test

Steps for the reviewer to verify this works:

  1. Open the dashboard page
  2. Navigate to the PR Analytics section
  3. Verify stale PR count appears above the metrics cards
  4. Change the threshold dropdown between 7 / 14 / 30 days
  5. Confirm stale PR count updates correctly
  6. Verify stale PRs display orange "Stale" badges
  7. Click a stale PR entry and verify it opens the corresponding GitHub PR link

Screenshots (if UI change)

Screenshot 2026-05-18 183221

Added stale PR indicators, threshold selector, and stale PR list in the PR Analytics section.

Checklist

  • Linked issue in summary
  • npm run lint passes locally
  • No TypeScript errors (npm run type-check)
  • Self-reviewed the diff
  • Added/updated tests if applicable

@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

@Mash4-4-4-4 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

This PR conflicts with recently merged changes. Please rebase onto main:

git fetch upstream && git rebase upstream/main

Resolve any conflicts, push, and I'll review.

@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

Hi @Mash4-4-4-4 — this PR has a merge conflict with main. Please rebase your branch:

git fetch upstream
git rebase upstream/main
# resolve conflicts, then:
git push --force-with-lease

Once rebased, we'll review and merge.

@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

Three issues before merge:

1. session?.user?.name is wrong in BackToDashboard.tsx

session.user.name is the GitHub display name (e.g. "John Doe"), not the login (e.g. "johndoe"). The comparison currentUser === username will fail for anyone whose display name doesn't exactly match their GitHub login.

Fix:

const currentUser = session?.githubLogin;  // not session?.user?.name

2. Remove accidental unrelated file changes

The diff includes unrelated changes to:

  • streak/route.ts — removes unused activeDates variable declaration and adds blank lines. These are not part of this feature; clean them out.
  • u/[username]/page.tsx — only formatting changes (blank line, reformatted block). Revert these.

3. prs/route.ts indentation inconsistent

The changes to prs/route.ts have mixed indentation (some blocks at column 0). Run npm run lint --fix and ensure consistent 2-space indentation before pushing.

Fix these three and the stale PR indicator feature itself looks good.

@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

Closing in favour of #396 which is the focused version of this feature (stale PR indicators only, as requested in #257).

This PR bundles unrelated changes (BackToDashboard.tsx, streak/route.ts, u/[username]/page.tsx) alongside the stale PR feature. Those should be submitted as separate PRs if they aren't already covered elsewhere.

Please address the review comments on #396 and track other changes as individual PRs.

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.

[FEAT] Add stale PR detector — highlight PRs open for more than N days

2 participants