Repository navigation
feat(games): add the games landing and five paged IGDB list pages - #57
Merged
Merged
Conversation
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>
…g sections games Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o /games Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he session slots 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>
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>
|
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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The list page's error and empty panels move to list-panels.tsx so /showcase renders the real ones instead of copying their text. 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>
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
/gamesis now the games landing. It uses the same parallax landing as/showsand/movies, filled with five IGDB lists: Trending, Popular, Recently released, Coming soon and Top rated. Each list also gets its own paged See all page under/games/{slug}. The GAMES tab now shows on every page whileNEXT_PUBLIC_GAMES_LIBRARYis on.Why
Implements spec 0028, scope feature G6 in docs/scope/games.md. It gives visitors a way to find a game without searching, and it delivers the navigation pieces spec 0027 left for G6. The landing sections now draw a game the same way they draw a show or a movie, so there is still one landing, not a copy.
Changes
IGDB module (
lib/igdb/)getPopularGames("trending" | "popular"). It reads IGDBpopularity_primitives(types Visits = 1 and Playing = 3, pinned inconstants.ts), batch reads up to 500 ids, drops hidden or missing games, and keeps the rank order. Both requests sit in one cached scope with anhourslifetime, so a partial result is never cached as a success.discoverGamesacceptspageSizeof 20 or 24 (default 20, so existing callers don't change). It is validated before the cache and is part of the cache key.readSummaryPagecomputes its offset from the page size, so pages never overlap.GameSummary.artUrl: the artwork, or else a screenshot, with the lowestimage_id, att_1080p.IGDB_SUMMARY_FIELDSnow also asks forartworksandscreenshots.lib/images/igdb-loader.tssteps art URLs down a separateIGDB_ART_LADDER, the same way it steps covers.pnpm igdb:livenow checks the art rung widths, the two popularity type ids and names, both popularity lists, and that the Recently released window holds at least 12 hyped games.Lists and routes
lib/catalog/lists.ts) gains five game lists.catalogListsFor'sMediaTypeoverload never returns them, so the sitemap stays free of/gamesURLs.lib/catalog/game-lists.tsbuilds the discover options from the UTC day (60 day Recently released window, 120 day Coming soon window, 100 rating floor for Top rated).lib/catalog-list-read.tsgains a game branch. Popularity lists are sliced into pages of 24 with an exact count. Discover lists use IGDB's count, or Next only, when no count comes back.app/games/copy the movie list page pattern.CATALOG_PATHS.gameis/games, andMediaTypestays"tv" | "movie".proxy.tslets exactly the five slugs through beforeparseGameId./games/Trending,/games/coming_soonand/games/trending.jpgstill get a real 404.Landing
LandingItemcarriesmediaType: LibraryTypeand arating: { source, value }in place oftmdbRating. The badge picks the TMDB or IGDB rating badge from the source.app/games/page.tsxrendersCatalogLandingwith the game slots. The hero shows the first Trending game over its art, IGDB genres (left out if that read fails), andGameTrackingSlotin its own Suspense boundary. There is no Trailer button.wide-card.tsx), apart from the session slots. Coming soon cards show the UTC release day.Navigation
/games*, links to/gamesfrom the catalog, title and search pages, and switches?type=gamein place on the library pages./games*. The check usesusePathnameonly, so the shells stay prerendered.game, but it follows that memory only while the flag is on.Browse games, linking to/games.SEO: every games page is
noindex, with no canonical and no share card fields of its own.app/sitemap.test.tsasserts there is no/gamesURL in the sitemap.Showcase: a "Games landing and lists" section with a game card, wide cards with and without art, a failed section, and the list page error and empty panels.
How to test / verify
These steps follow the recorded verify run, where every step was ticked. Run with
NEXT_PUBLIC_GAMES_LIBRARY=onunless a step says otherwise.pnpm typecheck && pnpm lint:ci && pnpm test. All three should pass.IGDB_CLIENT_ID= IGDB_CLIENT_SECRET= pnpm build. It should pass and list/gamesand the five list pages as partially prerendered (◐).pnpm igdb:live(needs IGDB credentials). It should report Visits = 1, Playing = 3, the art rungs, and at least 12 hyped recent releases./gamesat 1280px. You should see the hero, then Trending now, Popular, Recently released (sidebarNew releases), Coming soon and Top rated, each with See all.← Games, the h1, the note, 24 cards andPage 1 of M./games/trending?page=99should show the "no such page" panel.curl -s -o /dev/null -w '%{http_code}' localhost:3000/games/Trending. It should print 404./games/coming-soonand/games/1942should print 200.pnpm dev:docker), the hero should offer Want to play / Playing / Finished, with the release gate on an unreleased game. Signed out, it should show no status control.IGDB_CLIENT_SECRETand restart. Each landing section should show its own Try again, and a list page should showCouldn't reach IGDBwith a retry link.offand restart. No GAMES tab should show, and/gamesshould still load by URL.Risk & rollout
No migration, no schema change, and no new environment variables. Production leaves
NEXT_PUBLIC_GAMES_LIBRARYunset, so no GAMES tab shows there. But/gamesand its list pages do answer by URL in production (that's by design, AC-14). They staynoindexand out of the sitemap until G10.What can break: the shared landing components and list page now branch on three media types, so
/showsand/moviesare in the blast radius. Their existing tests still pass, but you may want to look at them in a browser. Every summary read now carries two more expanded fields (artworks, screenshots), so batch and discover payloads grow. A popularity list is one batch of 500 ids, the heaviest single IGDB read in the app, cached for hours.The popularity type ids are IGDB facts that could change.
pnpm igdb:liveis the only guard.Rollback is a plain revert. There is no stored state to undo.
Notes for reviewers
/check reviewhas not been run for spec 0028 yet (there's no file indocs/reviews/for it). You may want to run it before merge.MediaTypeis deliberately not widened.gametravels asLibraryType, so/searchand the TMDB reads still can't receive it until G7. The proxy's localCATALOG_PATHSis a different constant from the one inlib/catalog/media-type.ts.lib/igdb/AGENTS.mdupdate in/sync.🤖 Generated with Claude Code