Organization leaderboard: go-live (record oversized orgs, rebrand, recent-lookup chips, show toggle)#103
Merged
Merged
Conversation
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).
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #84. The single go-live PR for the organization ("company") leaderboard — sanity-check on the preview deploy before merge.
Four things:
entities,builtAtnull) 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 storedmemberCount— no re-enumeration. No schema change.Company*→Org*, matching the existingorgconvention), and URLs (/company/*→/organizations/*, with 301 redirects from the old paths). The GitHub user-profilecompanyfield is deliberately untouched.SHOW_BOARD_TOGGLEdark-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.