Skip to content

Commit c77c8c7

Browse files
committed
Migrate first GameFoundryStudio tool page to root Tools path - PR_26152_042-root-first-tool-page-migration
1 parent 3ab4168 commit c77c8c7

5 files changed

Lines changed: 133 additions & 63 deletions

File tree

GameFoundryStudio/assets/js/gamefoundry-partials.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272

7373
const rootPageRoutes = new Set([
7474
"tools",
75+
"ai-assistant",
7576
"about", "vision", "mission", "roadmap", "release-notes",
7677
"account", "account-profile", "account-preferences", "account-security",
7778
"admin", "admin-site-settings", "admin-branding", "admin-themes", "admin-design-system", "admin-controls",

GameFoundryStudio/assets/js/tools-page-accordions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
tools: [
153153
{
154154
title: "AI Assistant",
155-
href: "tools/ai-assistant.html",
155+
href: "../tools/ai-assistant.html",
156156
image: "assets/images/tools/ai-assistant.png",
157157
description: "Get guided technical help for game creation workflows.",
158158
role: "Foundry Bot",

GameFoundryStudio/tools/ai-assistant.html

Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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`

tools/ai-assistant.html

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<base href="../GameFoundryStudio/">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<title>AI Assistant - Game Foundry Studio</title>
8+
<meta name="description" content="Get AI help with code, assets, logic and design in Game Foundry Studio.">
9+
<link rel="icon" href="assets/images/favicon.svg" type="image/svg+xml">
10+
<link rel="stylesheet" href="assets/css/theme/v2/theme.css">
11+
</head>
12+
<body>
13+
<div data-partial="header-nav"></div>
14+
<main>
15+
<section class="page-title">
16+
<div class="container">
17+
<div class="kicker">AI &amp; Learning</div>
18+
<h1>AI Assistant</h1>
19+
<p class="lede">Get AI help with code, assets, logic and design.</p>
20+
</div>
21+
</section>
22+
<section class="section">
23+
<div class="container">
24+
<div class="card-grid">
25+
<article class="control-card tool-group-ai-learning">
26+
<div class="card-media"><img src="assets/images/tools/ai-assistant.png" alt="AI Assistant preview"></div>
27+
<div class="card-body">
28+
<div class="content-cluster"><span class="brand-color-swatch swatch-purple" role="img" aria-label="AI and Learning color"></span><object data="assets/images/badges/ai-assistant.png" type="image/png" width="48" height="48" aria-label="AI Assistant badge">AI Assistant badge</object></div>
29+
<div class="kicker">Foundry Bot</div>
30+
<h2>Workspace</h2>
31+
<p>AI Assistant setup and output wireframe.</p>
32+
<div data-tool-display-mode data-asset-root="assets/images" data-tool-slug="ai-assistant" data-tool-icon-src="assets/images/badges/ai-assistant.png"></div>
33+
</div>
34+
</article>
35+
<article class="control-card tool-group-ai-learning">
36+
<div class="card-body">
37+
<div class="kicker">Toolbox</div>
38+
<h2>Setup</h2>
39+
<p>AI Assistant setup wireframe.</p>
40+
</div>
41+
</article>
42+
<article class="control-card tool-group-ai-learning">
43+
<div class="card-body">
44+
<div class="kicker">Inspector</div>
45+
<h2>Output</h2>
46+
<p>AI Assistant output wireframe.</p>
47+
</div>
48+
</article>
49+
</div>
50+
</div>
51+
</section>
52+
</main>
53+
<div data-partial="footer"></div>
54+
<script src="assets/js/gamefoundry-partials.js" defer></script>
55+
<script src="assets/js/tool-display-mode.js" defer></script>
56+
</body>
57+
</html>

0 commit comments

Comments
 (0)