|
| 1 | +# PR_26152_042 Root First Tool Page Migration Validation |
| 2 | + |
| 3 | +## Scope |
| 4 | + |
| 5 | +- Migrated the first approved individual tool page to root: |
| 6 | + - `/tools/ai-assistant.html` |
| 7 | +- Removed the legacy page: |
| 8 | + - `GameFoundryStudio/tools/ai-assistant.html` |
| 9 | +- Chose AI Assistant because it is a low-risk informational tool page with only shared partial and Tool Display Mode dependencies. |
| 10 | +- Updated the root Tools index data so the AI Assistant tile opens the migrated root page. |
| 11 | +- Updated shared partial routing so the AI Assistant nav route resolves as a root route. |
| 12 | +- Left all other individual tool pages unmigrated. |
| 13 | +- Did not add CSS. |
| 14 | +- Did not change tool runtime behavior. |
| 15 | + |
| 16 | +## Changed Files |
| 17 | + |
| 18 | +- `tools/ai-assistant.html` |
| 19 | +- `GameFoundryStudio/tools/ai-assistant.html` |
| 20 | +- `GameFoundryStudio/assets/js/tools-page-accordions.js` |
| 21 | +- `GameFoundryStudio/assets/js/gamefoundry-partials.js` |
| 22 | +- `docs/dev/commit_comment.txt` |
| 23 | +- `docs/dev/reports/codex_changed_files.txt` |
| 24 | +- `docs/dev/reports/codex_review.diff` |
| 25 | +- `docs/dev/reports/root_first_tool_page_migration_validation.md` |
| 26 | + |
| 27 | +## Validation Commands |
| 28 | + |
| 29 | +- PASS: `node --check GameFoundryStudio/assets/js/gamefoundry-partials.js; node --check GameFoundryStudio/assets/js/tools-page-accordions.js; node --check GameFoundryStudio/assets/js/tool-display-mode.js` |
| 30 | + - Shared partial router, Tools index renderer, and Tool Display Mode scripts are syntactically valid. |
| 31 | +- PASS: `rg -n --pcre2 "<script(?![^>]*\bsrc=)|<style|\son[a-z]+\s*=" tools/index.html tools/ai-assistant.html` |
| 32 | + - No inline script blocks, style blocks, or inline event handlers found. |
| 33 | +- PASS: `rg -n "ai-assistant|assets/css/theme/v2/theme\.css|assets/js/gamefoundry-partials\.js|assets/js/tool-display-mode\.js|data-tool-display-mode|assets/images/tools/ai-assistant\.png|assets/images/badges/ai-assistant\.png|\.\./tools/ai-assistant\.html|rootPageRoutes" tools/ai-assistant.html tools/index.html GameFoundryStudio/assets/js/tools-page-accordions.js GameFoundryStudio/assets/js/gamefoundry-partials.js` |
| 34 | + - Migrated page loads Theme V2, shared partial JS, and Tool Display Mode JS. |
| 35 | + - Migrated page declares root-safe Tool Display Mode asset paths. |
| 36 | + - Tools index data points the AI Assistant tile to root `/tools/ai-assistant.html`. |
| 37 | + - Shared partial router treats AI Assistant as a root route. |
| 38 | +- PASS: `rg --files | rg "ai-assistant"` |
| 39 | + - Root migrated page exists. |
| 40 | + - AI Assistant tool image, icon, badge, and character assets exist. |
| 41 | +- PASS: `rg -n "assets/images/tools/ai-assistant\.png|assets/images/badges/ai-assistant\.png|assets/images/characters/ai-assistant\.png" GameFoundryStudio/assets/js/tool-display-mode.js tools/ai-assistant.html GameFoundryStudio/assets/js/tools-page-accordions.js` |
| 42 | + - Root page and supporting data reference the AI Assistant image and badge paths. |
| 43 | + - Character path is produced by Tool Display Mode from `data-asset-root="assets/images"` and `data-tool-slug="ai-assistant"`. |
| 44 | +- PASS: `git status --short -- tools/ai-assistant.html GameFoundryStudio/tools/ai-assistant.html tools/index.html GameFoundryStudio/assets/js/tools-page-accordions.js GameFoundryStudio/assets/js/gamefoundry-partials.js GameFoundryStudio/assets/js/tool-display-mode.js GameFoundryStudio/assets/css/theme/v2 docs/dev/commit_comment.txt docs/dev/reports/codex_review.diff docs/dev/reports/codex_changed_files.txt docs/dev/reports/root_first_tool_page_migration_validation.md` |
| 45 | + - Scoped status shows the root AI Assistant page addition, old in-folder AI Assistant deletion, and expected supporting JS/report updates. |
| 46 | + |
| 47 | +## Link Validation |
| 48 | + |
| 49 | +- Root Tools index data now uses: |
| 50 | + - `../tools/ai-assistant.html` |
| 51 | +- From `/tools/index.html` with `<base href="../GameFoundryStudio/">`, that link resolves to root `/tools/ai-assistant.html`. |
| 52 | +- Shared partial route map still maps: |
| 53 | + - `ai-assistant` -> `tools/ai-assistant.html` |
| 54 | +- `ai-assistant` is included in `rootPageRoutes`, so shared nav rewrites that route to root `/tools/ai-assistant.html` from migrated root pages. |
| 55 | + |
| 56 | +## Asset and JS Validation |
| 57 | + |
| 58 | +- `tools/ai-assistant.html` loads: |
| 59 | + - `assets/css/theme/v2/theme.css` |
| 60 | + - `assets/js/gamefoundry-partials.js` |
| 61 | + - `assets/js/tool-display-mode.js` |
| 62 | +- `tools/ai-assistant.html` references: |
| 63 | + - `assets/images/tools/ai-assistant.png` |
| 64 | + - `assets/images/badges/ai-assistant.png` |
| 65 | + - Tool Display Mode character path: `assets/images/characters/ai-assistant.png` |
| 66 | + |
| 67 | +## Skipped |
| 68 | + |
| 69 | +- Repo-wide tests were not run by request. |
| 70 | +- Tests outside the root Tools index and migrated AI Assistant page were not run by request. |
| 71 | +- Full samples smoke test was not run by request. |
| 72 | +- Individual runtime validation for all other tool pages was not run by request. |
| 73 | +- Several simple `Test-Path` probes were retried but intermittently blocked by the Windows sandbox with: |
| 74 | + - `windows sandbox: spawn setup refresh` |
0 commit comments