Skip to content

Commit 0c0f2eb

Browse files
authored
Merge PR #175: PR_26175_OWNER_054-legal-corrected-package
Apply corrected legal package
2 parents 0ee3385 + 0626d9b commit 0c0f2eb

27 files changed

Lines changed: 1381 additions & 555 deletions

assets/theme-v2/js/gamefoundry-partials.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,15 @@
9393
"owner-notes": "owner/notes.html",
9494
"owner-site-settings": "owner/site-settings.html",
9595
"owner-themes": "owner/themes.html",
96-
"community-guidelines": "legal/community-guidelines.html",
96+
"legal-overview": "legal/index.html",
97+
"terms-of-service": "legal/terms-of-service.html",
98+
"terms-legal": "legal/terms.html",
99+
"privacy-policy": "legal/privacy-policy.html",
100+
"cookie-policy": "legal/cookie-policy.html",
97101
"cookies-policy": "legal/cookies-policy.html",
102+
"community-guidelines": "legal/community-guidelines.html",
98103
"copyright-policy": "legal/copyright-policy.html",
99-
disclaimer: "legal/disclaimer.html",
100104
"dmca-policy": "legal/dmca-policy.html",
101-
"privacy-policy": "legal/privacy-policy.html",
102-
"terms-legal": "legal/terms.html",
103105
account: "account/index.html",
104106
"account-achievements": "account/achievements.html",
105107
"account-ai-credits": "account/ai-credits.html",

assets/theme-v2/js/legal-document-page.js

Lines changed: 0 additions & 103 deletions
This file was deleted.

assets/theme-v2/partials/footer.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ <h2 id="footer-account">Account</h2>
4141
<section class="footer__group footer__legal" aria-labelledby="footer-legal">
4242
<h2 id="footer-legal">Legal</h2>
4343
<div class="footer__links">
44+
<a data-route="legal-overview" href="legal/index.html">Legal Overview</a>
45+
<a data-route="terms-of-service" href="legal/terms-of-service.html">Terms of Service</a>
46+
<a data-route="privacy-policy" href="legal/privacy-policy.html">Privacy Policy</a>
47+
<a data-route="cookie-policy" href="legal/cookie-policy.html">Cookie Policy</a>
4448
<a data-route="community-guidelines" href="legal/community-guidelines.html">Community Guidelines</a>
45-
<a data-route="cookies-policy" href="legal/cookies-policy.html">Cookies Policy</a>
4649
<a data-route="copyright-policy" href="legal/copyright-policy.html">Copyright Policy</a>
4750
<a data-route="dmca-policy" href="legal/dmca-policy.html">DMCA Policy</a>
48-
<a data-route="privacy-policy" href="legal/privacy-policy.html">Privacy Policy</a>
49-
<a data-route="terms-legal" href="legal/terms.html">Terms of Service</a>
5051
</div>
5152
</section>
5253
<section class="footer__group" aria-labelledby="footer-company">
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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.
Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
1+
assets/theme-v2/js/gamefoundry-partials.js
2+
assets/theme-v2/js/legal-document-page.js
3+
assets/theme-v2/partials/footer.html
4+
docs_build/dev/reports/PR_26175_OWNER_054-legal-corrected-package.md
15
docs_build/dev/reports/codex_changed_files.txt
26
docs_build/dev/reports/codex_review.diff
3-
docs_build/dev/reports/PR_26175_OWNER_053-project-work-resolution-report.md
4-
docs_build/dev/reports/PR_26175_OWNER_053-project-work-resolution-report_branch-validation.md
5-
docs_build/dev/reports/PR_26175_OWNER_053-project-work-resolution-report_manual-validation-notes.md
6-
docs_build/dev/reports/PR_26175_OWNER_053-project-work-resolution-report_requirement-checklist.md
7-
docs_build/dev/reports/PR_26175_OWNER_053-project-work-resolution-report_validation-lane.md
8-
docs_build/pr/PLAN_PR_26175_OWNER_053-project-work-resolution-report.md
7+
docs_build/dev/reports/coverage_changed_js_guardrail.txt
8+
docs_build/dev/reports/playwright_v8_coverage_report.txt
9+
legal/community-guidelines.html
10+
legal/community-guidelines.md
11+
legal/cookie-policy.html
12+
legal/cookie-policy.md
13+
legal/cookies-policy.html
14+
legal/copyright-policy.html
15+
legal/copyright-policy.md
16+
legal/disclaimer.html
17+
legal/dmca-policy.html
18+
legal/dmca-policy.md
19+
legal/index.html
20+
legal/index.md
21+
legal/legal-nav.js
22+
legal/privacy-policy.html
23+
legal/privacy-policy.md
24+
legal/terms.html
25+
legal/terms-of-service.html
26+
legal/terms-of-service.md
27+
tests/playwright/tools/RemainingLegalPages.spec.mjs
38.2 KB
Binary file not shown.

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Missing changed runtime JS files are WARN, not FAIL.
66
Source: Playwright/Chromium built-in V8 coverage from the active Playwright run.
77

