Skip to content

[do not merge] Patch series for millionco/react-doctor leaderboard#1

Draft
aidenybai wants to merge 3 commits into
mainfrom
cursor/leaderboard-patch-for-react-doctor-fff2
Draft

[do not merge] Patch series for millionco/react-doctor leaderboard#1
aidenybai wants to merge 3 commits into
mainfrom
cursor/leaderboard-patch-for-react-doctor-fff2

Conversation

@aidenybai
Copy link
Copy Markdown
Member

@aidenybai aidenybai commented May 8, 2026

This PR is not meant to merge into react-doctor-benchmarks. It exists only to make a patch series visible.

Why this exists

The user asked the cloud agent to add a leaderboard to millionco/react-doctor (packages/react-doctor's README + a website /leaderboard page) using results/leaderboard.json from this benchmarks repo. The agent runs with a token scoped to react-doctor-benchmarks and cannot push branches to react-doctor, so the work is parked here as a patch series.

What's in the patch

.cursor-out/react-doctor-leaderboard/0001-leaderboard.patch is a git format-patch series with five commits to apply on top of millionco/react-doctor:main:

  1. feat(scripts): sync leaderboard data from react-doctor-benchmarks
    • Adds scripts/sync-leaderboard.ts. Fetches https://raw.githubusercontent.com/millionco/react-doctor-benchmarks/main/results/leaderboard.json (or a local file when passed as arg). Writes the full blob to packages/website/src/app/leaderboard/leaderboard-data.json. Splices a top-10 markdown table into packages/react-doctor/README.md between <!-- LEADERBOARD:START --> / <!-- LEADERBOARD:END -->. Idempotent.
    • Adds a leaderboard:sync package script.
    • Seeds leaderboard-data.json with the latest blob.
  2. docs(react-doctor): add leaderboard section synced via CI
    • Adds the ## Leaderboard section to packages/react-doctor/README.md (top 10, link to https://github.com/millionco/react-doctor-benchmarks/tree/main, no em dashes).
  3. feat(website): add /leaderboard page
    • Restores packages/website/src/app/leaderboard/page.tsx. Matches the existing /share page style (doctor face mirrors top score, score bars, share-page links per project). Reads from the static leaderboard-data.json. revalidate = 3600.
  4. ci: refresh leaderboard from react-doctor-benchmarks
    • Adds .github/workflows/refresh-leaderboard.yml. Runs daily, plus workflow_dispatch and repository_dispatch: leaderboard-updated. Pipeline: pnpm installnode sync-leaderboard.tspnpm format → commit and push if anything changed. The format step is required so the auto-commit lands in canonical style and main CI's format:check stays green.
  5. chore: drop bench:scores in favor of the synced leaderboard
    • Removes scripts/benchmark-scores.ts and the bench:scores package script. It was a hand-rolled artifact downloader for terminal viewing; leaderboard.json is now the canonical consumer blob, so the duplicate fetcher has no remaining users.

Verified locally: pnpm typecheck, pnpm lint, pnpm format:check, pnpm test, and pnpm --filter website build all pass. The CI flow was simulated end to end (sync writes unaligned tables → format reformats → format:check passes).

How to apply

git clone https://github.com/millionco/react-doctor.git
cd react-doctor
curl -sSfL https://raw.githubusercontent.com/millionco/react-doctor-benchmarks/cursor/leaderboard-patch-for-react-doctor-fff2/.cursor-out/react-doctor-leaderboard/0001-leaderboard.patch -o /tmp/leaderboard.patch
git checkout -b cursor/leaderboard-from-benchmarks
git am /tmp/leaderboard.patch
git push -u origin cursor/leaderboard-from-benchmarks

Then open a PR against millionco/react-doctor:main. Or, easier: spawn a new cloud agent inside millionco/react-doctor with this same prompt and it'll be able to push directly.

This PR can be closed once the patch has been applied to the right repo.

Open in Web Open in Cursor 

cursoragent and others added 3 commits May 8, 2026 11:13
The cloud agent that produced this is scoped to react-doctor-benchmarks
and cannot push to millionco/react-doctor. Park the patch series here so
the user can git am it onto a react-doctor checkout. See
.cursor-out/react-doctor-leaderboard/README.md for details.

Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
The refresh-leaderboard workflow now runs pnpm format after the sync
script so the auto-commit lands in canonical style and main CI's
format:check stays green.

Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
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.

2 participants