|
| 1 | +# PR_26180_OWNER_007-www-route-root-compatibility Report |
| 2 | + |
| 3 | +## Executive Summary |
| 4 | + |
| 5 | +PASS. This PR prepares local static route-root compatibility for the future `www/` migration without moving browser-served files or changing public URLs. |
| 6 | + |
| 7 | +The implementation adds a shared local static route resolver that can prefer a configurable web root while preserving the current repository-root serving default. The documented future toggle is: |
| 8 | + |
| 9 | +```text |
| 10 | +GAMEFOUNDRY_LOCAL_WEB_ROOT=www |
| 11 | +``` |
| 12 | + |
| 13 | +Default behavior remains current root serving when the variable is unset, empty, `.`, `root`, or `repo-root`. |
| 14 | + |
| 15 | +## Source Plan |
| 16 | + |
| 17 | +Used `dev/build/ProjectInstructions/repository/www_migration_map.md` as the source plan. The map now documents the route-root compatibility toggle and the default/future behavior split. |
| 18 | + |
| 19 | +## Changed Files |
| 20 | + |
| 21 | +- `dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md` |
| 22 | +- `dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md` |
| 23 | +- `dev/build/ProjectInstructions/PROJECT_STATE.md` |
| 24 | +- `dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md` |
| 25 | +- `dev/build/ProjectInstructions/repository/www_migration_map.md` |
| 26 | +- `dev/scripts/start-dev.mjs` |
| 27 | +- `dev/tests/dev-runtime/StaticWebRootCompatibility.test.mjs` |
| 28 | +- `dev/tests/helpers/playwrightRepoServer.mjs` |
| 29 | +- `dev/tests/playwright/tools/StaticWebRootCompatibility.spec.mjs` |
| 30 | +- `src/dev-runtime/server/local-api-server.mjs` |
| 31 | +- `src/dev-runtime/server/static-web-root.mjs` |
| 32 | + |
| 33 | +## Implementation Notes |
| 34 | + |
| 35 | +- Added `src/dev-runtime/server/static-web-root.mjs` for shared local static route resolution. |
| 36 | +- Updated the local dev web server, Local API static fallback, and Playwright repo server helper to use the shared resolver. |
| 37 | +- Added configurable `webRoot` support for test helpers and local server internals. |
| 38 | +- Preserved public route URLs including `/index.html`, `/toolbox/index.html`, `/assets/...`, `/account/...`, `/admin/...`, and `/games/...`. |
| 39 | +- Preserved compatibility alias behavior such as `/tools/...` resolving to `/toolbox/...`. |
| 40 | +- Kept repository-root serving as the default until the actual `www/` move PR. |
| 41 | +- No browser-served files were moved. |
| 42 | +- No public URL changes were introduced. |
| 43 | +- No API/server architecture changes were introduced. |
| 44 | + |
| 45 | +## Owner Recommendation |
| 46 | + |
| 47 | +Ready for review as the route-root compatibility preparation step before moving browser-served files into `www/`. |
0 commit comments