Skip to content

feat(website): add contributors page - #9439

Merged
Xuanwo merged 6 commits into
apache:mainfrom
mattheliu:website-contributors
Dec 1, 2026
Merged

Xuanwo merged 6 commits into
apache:mainfrom
mattheliu:website-contributors

Conversation

@mattheliu

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #9438.

Rationale for this change

Agreed in #9380: a page that credits everyone who has contributed to OpenDAL (commits, reviews, issues and discussions) without ranking anyone.

What changes are included in this PR?

  • website/scripts/contributors/: pnpm contributors reads commits (with co-authors), reviews on merged PRs, issues and discussions from the GitHub GraphQL API into website/.cache/contributors/. It credits each commit to the first release tag that contains it, and downloads the avatars, so the pages make no third-party requests. Later runs fetch only what changed. Without a token it builds from the cache, and a failed fetch never fails the build.
  • website/plugins/contributors-plugin.js adds /community/contributors and /community/contributors/<login>/ from that data. Without data, the landing page is still built and says so.
  • website/src/components/contributors/ holds the two pages. The text renders on the server. The card (a canvas), the ring, the wall and the lists are plain DOM code, mounted in useEffect and cleaned up on navigation. The styles use the site's --odl-* tokens and are scoped under .odl-contributors.
  • The website workflows get a fetch step that uses the workflow token, and a daily actions/cache entry for the data.
  • A sidebar link, a line on the Community page, a README section, and tests.

Notes for review:

  • What counts. Reviews: the latest review from each reviewer on a merged PR, including comment-only reviews but not reviews of your own PR. Issues: every opened issue except duplicates, invalid and spam. Discussions: ones started, plus accepted answers in other people's discussions.
  • Removal. Anyone can be left out through exclude in config.mjs; everyone else's numbers stay the same. The page asks people to open an issue for this.
  • Contrast. --odl-fg-subtle and the breadcrumb grey are a step darker inside these pages, so small text meets WCAG AA.
  • Build. Locally the build took 22s without the data and 30–34s with all 683 contributor pages. The pages don't go into the search index.
  • CI cost. A run with an empty cache makes about 200 GraphQL requests; daily runs after that make a few.
  • Size. About 3.6k lines, mostly client code (the card renderer is about 600). I'm happy to split it, for example landing page first, if that's easier to review.

Are there any user-facing changes?

Yes: a new Contributors page under Community, linked from the Community sidebar and the Community page. Nothing else changes.

Breaking changes

