Description
We are updating the current leaderboard to feature a streak-based ranking system rather than purely aggregate totals. The goal is to highlight project momentum and consistent contributions. If an open-source repository or user meets a specific issue-closure threshold within a given timeframe, they will be added to the leaderboard with their current streak displayed.
Additionally, we need a hoverable info box (tooltip) on the UI to clearly explain the underlying mechanics of how these streaks are calculated to the end-users.
User Story
As an open-source contributor or maintainer viewing the dashboard, I want to see a leaderboard based on activity streaks and an explanation of how those streaks are calculated, so that I can easily identify the most consistently active projects and users.
Acceptance Criteria
- Streak Calculation: The system calculates a "streak" based on a user or repository closing at least [X] issues within a [defined time period, e.g., 7-day rolling window].
- Leaderboard UI: The leaderboard component displays qualifying users/repos sorted descending by their active streak count.
- Streak Indicator: The UI clearly displays the streak count next to the entity's name (e.g., " [emoji] 4-week streak").
- Info Box / Tooltip: A small info icon (e.g., an "i" in a circle) is rendered next to the Leaderboard title.
- Tooltip Behavior: Hovering over (or focusing on) the info icon displays a text box explaining the streak criteria: "A streak increases for every consecutive [time period] where a user/repo closes at least [X] issues. Streaks reset to zero if the threshold is not met."
- Accessibility: The tooltip must be keyboard accessible (trigger on focus) and have appropriate ARIA labels.
Implementation Notes
- Frontend: * Update the existing React leaderboard component to accept and render the new streakCount prop.
- Backend / Data: * The query pulling the leaderboard data will need to be updated to calculate consecutive periods of activity.
- should not be done dynamically as it would take far too long. should set a specific trigger at which the leaderboard updates (maybe once a week)
Testing Notes
- Logic Tests: Verify the streak calculation correctly increments for continuous activity, resets to 0 when a period is missed, and accurately handles edge cases (like a user closing issues on the boundary line of the time period).
- UI/UX Tests: Ensure the tooltip renders correctly on hover, does not flicker, and is readable on both mobile and desktop views.
- Sorting Tests: Verify the leaderboard correctly sorts ties (e.g., secondary sort by total issues closed or alphabetical).
Dependencies
Backend API update to expose currentStreak data in the leaderboard payload.
Description
We are updating the current leaderboard to feature a streak-based ranking system rather than purely aggregate totals. The goal is to highlight project momentum and consistent contributions. If an open-source repository or user meets a specific issue-closure threshold within a given timeframe, they will be added to the leaderboard with their current streak displayed.
Additionally, we need a hoverable info box (tooltip) on the UI to clearly explain the underlying mechanics of how these streaks are calculated to the end-users.
User Story
As an open-source contributor or maintainer viewing the dashboard, I want to see a leaderboard based on activity streaks and an explanation of how those streaks are calculated, so that I can easily identify the most consistently active projects and users.
Acceptance Criteria
Implementation Notes
Testing Notes
Dependencies
Backend API update to expose currentStreak data in the leaderboard payload.