88
Changed runtime JS files considered:
9-
(100%) none changed - no changed runtime JS files
9+
(63%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 1046/1046; executed functions 62/98
1010

1111
Guardrail warnings:
12-
(100%) none changed - no changed runtime JS files
12+
(100%) none - no changed runtime JS coverage warnings

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,22 @@ Note: entry percentages use function coverage when available, otherwise line cov
1212
Note: coverage entries are aggregated across every page/tool where coverageReporter.start(page) and coverageReporter.stop(page) ran.
1313

1414
Exercised tool entry points detected:
15-
(46%) Toolbox Index - exercised 1 runtime JS files
15+
(0%) Toolbox Index - not exercised by this Playwright run
1616
(0%) Tool Template V2 - not exercised by this Playwright run
17-
(78%) Theme V2 Shared JS - exercised 4 runtime JS files
17+
(64%) Theme V2 Shared JS - exercised 2 runtime JS files
1818

1919
Changed runtime JS files covered:
20-
(100%) none changed - no changed runtime JS files
20+
(63%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 1046/1046; executed functions 62/98
2121

2222
Files with executed line/function counts where available:
23-
(36%) src/api/server-api-client.js - executed lines 167/167; executed functions 5/14
24-
(46%) toolbox/tool-registry-api-client.js - executed lines 155/155; executed functions 12/26
25-
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 204/204; executed functions 9/14
26-
(65%) src/api/public-config-client.js - executed lines 209/209; executed functions 17/26
27-
(74%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 1001/1001; executed functions 69/93
28-
(80%) src/api/admin-owner-navigation.js - executed lines 42/42; executed functions 4/5
29-
(82%) assets/theme-v2/js/admin-system-health.js - executed lines 808/808; executed functions 68/83
30-
(83%) assets/js/shared/status.js - executed lines 37/37; executed functions 5/6
31-
(91%) assets/theme-v2/js/admin-owner-navigation.js - executed lines 58/58; executed functions 10/11
32-
(100%) src/api/admin-system-health-api-client.js - executed lines 28/28; executed functions 4/4
23+
(63%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 1046/1046; executed functions 62/98
24+
(80%) assets/theme-v2/js/theme-icons.js - executed lines 69/69; executed functions 4/5
25+
(100%) legal/legal-nav.js - executed lines 34/34; executed functions 3/3
3326

3427
Uncovered or low-coverage changed JS files:
35-
(100%) none changed - no changed runtime JS files
28+
(100%) none - no low-coverage changed runtime JS files
3629

3730
Changed JS files considered:
38-
(0%) tests/api/admin-system-health/contract.test.mjs - changed JS file not collected as browser runtime coverage
31+
(0%) tests/playwright/tools/RemainingLegalPages.spec.mjs - changed JS file not collected as browser runtime coverage
32+
(63%) assets/theme-v2/js/gamefoundry-partials.js - changed JS file with browser V8 coverage
33+
(100%) legal/legal-nav.js - changed JS file with browser V8 coverage

0 commit comments

Comments
 (0)