|
1 | 1 | # www Migration Map |
2 | 2 |
|
3 | | -Status: Active planning map |
| 3 | +Status: Implemented migration map |
4 | 4 | Owner: Owner |
5 | 5 | Workstream: Repository Architecture Simplification |
6 | | -PR: PR_26180_OWNER_006-www-migration-map |
| 6 | +PR: PR_26180_OWNER_006-www-migration-map; PR_26180_OWNER_008-move-www-application |
7 | 7 |
|
8 | 8 | ## Purpose |
9 | 9 |
|
10 | 10 | Document the current browser-served repository surface and the safe sequence required before moving files into `www/`. |
11 | 11 |
|
12 | | -This map is a no-runtime-change governance artifact. It does not move browser files, change package commands, change local server behavior, or update runtime imports. |
| 12 | +This map began as a no-runtime-change governance artifact. `PR_26180_OWNER_008-move-www-application` used it to move browser-served files under `www/` while preserving public URLs. |
13 | 13 |
|
14 | 14 | ## Executive Summary |
15 | 15 |
|
16 | | -The browser-served application currently depends on repository-root static serving. |
| 16 | +The browser-served application now lives under `www/`. |
17 | 17 |
|
18 | | -Current local runtime, test helpers, and browser pages assume URLs such as `/index.html`, `/toolbox/index.html`, `/assets/theme-v2/css/theme.css`, `/account/sign-in.html`, `/admin/system-health.html`, and `/games/index.html` resolve from the repository root. |
| 18 | +Current local runtime, test helpers, and browser pages keep URLs such as `/index.html`, `/toolbox/index.html`, `/assets/theme-v2/css/theme.css`, `/account/sign-in.html`, `/admin/system-health.html`, and `/games/index.html` while resolving browser-served files from `www/`. |
19 | 19 |
|
20 | | -Moving browser files into `www/` is feasible, but the move must preserve public route URLs while changing the filesystem lookup root. A direct folder move without route compatibility would break Playwright tests, local API static serving, team-aware bootstrap static serving, Node test root aliases, and browser imports that still reference root-level `src/`, `toolbox/`, and `assets/`. |
| 20 | +The move preserved public route URLs while changing the filesystem lookup root. Repository-root fallback remains available for transition-only compatibility, including browser imports that still reference root-level `src/`. |
21 | 21 |
|
22 | 22 | ## Current Browser-Served Surface |
23 | 23 |
|
24 | | -Current root-level browser-served entry points and folders include: |
| 24 | +Current browser-served entry points and folders now live under `www/`: |
25 | 25 |
|
26 | 26 | | Path | Current role | Files | HTML files | Move target | |
27 | 27 | | --- | --- | ---: | ---: | --- | |
@@ -75,7 +75,7 @@ These URLs should continue working for users and tests during the move: |
75 | 75 | - `/marketplace/index.html` |
76 | 76 | - `/memberships/index.html` |
77 | 77 |
|
78 | | -### Rewrite filesystem lookup paths |
| 78 | +### Rewritten filesystem lookup paths |
79 | 79 |
|
80 | 80 | Static servers and test helpers should map public URLs to `www/` filesystem paths after the move: |
81 | 81 |
|
@@ -172,17 +172,21 @@ Recommended approach for the actual move PR: |
172 | 172 |
|
173 | 173 | ## Route Root Compatibility Toggle |
174 | 174 |
|
175 | | -`PR_26180_OWNER_007-www-route-root-compatibility` installs the local compatibility switch without moving browser files. |
| 175 | +`PR_26180_OWNER_007-www-route-root-compatibility` installed the local compatibility switch without moving browser files. |
176 | 176 |
|
177 | | -The future activation toggle is: |
| 177 | +`PR_26180_OWNER_008-move-www-application` moves browser-served files into `www/` and makes local static serving prefer `www/` by default. |
| 178 | + |
| 179 | +The local static serving root is now `www/` by default. The explicit activation toggle remains: |
178 | 180 |
|
179 | 181 | ```text |
180 | 182 | GAMEFOUNDRY_LOCAL_WEB_ROOT=www |
181 | 183 | ``` |
182 | 184 |
|
183 | | -Default behavior remains current repository-root static serving when `GAMEFOUNDRY_LOCAL_WEB_ROOT` is unset, empty, `.`, `root`, or `repo-root`. |
| 185 | +Default behavior is now `www/` static serving when `GAMEFOUNDRY_LOCAL_WEB_ROOT` is unset or empty. |
| 186 | + |
| 187 | +When `GAMEFOUNDRY_LOCAL_WEB_ROOT=www`, local static serving explicitly prefers `www/` for public browser URLs while retaining repository-root fallback for compatibility during migration. |
184 | 188 |
|
185 | | -When `GAMEFOUNDRY_LOCAL_WEB_ROOT=www`, local static serving prefers `www/` for public browser URLs while retaining repository-root fallback for compatibility during migration. |
| 189 | +When local validation needs the prior root behavior, `GAMEFOUNDRY_LOCAL_WEB_ROOT=repo-root` resolves static files from the repository root. |
186 | 190 |
|
187 | 191 | This toggle is for local runtime and test helpers only. It does not change production deployment, public URLs, API routes, or package commands. |
188 | 192 |
|
|
0 commit comments