Skip to content

Organization leaderboard: go-live (record oversized orgs, rebrand, recent-lookup chips, show toggle)#103

Merged
peetzweg merged 3 commits into
mainfrom
feature-record-oversized-orgs
Jul 8, 2026
Merged

Organization leaderboard: go-live (record oversized orgs, rebrand, recent-lookup chips, show toggle)#103
peetzweg merged 3 commits into
mainfrom
feature-record-oversized-orgs

Conversation

@peetzweg

@peetzweg peetzweg commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Part of #84. The single go-live PR for the organization ("company") leaderboard — sanity-check on the preview deploy before merge.

Four things:

  • Record oversized orgs. On-demand build threshold lowered to 25 members; larger orgs are recorded (entities, builtAt null) at first sighting instead of discarded, so the background worker (Async org-indexing worker + per-member monthly resolution #102) can backfill them. Repeat lookups short-circuit on the stored memberCount — no re-enumeration. No schema change.
  • Rebrand "companies" → "Organizations" everywhere it means an org: user-facing copy, code identifiers (Company*Org*, matching the existing org convention), and URLs (/company/*/organizations/*, with 301 redirects from the old paths). The GitHub user-profile company field is deliberately untouched.
  • Orgs in recent lookups. The org path records its lookups; the strip shows user + org entries; org chips get a square avatar and the verified badge.
  • Show the board toggle to everyone (drops the SHOW_BOARD_TOGGLE dark-launch flag). Supersedes Show the Developers/Companies switch to everyone #101.

Verified locally: typecheck, lint, tests, and a full build — /organizations/{stats,members} prerender and the sitemap picks up the new paths.

peetzweg added 2 commits July 8, 2026 21:33
Lower the on-demand org build threshold to 25 members and record any org
that exceeds it as an entity row (builtAt null) at first sighting, rather
than refusing before writing anything. This keeps the shared GitHub token
well clear of its hourly budget on the request path while capturing which
companies people looked up, so the background worker can backfill them later.

Repeat lookups of a recorded oversized org short-circuit on the stored
memberCount, so they never re-enumerate members before refusing. No schema
change — reuses the existing entities table.
…unhide board toggle

Three changes that together make the organization leaderboard a shippable, go-live feature:

- Rebrand: user-facing copy, code identifiers (Company* → Org*, matching the
  codebase's existing `org` convention), and URLs (/company/* → /organizations/*)
  all say "Organizations" now — GitHub's own term. Old /company/<slug> URLs 301
  to their new home so no link or search result breaks. The GitHub user-profile
  `company` field is left untouched (it's a different, GitHub-named thing).
- Recent lookups now include organizations: the org build path records the
  lookup, queryRecent surfaces user+org entries, and the chip renders a square
  avatar plus the verified badge for orgs.
- The Developers/Organizations board toggle is shown to everyone (drops the
  SHOW_BOARD_TOGGLE dark-launch flag; supersedes PR #101).
@peetzweg peetzweg changed the title Record oversized orgs on lookup for later backfill Organization leaderboard: go-live (record oversized orgs, rebrand, recent-lookup chips, show toggle) Jul 8, 2026
A valid org over the on-demand size limit is recorded and queued for the
background worker, so its lookup isn't a failure. Surface it as its own gentle
state (422 → OrgResult.indexing) instead of the generic "Couldn't load that
organization" card with a Retry button: a soft "We're still indexing <org> —
check back a little later, thanks for your interest!" with just a back link.

Also fixes the first-ever lookup of such an org falling through to the
misleading user-404 message.
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.

1 participant