|
| 1 | +# PR_26175_OWNER_054-legal-corrected-package |
| 2 | + |
| 3 | +## Purpose |
| 4 | +Apply `gfs_legal_corrected_package.zip` as the legal foundation implementation source and fix public legal page rendering. |
| 5 | + |
| 6 | +## Package Handling |
| 7 | +- Extracted package to `tmp/gfs_legal_corrected_package_extract_20260624_230100`. |
| 8 | +- Read `README.md`. |
| 9 | +- Read `CODEX_FIX_INSTRUCTIONS.md`. |
| 10 | +- Read every file under package `/legal/`, including canonical pages, markdown source documents, `legal-nav.js`, and legacy redirect pages. |
| 11 | +- Treated `CODEX_FIX_INSTRUCTIONS.md` as the authoritative implementation specification. |
| 12 | + |
| 13 | +## Root Cause |
| 14 | +The repository legal pages were split across two incomplete implementations: |
| 15 | + |
| 16 | +- Several public legal pages used `data-legal-document-page`, `data-legal-document-type`, and `assets/theme-v2/js/legal-document-page.js`. |
| 17 | +- That dynamic renderer depended on published legal document registry content that was not available, producing missing-content warnings instead of rendering approved legal copy. |
| 18 | +- Other pages were static placeholders with inconsistent hand-written side menus. |
| 19 | +- `legal/disclaimer.html` was placeholder content and remained linked by old navigation. |
| 20 | +- There was no single runtime source of truth for the left-side legal menu. |
| 21 | + |
| 22 | +## Implementation |
| 23 | +- Added approved static legal document content for all canonical public legal pages. |
| 24 | +- Added markdown source documents from the package under `/legal/`. |
| 25 | +- Added `legal/legal-nav.js` as the single runtime SSoT for legal side navigation. |
| 26 | +- Updated all canonical legal pages to use one empty `<aside class="side-menu" aria-label="Legal documents" data-legal-nav></aside>` mount. |
| 27 | +- Removed repeated fallback nav definitions from package HTML because CODEX instructions require no duplicate navigation definitions. |
| 28 | +- Removed the obsolete dynamic renderer `assets/theme-v2/js/legal-document-page.js`. |
| 29 | +- Removed placeholder `legal/disclaimer.html`. |
| 30 | +- Kept package compatibility redirects: |
| 31 | + - `legal/terms.html` redirects to `terms-of-service.html`. |
| 32 | + - `legal/cookies-policy.html` redirects to `cookie-policy.html`. |
| 33 | +- Updated footer legal links and route aliases to canonical legal pages while preserving legacy route aliases. |
| 34 | +- Updated the legal Playwright spec to verify the corrected static-content implementation. |
| 35 | + |
| 36 | +## Canonical Page Verification |
| 37 | +All required pages were verified by headless browser validation: |
| 38 | + |
| 39 | +| Page | Navigation renders | Selected page highlighted | `aria-current="page"` | Title correct | Body displayed | No console errors | No missing-document warning | |
| 40 | +| --- | --- | --- | --- | --- | --- | --- | --- | |
| 41 | +| `/legal/index.html` | PASS | PASS | PASS | PASS | PASS | PASS | PASS | |
| 42 | +| `/legal/terms-of-service.html` | PASS | PASS | PASS | PASS | PASS | PASS | PASS | |
| 43 | +| `/legal/privacy-policy.html` | PASS | PASS | PASS | PASS | PASS | PASS | PASS | |
| 44 | +| `/legal/cookie-policy.html` | PASS | PASS | PASS | PASS | PASS | PASS | PASS | |
| 45 | +| `/legal/community-guidelines.html` | PASS | PASS | PASS | PASS | PASS | PASS | PASS | |
| 46 | +| `/legal/copyright-policy.html` | PASS | PASS | PASS | PASS | PASS | PASS | PASS | |
| 47 | +| `/legal/dmca-policy.html` | PASS | PASS | PASS | PASS | PASS | PASS | PASS | |
| 48 | + |
| 49 | +## Validation Commands |
| 50 | +- PASS: package extracted without ignored entries. |
| 51 | +- PASS: all package files read before implementation. |
| 52 | +- PASS: package `/legal/` files copied into repo before CODEX duplicate-nav correction. |
| 53 | +- PASS: targeted browser validation for all seven required pages: |
| 54 | + - document title checked |
| 55 | + - H1 checked |
| 56 | + - side navigation order checked |
| 57 | + - selected link checked |
| 58 | + - `aria-current="page"` checked |
| 59 | + - document body content checked |
| 60 | + - no old legal renderer attributes checked |
| 61 | + - no `Published legal document` or `is not available` text checked |
| 62 | + - no console errors, page errors, or failed requests checked |
| 63 | +- PASS: `npx playwright test tests/playwright/tools/RemainingLegalPages.spec.mjs --project=playwright --reporter=line --workers=1` |
| 64 | +- PASS: `git diff --check` |
| 65 | +- PASS: `rg` found no runtime references to `legal-document-page`, `data-legal-document-type`, `data-legal-document-page`, `Published legal document`, `disclaimer.html`, or `legal-nav.js.example` under `legal` and `assets/theme-v2`. |
| 66 | + |
| 67 | +## Hard Stop Confirmation |
| 68 | +No legal page rendered without document content. All seven required legal pages render approved document bodies. |
| 69 | + |
| 70 | +## Notes |
| 71 | +- The package HTML included repeated `<noscript>` side-menu fallback links. Those were removed because the CODEX instructions require exactly one legal navigation implementation and no duplicate navigation definitions. |
| 72 | +- The package markdown source files used trailing-space hard breaks. Those trailing spaces were normalized so `git diff --check` passes; the public approved HTML document content remains intact. |
| 73 | +- The local validation server was configured with `GAMEFOUNDRY_API_URL` pointing to the test server API to avoid unrelated external local API connection noise from shared partial loading. |
0 commit comments