Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions assets/theme-v2/js/gamefoundry-partials.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@
"owner-notes": "owner/notes.html",
"owner-site-settings": "owner/site-settings.html",
"owner-themes": "owner/themes.html",
"community-guidelines": "legal/community-guidelines.html",
"legal-overview": "legal/index.html",
"terms-of-service": "legal/terms-of-service.html",
"terms-legal": "legal/terms.html",
"privacy-policy": "legal/privacy-policy.html",
"cookie-policy": "legal/cookie-policy.html",
"cookies-policy": "legal/cookies-policy.html",
"community-guidelines": "legal/community-guidelines.html",
"copyright-policy": "legal/copyright-policy.html",
disclaimer: "legal/disclaimer.html",
"dmca-policy": "legal/dmca-policy.html",
"privacy-policy": "legal/privacy-policy.html",
"terms-legal": "legal/terms.html",
account: "account/index.html",
"account-achievements": "account/achievements.html",
"account-ai-credits": "account/ai-credits.html",
Expand Down
103 changes: 0 additions & 103 deletions assets/theme-v2/js/legal-document-page.js

This file was deleted.

7 changes: 4 additions & 3 deletions assets/theme-v2/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ <h2 id="footer-account">Account</h2>
<section class="footer__group footer__legal" aria-labelledby="footer-legal">
<h2 id="footer-legal">Legal</h2>
<div class="footer__links">
<a data-route="legal-overview" href="legal/index.html">Legal Overview</a>
<a data-route="terms-of-service" href="legal/terms-of-service.html">Terms of Service</a>
<a data-route="privacy-policy" href="legal/privacy-policy.html">Privacy Policy</a>
<a data-route="cookie-policy" href="legal/cookie-policy.html">Cookie Policy</a>
<a data-route="community-guidelines" href="legal/community-guidelines.html">Community Guidelines</a>
<a data-route="cookies-policy" href="legal/cookies-policy.html">Cookies Policy</a>
<a data-route="copyright-policy" href="legal/copyright-policy.html">Copyright Policy</a>
<a data-route="dmca-policy" href="legal/dmca-policy.html">DMCA Policy</a>
<a data-route="privacy-policy" href="legal/privacy-policy.html">Privacy Policy</a>
<a data-route="terms-legal" href="legal/terms.html">Terms of Service</a>
</div>
</section>
<section class="footer__group" aria-labelledby="footer-company">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# PR_26175_OWNER_054-legal-corrected-package

## Purpose
Apply `gfs_legal_corrected_package.zip` as the legal foundation implementation source and fix public legal page rendering.

## Package Handling
- Extracted package to `tmp/gfs_legal_corrected_package_extract_20260624_230100`.
- Read `README.md`.
- Read `CODEX_FIX_INSTRUCTIONS.md`.
- Read every file under package `/legal/`, including canonical pages, markdown source documents, `legal-nav.js`, and legacy redirect pages.
- Treated `CODEX_FIX_INSTRUCTIONS.md` as the authoritative implementation specification.

## Root Cause
The repository legal pages were split across two incomplete implementations:

- Several public legal pages used `data-legal-document-page`, `data-legal-document-type`, and `assets/theme-v2/js/legal-document-page.js`.
- That dynamic renderer depended on published legal document registry content that was not available, producing missing-content warnings instead of rendering approved legal copy.
- Other pages were static placeholders with inconsistent hand-written side menus.
- `legal/disclaimer.html` was placeholder content and remained linked by old navigation.
- There was no single runtime source of truth for the left-side legal menu.

## Implementation
- Added approved static legal document content for all canonical public legal pages.
- Added markdown source documents from the package under `/legal/`.
- Added `legal/legal-nav.js` as the single runtime SSoT for legal side navigation.
- Updated all canonical legal pages to use one empty `<aside class="side-menu" aria-label="Legal documents" data-legal-nav></aside>` mount.
- Removed repeated fallback nav definitions from package HTML because CODEX instructions require no duplicate navigation definitions.
- Removed the obsolete dynamic renderer `assets/theme-v2/js/legal-document-page.js`.
- Removed placeholder `legal/disclaimer.html`.
- Kept package compatibility redirects:
- `legal/terms.html` redirects to `terms-of-service.html`.
- `legal/cookies-policy.html` redirects to `cookie-policy.html`.
- Updated footer legal links and route aliases to canonical legal pages while preserving legacy route aliases.
- Updated the legal Playwright spec to verify the corrected static-content implementation.

