Skip to content

feat: reviewers / issues / opened-PR leaderboards#231

Merged
Progi1984 merged 4 commits into
PrestaShop:developfrom
PrestaEdit:feat/top-stats-leaderboards
Jun 30, 2026
Merged

feat: reviewers / issues / opened-PR leaderboards#231
Progi1984 merged 4 commits into
PrestaShop:developfrom
PrestaEdit:feat/top-stats-leaderboards

Conversation

@PrestaEdit

Copy link
Copy Markdown
Contributor

⚠️ Draft — depends on PrestaShop/traces#232. The new sections currently render mocked data; they show real numbers once Traces produces the ranking files and they're published to public/.

Summary

Adds three new "Top" leaderboards next to the existing Contributors/Companies sections, to surface contribution types that are invisible today:

  • 👀 Top reviewers — distinct PRs reviewed
  • 🐛 Top issue reporters — issues opened
  • 🔀 Top PR authors — pull requests opened

How it works

  • A single reusable TopRankingView.vue renders each leaderboard through the existing generic TopCard (rank medal, avatar, name, count column, GitHub profile link).
  • app.vue fetches three pre-sorted ranking files (top_reviewers.json, top_issues.json, top_pullrequests.json) and passes them to TopSectionView; a section whose ranking is empty/missing is hidden (no crash).
  • New types RankingEntry / Ranking and three optional counters (reviews, issuesOpened, pullRequestsOpened) on Contributor form the data contract.
  • A deterministic generator (scripts/generate-mock-stats.mjs) produces mock ranking files so the UI can be reviewed now. These files are gitignored (generated by Traces in production), consistent with the existing public/*.json datasets.

Data dependency

Real data is produced by the Traces CLI — see PrestaShop/traces#232 (adds traces:fetch:issues, traces:fetch:pullrequests:all, traces:generate:topstats). Once merged and deployed, the three ranking files join the published dataset and these sections show real figures.

Test Plan

  • vitest run — green (TopRankingView + TopSectionView component tests, incl. empty-ranking-hidden case)
  • eslint . — clean
  • Visual check once real Traces data is wired

Add three new "Top" leaderboards (reviewers, issue reporters, PR authors)
alongside the existing contributors/companies sections, driven by a shared
ranking data contract.

- types: RankingEntry / Ranking + reviews / issuesOpened / pullRequestsOpened
  counters on Contributor
- TopRankingView: reusable leaderboard card built on the existing TopCard
  (rank medal, avatar, name, count column, GitHub profile link)
- app.vue / TopSectionView: fetch the three ranking files and render a card
  per metric, hidden when its ranking is empty
- deterministic mock-data generator (scripts/generate-mock-stats.mjs) so the
  UI can be reviewed before the data pipeline lands
- vitest coverage for the new components

Note: ranking data is currently mocked. Real data comes from the Traces
pipeline — see PrestaShop/traces#232.

🤖 Generated with Claude Code
@Progi1984

Copy link
Copy Markdown
Member

@PrestaEdit Traces is Merged and released.

Could you check your PR and give us screenshots or vidéo for checking the behavior ? Thanks

Add traces:fetch:pullrequests:all / traces:fetch:issues / traces:generate:topstats
to the scheduled Build & Deploy pipeline, and publish top_reviewers.json,
top_issues.json and top_pullrequests.json to the site. Requires prestashop/traces
>= v6.3.0 (pulled by composer create-project).

🤖 Generated with Claude Code
Comment thread scripts/generate-mock-stats.mjs Outdated
@@ -0,0 +1,62 @@
// Deterministic mock generator for the Top stats leaderboards.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can remove it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed in 8ddaf39 — real ranking data now comes from prestashop/traces v6.3.0 via the Build & Deploy workflow, so the temporary mock generator is no longer needed.

Comment thread .gitignore Outdated
Comment on lines +34 to +37
# Superpowers brainstorm (transient)
.superpowers/
# Superpowers workflow docs (kept local only)
docs/superpowers/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
# Superpowers brainstorm (transient)
.superpowers/
# Superpowers workflow docs (kept local only)
docs/superpowers/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed in 508a043 (both superpowers .gitignore entries).

PrestaEdit and others added 2 commits June 30, 2026 09:38
Real ranking data is now produced by prestashop/traces v6.3.0 via the
Build & Deploy workflow, so the temporary mock generator is no longer needed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-project-automation github-project-automation Bot moved this to Ready for review in PR Dashboard Jun 30, 2026
@PrestaEdit

PrestaEdit commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

The three new leaderboards render as expected — screenshots below.

⚠️ Figures are demo (mock) data for now. Real numbers will populate automatically once the scheduled Build & Deploy runs: prestashop/traces v6.3.0 now ships traces:fetch:pullrequests:all / traces:fetch:issues / traces:generate:topstats, and this PR updates gh-pages.yml to run them and publish top_reviewers.json / top_issues.json / top_pullrequests.json.

  • 👀 Top reviewers — distinct PRs reviewed (self-reviews excluded)
  • 🐛 Top issue reporters — issues opened (PRs excluded)
  • 🔀 Top PR authors — pull requests opened (any state)

Each card reuses the existing TopCard (rank medals, avatar, dedicated count column, GitHub profile link, pagination — top 25).

Screenshots: Top reviewers / Top issue reporters / Top PR authors ⬇️
image-1782812107078
image-1782812115060
image-1782812121507

@Progi1984
Progi1984 marked this pull request as ready for review June 30, 2026 16:14
@Progi1984
Progi1984 merged commit 424d13e into PrestaShop:develop Jun 30, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for review to Merged in PR Dashboard Jun 30, 2026
@PrestaEdit

PrestaEdit commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up moved to its own PR (this one was already merged): #233 — full-population Wall-of-Fame tabs (Reviewers / Issue reporters / PR authors) + Top-50 cap. Depends on PrestaShop/traces#233.

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

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants