Repository navigation
feat(games): launch games, indexable with IGDB credit and no flag - #61
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h's 24 hour clause Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… VideoGame JSON-LD Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es in the sitemap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hare cards Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rop the games flag Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot found pages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Spec 0032, AC-9 sets LEGAL_LAST_UPDATED to the date of the PR's final commit, which is now 2026-10-27. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ments Callers flatten their pages, so the games list no longer wraps itself in a page just to reuse the helper. The JSDoc lines left long by the games change are rewrapped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lib/seo/AGENTS.md now names gameJsonLd, GAME_SITEMAP_LIMIT, the unpaged /games landing and the IGDB sitemap read. The root legal facts bullet records IGDB_ATTRIBUTION and the hash checked IGDB logo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
What
Games are now open to everyone. Game pages, the
/gameslanding and its five list pages can be indexed, carry canonicals and share cards, and are listed in the sitemap. Game pages also getVideoGameJSON-LD. The footer and/termscredit IGDB next to TMDB. TheNEXT_PUBLIC_GAMES_LIBRARYflag is deleted, so the GAMES tab and?type=gamealways work.Why
This builds scope feature G10 (GA tier) and follows spec 0032. Games should reach search and link previews at the same quality bar as movies and shows, through the same SEO and legal modules. IGDB's free, non commercial terms ask for a visible credit with a clear path back to IGDB. Deleting the flag, rather than flipping it, leaves no dead branch to keep tested and makes Preview match Production.
Changes
SEO
/games/{id}) is indexable throughcatalogMetadata(). It gets its canonical, a share image (art, then the first screenshot, then the cover, then the site card) andgameJsonLd(), a schema.orgVideoGamewith developers asauthorand publishers aspublisher. It never carries a rating of any kind (AC-1, AC-3).noindex, with no canonical, noog:url, no JSON-LD and nothing game specific. AC-2 was amended in this PR so these pages may keep the root layout's default site card, the same as/movies/{id}(AC-2)./gamesgets its canonical. The five games list pages swap staticmetadataforgenerateMetadatathroughcatalogListMetadata, which reuses the page's own list read (one shared cache entry, no extra IGDB request). The discover callback now returns{ hasResults, lastPage }, so a games list with no IGDB count is indexed on any page that shows games. TMDB lists behave exactly as before (AC-4, AC-5).sitemap.xmladds/games, the five games list pages and the first 200 Popular games (GAME_SITEMAP_LIMIT). If IGDB fails, only the game ids drop and the sitemap caches forminutesinstead ofdays. AnIgdbValidationErrorstill fails the build on purpose (AC-6, AC-7).request-scope.test.tsnow also keeps the visitor region out of the games pages (AC-14).Legal and IGDB terms
IGDB_ATTRIBUTION("Game data and images from IGDB.com") andIGDB_HOME_URLlive only inlib/legal/operator.ts, andlib/legal/boundary.test.tsguards them. The footer shows IGDB's official press kit logo (public/igdb-logo.svg, hash checked) with the credit as one link./termsbecomes "Catalog data, TMDB and IGDB" and gains three IGDB paragraphs.LEGAL_LAST_UPDATEDis bumped (AC-8 to AC-10).rationale.md, IGDB terms check. The verdict is that BeStats complies. To stay inside Twitch's 24 hour caching clause,getGameGenresandgetGamePlatformsnow cache forhoursinstead ofmax(AC-11).Flag removal
getGamesLibraryandgamesLibraryEnabledfromlib/env.ts,lib/search/games-flag.ts, and everygamesEnabledargument and option acrosslib/catalog/media-type.ts,lib/search/params.ts,lib/search/quick.tsand their callers. The variable is also gone from.env.example.security-boundary.test.tsfails if any tracked file outsidedocs/names it again (AC-12).Deploy
docs/deploy.mdsection 4 listsIGDB_CLIENT_IDandIGDB_CLIENT_SECRETfor Production and Preview and drops the flag row. Both credentials are set in Vercel Preview as sensitive, and the flag is removed from Preview (AC-13).How to test / verify
Checks already run (see verify.md):
pnpm testgreen,pnpm buildshows/games,/games/[id]and the five list pages as partially prerendered with/sitemap.xml,/robots.txtand/opengraph-imagestatic,vercel env lsshows the IGDB credentials in Production and Preview with no flag, and a Previewvercel curl /games/1942renders the game.If you'd like to check it yourself, these steps cover it:
VERCEL_ENV=production NEXT_PUBLIC_SITE_URL=https://bestats.example pnpm build, thenPORT=3123 pnpm startwith the same two variables./games/1942. You should see a canonical, norobotsmeta, anog:imageset to the game's art and oneVideoGamescript with no rating./games/999999999. It should benoindex, with no canonical, noog:urland no JSON-LD./games/popularand/games/recently-released?page=3. Each should have its own canonical, while/games/top-rated?page=51and?page=abcshould benoindex./sitemap.xml. It should list/games, the five games list pages after the movie and show ones, and up to 200/games/{id}at the end, all absolute./termsfor the three IGDB paragraphs./showsand that/search?type=game&q=zeldaandGET /api/search?type=game&q=zeldareturn games. (This step is still open in verify.md.)/games/1942has a canonical,og:imageand JSON-LD, and validator.schema.org finds aVideoGamewith zero errors.Risk & rollout
No migrations and no schema change. Nothing from IGDB is stored. The flag is gone, so there is no kill switch: if the launch goes wrong, you'd undo it with Vercel Instant Rollback (
docs/deploy.md, section 8) and then fix forward. After a rollback, game URLs that search engines already hold keep resolving, because the pages exist without the launch.Accepted risk (spec 0032, migration plan): crawlers hitting 200 game pages meet IGDB's 4 requests a second limit.
getGameis cached for hours and a 429 shows as the failed branch, which isnoindex, so a retry panel is never indexed. A crawler that lands there may drop that game until its next crawl.List page metadata now waits on the page's IGDB read, so a slow IGDB delays the head. It shares the page's cache entry, so it adds no extra request.
Notes for reviewers
rationale.mdsuggests a quick human pass over the quotes before the production deploy.9954412) after/check verifyfound that not found pages keep the root layout's default site card. The rule that holds is that nothing game specific appears.lib/catalog/media-type.tsandlib/search/params.ts, wheregameis now always accepted./syncshould update the rootAGENTS.mdgames and flag lines andlib/seo/AGENTS.md(spec 0032, Follow up).🤖 Generated with Claude Code