Skip to content

Module 4: Game Library & Discovery frontend - #11

Merged
MohanEhab merged 5 commits into
mainfrom
feature/module-04-game-library-discovery
Jul 11, 2026
Merged

Module 4: Game Library & Discovery frontend#11
MohanEhab merged 5 commits into
mainfrom
feature/module-04-game-library-discovery

Conversation

@MohanEhab

Copy link
Copy Markdown
Contributor

Summary

  • Wires /games, /games/[gameId], the dashboard featured card, the composed /search Games tab, and the profile Favorite games tab to the real Module 4 backend catalog API.

What changed

  • New gamesApi client + LibraryPage/GameDetailPage (browse, filter, tag/mode/sort, search, load-more, ComingSoon/tombstone handling, favorite toggle, honestly-disabled entry actions naming their real owning module).
  • Wired DashboardPage, SearchResultsPage, ProfilePage, and updated legacy mock call sites in CreateLobbyModal/LandingPage to the tightened GameArt prop contract.
  • Fixed 6 pre-existing axe-core accessibility violations in the shared app shell (icon-only nav link names, duplicate banner landmark, missing page <h1>, color-contrast) plus a Module 1 AuthPage label-association bug, surfaced because this is the first module to enforce the required accessibility policy.

Tests

  • npx tsc --noEmit: clean.
  • npm run lint: clean.
  • npm run test (vitest): 223/223 passing.
  • E2E: module-04-game-library.spec.ts 2/2 passed (9.1s), smoke.spec.ts 2/2 passed (4.0s) against a live local stack; accessibility scan clean across all pages visited.

Security/docs

  • --security=light post-frontend review: zero Critical/High/Medium/Low. 3 Info findings (color-token interpolation, raw-fetch usage for tombstone body, missing client-side search min-length), all confirmed non-exploitable or UX-only.
  • Confirmed no IDOR: favorites always keyed off the server JWT sub claim.

Risks/deferred

  • Legacy mock/games.ts not deleted: 5 out-of-scope consumers (owned by Modules 6/7/9) still depend on it; GameArt was tightened instead with minimal inline adapters at in-scope call sites.
  • GameDetailPage uses local notFoundMessage state instead of Next.js notFound(); the mandatory fallback-removal part of the underlying risk is satisfied.
  • 7 other feature pages still use a .page-title div instead of <h1>; only Profile (the page this run's a11y scan exercised) was converted — flagged as a separate follow-up.
  • Full canonical final evidence: docs/ai-workflow/evidence/module-04-game-library-discovery-run-2026-07-10T18-17-48-742Z-304902dc-abd4-4cd5-a4a2-77ea3e9d2233.json (workflow repo, not part of this PR).

Module 4 is the first module whose E2E manifest requires accessibility
checks. Adds the axe-core devDependency and shared fixture, and
ignores generated test-results output.
Wires /games (browse, filter, tag/mode/sort, search, load-more) and
/games/[gameId] (detail, ComingSoon/tombstone handling, favorite
toggle, honestly-disabled entry actions) to the real backend catalog
API via a new gamesApi client, and tightens GameArt's prop contract to
the real DTO shape.
… profile

Connects the dashboard featured card, the composed /search Games tab,
and the profile Favorite games tab to the live gamesApi client;
updates the legacy mock Game/GameArt call sites in CreateLobbyModal
and LandingPage to the tightened prop shape.
First module to enforce the required axe-core accessibility policy
surfaced 6 pre-existing violations in the shared shell: icon-only
sidebar nav links losing their accessible name in rail mode, a
duplicate nested banner landmark, a missing page <h1>, and a
muted-text color-contrast failure below AA. Also fixes a Module 1
AuthPage label-association bug and an accessibility-fixture bug that
skipped the axe scan on API-only test pages.
Component/unit coverage for gamesApi, LibraryPage, GameDetailPage, and
the profile Favorite games tab; a composed end-to-end spec covering
browse, favorite, and honestly-disabled entry actions with the
required accessibility scan. Fixes a useRouter mock gap in
ProfileFriendCount.test.tsx and tightens locator specificity in
smoke.spec.ts.
@MohanEhab
MohanEhab merged commit 1412295 into main Jul 11, 2026
2 checks passed
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