Repository navigation
feat(web): list the games I played lately on the Games page - #190
Merged
Merged
Conversation
The Games page shows the games I played in the last 14 days from the games service, each time it shows: the day I last played each, its title, its platforms, its trophies and its playtime. A list kept from an earlier fetch, after the latest failed, gets a Stale chip after its count (decision 67). Decision 307 records the choices.
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.
Brief
Goal: the Games page shows the games I played in the last 14 days, from
GET /api/games/recent, each time it shows: for each game, the day I last played it, its title, its platforms, its trophies and its playtime. When the latest fetch failed, the list is from an earlier one and gets a Stale chip (decision 67). The Games card's description becomes §7's. The tenth ofgames-exophase's eleven steps (decision 307).Scope
apps/web/src/games/games.ts: the snapshot's types,loadGames, and the row's labels: the day ("Today", "Yesterday", "19 Oct"), the platforms ("PS4 · PS5"), the trophies ("12 of 40 trophies · 30%") and the playtime ("12h 30m").apps/web/src/games/GamesPage.svelte: the page head, then either "Exophase isn't set up." in the page's status line (decision 206) or the games in a polled section (decision 205), "Recently played".shell/Section.svelteandshell/PolledSection.svelte: an opt-in Stale chip after the section's count, shown when the list is from an earlier search.shell/page.tsandApp.svelte: thegamespage at/gamesand the paths under it.shell/apps.ts: the Games description becomes "Recent games and stats from Exophase" (§7, decision 66).e2e/games.spec.tswith demo games, and the Games line ine2e/page-status.spec.ts.Out of scope
games-page-covers).Acceptance criteria
/gamesand the paths under it show the Games page:<time>element that carries the instant;mise run checkis green.What changed
apps/web/src/games/:games.ts: the snapshot's types,loadGames,foundGamesand the row's labels;GamesPage.svelte: the page;shell/Section.svelte: an optionalbadge, a chip after the section's note.shell/PolledSection.svelte:markStale. When a page sets it, a list kept from an earlier search, after the latest failed, gets the Stale badge. Only the Games page sets it.shell/page.tsandApp.svelte: thegamespage at/gamesand the paths under it, titled "Games · Bakhyard".shell/apps.ts: the Games card's description (decision 66).games.spec.ts: 8 tests on desktop and phone;demo.ts: four made-up games;page-status.spec.ts: the Games line.docs/plan.md:The live page says "Exophase isn't set up." until the gateway forwards
/api/games(#188), which waits for codedogapp/homelab#44 (decision 300).QA
page.test.tsandApp.pages.test.tscover the paths and the title.games.spec.tscovers the nav, and the unit test shows the page's text is "Games" alone while it loads.games.test.ts,GamesPage.test.tsandgames.spec.ts.page-status.spec.ts.PolledSection.test.tsshows no chip unless asked. A throwaway test rendered main'sSection.svelteand this one with four sets of props and no badge: the DOM was the same, once Svelte's hash classes were stripped.MorePage.test.ts, and the e2e's click on the card.getUTCMonthandgetUTCFullYear;playedLabelgives the right day across both summer-time changes, in London and in New York (a Node probe of the same code).mise run checkis green:src/games;Review
No blocking findings. Non-blocking:
align-items: center, the chip is 2 px off.formatHours, which writes 45 minutes as "0h 45m" (decision 307).lastPlayedlater than now, from a device clock that runs slow, shows its date rather than "Today".Screenshots
With the e2e demo data, the made-up name Alex, and Tokyo time at 09:41 on Wednesday 21 October 2026.