AI Usage Statement

  • Harness: Claude Code (desktop app)
  • Model: Claude Opus 5.5 (claude-opus-5-5)
  • Effort: xhigh
  • Role: Wrote most of the code, tests and text under my direction, porting my standalone prototype (linked in new feature: contributors page on the website #9438) into a Docusaurus plugin. I reviewed the changes.

Checks run locally (macOS, Node 22.23; website/.node-version asks for 24.17):

  • pnpm test: 11 tests pass (3 existing, 8 new).
  • pnpm build: passes, both with and without the contributor data.
  • typos: passes.
  • In a browser: both pages at desktop and mobile widths, in light and dark themes, with the keyboard, and moving between cards without a page reload.
  • Not run locally: hawkeye. The new files carry the same license header as the existing ones.

🤖 Generated with Claude Code

mattheliu and others added 2 commits November 30, 2026 20:56
Add /community/contributors and a page per contributor at
/community/contributors/<login>/, as discussed in apache#9380.

- `pnpm contributors` gathers the data into website/.cache/contributors/:
  commits (with co-authors), reviews on merged pull requests, issues and
  discussions from the GitHub API, release attribution from git tags, and
  the contributors' pictures, which are served with the site. Fetches are
  incremental; without a token it builds from the cache, and a failed
  fetch never fails the build.
- plugins/contributors-plugin.js adds the routes from that data. Without
  it, the landing page is still built and says there is no data.
- The landing page shows a turning ring of cards picked at random, search,
  and browsing by first letter. Nothing is ranked.
- A contributor's page has their card (it turns over), a contribution
  wall, a release ribbon, their changelog by release, and their reviews,
  issues and discussions.
- The website workflows run the fetch step with the workflow token and
  cache its output, one cache entry a day.
- Tests cover commit parsing, scope mapping, release tags, titles,
  exclusions, attribution on a small git repository, and the routes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Xuanwo Xuanwo left a comment

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.

AI-generated review.

  1. Paginate commit authors and PR reviewers. In an offline fixture with 11 distinct authors on one commit, only 10 received credit. With 11 distinct reviewers on one merged PR, only 10 reached the cache, which was marked complete. Both nested queries stop at first: 10. OpenDAL’s Swift squash in #7216 has more than ten Co-authored-by trailers. Please follow both nested connections through their last page and make sure previously truncated cache entries can be rebuilt. Commit query · Review query

  2. Keep published card numbers stable as required by #9380. The generator assigns each card its current position in first-contribution order. In the fixture, a review first counted when its PR merged, but its submission date placed the reviewer ahead of an existing contributor. That contributor’s card changed from 2 to 3. Please preserve the number already published when newly eligible activity changes the ordering. Review date · Card numbering

  3. Publish avatars only for included contributors. Generating the page once, adding the contributor to exclude, and generating it again removed their card but left their old PNG in the directory Docusaurus publishes. Please make the next build remove an opted-out contributor’s avatar from the published files as well. Avatar generation · Published directory

  4. Keep serving the last complete activity snapshot until the refresh finishes. In the offline fixture, GitHub reported another page with rateLimit.remaining = 29. The refresh overwrote the complete cache with an incomplete one, so the generator skipped activity. Docusaurus then built only 3 of the previous 683 profiles, dropping everyone credited solely for reviews, issues, or discussions. A transport error preserved all 683. The commit-only fallback is fine when no complete snapshot exists. Refresh logic · Generator

@Xuanwo

Xuanwo commented Nov 30, 2026

Copy link
Copy Markdown
Member

One more thing, can you give a preview on how it looks like along with existing opendal pages?

Address review on the contributors page:

- Read a commit's authors and a pull request's reviews to their last page
  (they stopped at ten). The caches now carry a version; one written before
  this is read again from the start, so truncated entries are rebuilt.
- Keep published card numbers. The numbering is saved with the cache and
  published as /community/contributors/numbers.json, which a build reads
  back if its cache is gone. Existing numbers never change; newcomers are
  numbered after everyone numbered before; an opted-out person's number is
  not given again and their login is not kept.
- Remove an opted-out person's picture from the published pictures: the
  folder holds exactly the pictures of the people with a card.
- When an activity refresh stops part-way (API budget), keep the last
  finished snapshot's cut-off and completeness, so the page goes on
  crediting reviews, issues and discussions.
- Read up to 100 labels per issue (was 10) when leaving out duplicates.

Tests for each, offline, with GitHub mocked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added releases-note/feat The PR implements a new feature or has a title that begins with "feat" size:XXL This PR changes 1000+ lines, ignoring generated files. website labels Dec 1, 2026
…new page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Xuanwo Xuanwo left a comment

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.

AI-generated review of 9013daf67a. The fixtures confirm that legacy caches are rescanned and nested pagination retrieves the 101st author and review. Opting out removes the contributor’s card, avatar and avatar index entry while preserving the other contributor’s number and image.

  1. A redeploy can reassign a published card number. lastNumbers() prefers the local file, and the daily Actions cache is immutable. In the fixture, one deploy published Bob as #2. Restoring the earlier cache that day gave #2 to Carol and moved Bob to #3. Using the latest published table preserved Bob’s number. Production deploys should allocate from the last published table and stop if an existing table cannot be read. Number lookup · Deploy cache
  2. An interrupted refresh can publish a mix of old and new activity. The fixture marked a reporter’s only issue as DUPLICATE, then hit the rate-limit cutoff before the next page. The saved activity still had complete: true and its old timestamp, yet the generated page dropped the reporter’s card. Keeping the last completed snapshot available to the generator until the whole refresh succeeds would apply that reclassification at the right time. Refresh and save · Snapshot selection
  3. A valid contributor ID can produce a card without a number. In the fixture, the lowercased ID of an unlinked Git author named Constructor collides with an inherited property on kept. The lookup skips allocation and the serialized card omits no. Checking Object.hasOwn(kept, id) would give that contributor a number. Number assignment

CI finished with 15 successful checks and 10 skipped, including a passing SITE BUILD. Could you share the requested preview of this PR’s Contributors page alongside the existing site pages? The linked prototype omits the site navigation. Preview request · Prototype

Address the second review of the contributors page:

- Number newcomers after the table published on the live site
  (/community/contributors/numbers.json), not after the build cache, which
  is saved once a day and can be older than the last deploy. The cached
  table is only a fallback, used before anything is published or, outside
  a deploy, when the site can't be read. The deploy in docs.yml sets
  OPENDAL_CONTRIBUTORS_STRICT=true and stops instead: when the published
  table exists but can't be read, when there is no data, or when making it
  fails. Numbering moves to numbers.mjs.
- Replace the activity snapshot only when a refresh finishes. A refresh
  works on a copy; if it stops part-way the copy is dropped, so changes
  (an issue marked duplicate, say) apply together with the rest of the
  refresh.
- Keep ids that clash with inherited object properties ("constructor")
  numbered, and their pictures looked up correctly.

Tests for each, offline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mattheliu added a commit to mattheliu/opendal-contributor-cards that referenced this pull request Dec 1, 2026
@mattheliu

Copy link
Copy Markdown
Contributor Author

Thanks! Fixed in 7a5322e, each with an offline test that fails on 9013daf:

  1. New cards are now numbered after the table on the live site (/community/contributors/numbers.json). The cached copy is only a fallback, for before anything is published. The gh-pages deploy sets OPENDAL_CONTRIBUTORS_STRICT=true and stops if the published table exists but can't be read. It also stops if there's no data or building it fails.
  2. A refresh works on a copy of the last finished snapshot, and replaces it only when it finishes. If it stops part-way, the copy is dropped, so a change like an issue being marked duplicate goes in together with the rest of that refresh.
  3. Numbering uses a Map, and the picture lookup checks own properties, so an id like constructor gets its number and picture.

Note: the cache format changed in c49b117, so the first run after this re-reads everything from GitHub once (about 5 minutes here).

Here's how it looks inside the current site, built from this branch.

/community/contributors/:

The contributors landing page inside opendal.apache.org

/community/contributors/xuanwo/:

Xuanwo's contributor page inside opendal.apache.org

The Community page's Contributors section now points here too, and there's a "Contributors" link at the bottom of the Community sidebar.

Drafted with AI assistance (Claude Code, Claude Opus 5.5) and reviewed by me.

@mattheliu

Copy link
Copy Markdown
Contributor Author

One question: these pages are full-width like /services, so there's no Community sidebar, and the landing page has no breadcrumb either. Right now the only way back to the Community docs is the navbar. Is that OK, or would you rather have them inside the Community docs with the sidebar? I'd just add a breadcrumb and highlight Community in the navbar, but either works for me.

@Xuanwo
Xuanwo merged commit 583bae7 into apache:main Dec 1, 2026
34 of 35 checks passed
@mattheliu

Copy link
Copy Markdown
Contributor Author

Thanks for merging! It should go live with the next docs deploy.

Xuanwo pushed a commit that referenced this pull request Dec 1, 2026
* fix(website): contributors page follow-ups

Follow-ups to the contributors page (#9439):

- Take an account's name and picture from its newest commit or activity;
  the oldest cached entry used to win, so a renamed account kept its old
  name. Pictures are checked again once a week (If-None-Match), so a
  changed picture shows up.
- Give people without a GitHub account ids that start with "~"
  ("~zhang-san"). A bare slug could be a GitHub login (an unlinked
  "John Smith" landed on user john-smith's card), and a name with no
  letters or digits got an empty id, the landing page's own route.
  Numbers published under the old ids carry over.
- Leaving someone out by name now drops all their ids from the numbering
  too, not just their card.
- Read history and activity again in full once a week, so deleted issues
  drop out and commits whose author has since linked their email are
  credited to the account.
- Retry requests whose connection drops.
- Don't crash on a malformed URL fragment ("#100%").
- Don't underline links on hover inside these pages.
- Add the Community / Contributors breadcrumb to the landing page, and
  highlight Community in the navbar on these pages.
- Run git with LC_ALL=C when reading gh-pages, so its messages (and the
  test that reads them) don't depend on the machine's language.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(website): fetch a contributor picture only when its URL changes

GitHub's avatar URLs carry a fingerprint of the picture (?u=...), so a new
picture comes with a new URL. Now that names and pictures come from the
newest data, a changed picture arrives as a new URL and is fetched then;
checking every picture again each week isn't needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/feat The PR implements a new feature or has a title that begins with "feat" size:XXL This PR changes 1000+ lines, ignoring generated files. website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new feature: contributors page on the website

2 participants