## Canonical Page Verification
All required pages were verified by headless browser validation:

| Page | Navigation renders | Selected page highlighted | `aria-current="page"` | Title correct | Body displayed | No console errors | No missing-document warning |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `/legal/index.html` | PASS | PASS | PASS | PASS | PASS | PASS | PASS |
| `/legal/terms-of-service.html` | PASS | PASS | PASS | PASS | PASS | PASS | PASS |
| `/legal/privacy-policy.html` | PASS | PASS | PASS | PASS | PASS | PASS | PASS |
| `/legal/cookie-policy.html` | PASS | PASS | PASS | PASS | PASS | PASS | PASS |
| `/legal/community-guidelines.html` | PASS | PASS | PASS | PASS | PASS | PASS | PASS |
| `/legal/copyright-policy.html` | PASS | PASS | PASS | PASS | PASS | PASS | PASS |
| `/legal/dmca-policy.html` | PASS | PASS | PASS | PASS | PASS | PASS | PASS |

## Validation Commands
- PASS: package extracted without ignored entries.
- PASS: all package files read before implementation.
- PASS: package `/legal/` files copied into repo before CODEX duplicate-nav correction.
- PASS: targeted browser validation for all seven required pages:
- document title checked
- H1 checked
- side navigation order checked
- selected link checked
- `aria-current="page"` checked
- document body content checked
- no old legal renderer attributes checked
- no `Published legal document` or `is not available` text checked
- no console errors, page errors, or failed requests checked
- PASS: `npx playwright test tests/playwright/tools/RemainingLegalPages.spec.mjs --project=playwright --reporter=line --workers=1`
- PASS: `git diff --check`
- 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`.

## Hard Stop Confirmation
No legal page rendered without document content. All seven required legal pages render approved document bodies.

## Notes
- 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.
- 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.
- 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.
31 changes: 25 additions & 6 deletions docs_build/dev/reports/codex_changed_files.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
assets/theme-v2/js/gamefoundry-partials.js
assets/theme-v2/js/legal-document-page.js
assets/theme-v2/partials/footer.html
docs_build/dev/reports/PR_26175_OWNER_054-legal-corrected-package.md
docs_build/dev/reports/codex_changed_files.txt
docs_build/dev/reports/codex_review.diff
docs_build/dev/reports/PR_26175_OWNER_053-project-work-resolution-report.md
docs_build/dev/reports/PR_26175_OWNER_053-project-work-resolution-report_branch-validation.md
docs_build/dev/reports/PR_26175_OWNER_053-project-work-resolution-report_manual-validation-notes.md
docs_build/dev/reports/PR_26175_OWNER_053-project-work-resolution-report_requirement-checklist.md
docs_build/dev/reports/PR_26175_OWNER_053-project-work-resolution-report_validation-lane.md
docs_build/pr/PLAN_PR_26175_OWNER_053-project-work-resolution-report.md
docs_build/dev/reports/coverage_changed_js_guardrail.txt
docs_build/dev/reports/playwright_v8_coverage_report.txt
legal/community-guidelines.html
legal/community-guidelines.md
legal/cookie-policy.html
legal/cookie-policy.md
legal/cookies-policy.html
legal/copyright-policy.html
legal/copyright-policy.md
legal/disclaimer.html
legal/dmca-policy.html
legal/dmca-policy.md
legal/index.html
legal/index.md
legal/legal-nav.js
legal/privacy-policy.html
legal/privacy-policy.md
legal/terms.html
legal/terms-of-service.html
legal/terms-of-service.md
tests/playwright/tools/RemainingLegalPages.spec.mjs
Binary file modified docs_build/dev/reports/codex_review.diff
Binary file not shown.
4 changes: 2 additions & 2 deletions docs_build/dev/reports/coverage_changed_js_guardrail.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Missing changed runtime JS files are WARN, not FAIL.
Source: Playwright/Chromium built-in V8 coverage from the active Playwright run.

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

Guardrail warnings:
(100%) none changed - no changed runtime JS files
(100%) none - no changed runtime JS coverage warnings
25 changes: 10 additions & 15 deletions docs_build/dev/reports/playwright_v8_coverage_report.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,22 @@ Note: entry percentages use function coverage when available, otherwise line cov
Note: coverage entries are aggregated across every page/tool where coverageReporter.start(page) and coverageReporter.stop(page) ran.

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

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

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

Uncovered or low-coverage changed JS files:
(100%) none changed - no changed runtime JS files
(100%) none - no low-coverage changed runtime JS files

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