Skip to content

Commit 8ac1bb1

Browse files
authored
Merge PR_26175_ALFA_006 game hub create project validation
Merge PR_26175_ALFA_006-game-hub-create-project-validation.
2 parents 793cf75 + 721927a commit 8ac1bb1

8 files changed

Lines changed: 291 additions & 152 deletions

docs_build/dev/BUILD_PR.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,59 @@
1-
# PR_26175_ALFA_005-game-hub-audit-findings-cleanup
1+
# PR_26175_ALFA_006-game-hub-create-project-validation
22

33
## Purpose
4-
Clean up the targeted Game Hub audit findings from `PR_26175_ALFA_004-game-hub-completion-status-audit`.
4+
Add creator-facing validation for the Game Hub create-project row so blank game names do not silently create fallback projects.
55

66
## Source Of Truth
7-
This `BUILD_PR.md` is the source of truth for `PR_26175_ALFA_005-game-hub-audit-findings-cleanup`.
7+
This `BUILD_PR.md` is the source of truth for `PR_26175_ALFA_006-game-hub-create-project-validation`.
88

99
## Exact Scope
10-
- Resolve the targeted Game Hub Playwright failures recorded by the ALFA_004 audit.
11-
- Keep the cleanup focused on stale or over-broad test expectations unless product code is required by validation.
12-
- Preserve the existing Game Hub table workflow behavior.
13-
- Preserve the shared toolbox selected-game status bar behavior.
14-
- Preserve Game Journey completion-metrics API/service behavior.
15-
- Do not implement unrelated product or UI changes.
16-
17-
## ALFA_004 Findings To Clean Up
18-
- `tests/playwright/tools/GameHubMockRepository.spec.mjs:238`: duplicate `Open Game Hub` link strict-mode conflict after the shared toolbox status bar added its own Game Hub action.
19-
- `tests/playwright/tools/GameHubMockRepository.spec.mjs:257`: stale expectation that no `Game Status` label exists.
20-
- `tests/playwright/tools/GameHubMockRepository.spec.mjs:582`: stale guest-mode expectation that no `Game Status` label exists.
21-
- `tests/playwright/tools/GameHubMockRepository.spec.mjs:1019`: toolbox role-filter lane records known `500 /api/game-journey/completion-metrics` requests outside the Game Hub table workflow.
10+
- Validate the Game Hub add-game row before calling the repository create method.
11+
- Block signed-in creator saves when the game name is blank or whitespace-only.
12+
- Keep the add-game row open after validation failure.
13+
- Show a creator-safe validation message in the existing Game Hub status log.
14+
- Mark the game name input invalid for accessibility.
15+
- Preserve valid create/open/delete behavior.
16+
- Preserve guest save redirect behavior.
17+
- Preserve API/service/repository contracts.
18+
- Add targeted Playwright coverage for the create validation path.
2219

2320
## Exact Targets
2421
- `docs_build/dev/BUILD_PR.md`
22+
- `toolbox/game-hub/game-hub.js`
2523
- `tests/playwright/tools/GameHubMockRepository.spec.mjs`
26-
- `docs_build/dev/reports/PR_26175_ALFA_005-game-hub-audit-findings-cleanup_report.md`
27-
- `docs_build/dev/reports/PR_26175_ALFA_005-game-hub-audit-findings-cleanup_validation-lane.md`
28-
- `docs_build/dev/reports/PR_26175_ALFA_005-game-hub-audit-findings-cleanup_requirements-checklist.md`
24+
- `docs_build/dev/reports/PR_26175_ALFA_006-game-hub-create-project-validation_report.md`
25+
- `docs_build/dev/reports/PR_26175_ALFA_006-game-hub-create-project-validation_validation-lane.md`
26+
- `docs_build/dev/reports/PR_26175_ALFA_006-game-hub-create-project-validation_requirements-checklist.md`
2927
- `docs_build/dev/reports/codex_review.diff`
3028
- `docs_build/dev/reports/codex_changed_files.txt`
3129

3230
## Out Of Scope
33-
- No Game Hub product or UI behavior changes unless targeted validation proves they are required.
34-
- No Game Journey completion-metrics product/API/service changes.
35-
- No API/service contract changes.
31+
- No repository/API/service contract changes.
32+
- No Game Journey completion-metrics changes.
33+
- No shared toolbox status bar changes.
34+
- No unrelated Game Hub workflow changes.
3635
- No browser-owned product data as source of truth.
37-
- No silent fallbacks.
36+
- No silent create-name fallback in the Game Hub page flow.
3837
- No inline styles, style blocks, or page-local CSS.
3938
- No engine core changes.
4039
- No `start_of_day` folder changes.
4140

4241
## Validation
43-
Run:
42+
Run targeted create-project validation:
4443

4544
```powershell
46-
npx playwright test tests/playwright/tools/GameHubMockRepository.spec.mjs --workers=1
45+
npx playwright test tests/playwright/tools/GameHubMockRepository.spec.mjs --workers=1 --grep "Game Hub creates, opens, and deletes mock games"
4746
```
4847

49-
Also verify the changed source does not introduce inline styles or style blocks:
48+
Also verify changed source does not introduce inline styles or style blocks:
5049

5150
```powershell
52-
rg -n "<[s]tyle|[s]tyle=" tests/playwright/tools/GameHubMockRepository.spec.mjs docs_build/dev/BUILD_PR.md docs_build/dev/reports/PR_26175_ALFA_005-game-hub-audit-findings-cleanup_report.md docs_build/dev/reports/PR_26175_ALFA_005-game-hub-audit-findings-cleanup_validation-lane.md docs_build/dev/reports/PR_26175_ALFA_005-game-hub-audit-findings-cleanup_requirements-checklist.md
51+
rg -n "<[s]tyle|[s]tyle=" toolbox/game-hub/game-hub.js tests/playwright/tools/GameHubMockRepository.spec.mjs docs_build/dev/BUILD_PR.md docs_build/dev/reports/PR_26175_ALFA_006-game-hub-create-project-validation_report.md docs_build/dev/reports/PR_26175_ALFA_006-game-hub-create-project-validation_validation-lane.md docs_build/dev/reports/PR_26175_ALFA_006-game-hub-create-project-validation_requirements-checklist.md
5352
```
5453

5554
## Artifact
5655
Create repo-structured delta ZIP:
5756

5857
```text
59-
tmp/PR_26175_ALFA_005-game-hub-audit-findings-cleanup_delta.zip
58+
tmp/PR_26175_ALFA_006-game-hub-create-project-validation_delta.zip
6059
```
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# PR_26175_ALFA_006-game-hub-create-project-validation Report
2+
3+
## Overall Status
4+
PASS
5+
6+
Game Hub now validates the add-game row before a signed-in creator can create a project with a blank or whitespace-only name. The fix stays in the Game Hub page boundary and preserves the repository/API/service contract.
7+
8+
## Evidence Matrix
9+
10+
| Requirement | Status | Evidence |
11+
| --- | --- | --- |
12+
| Replace BUILD source of truth with ALFA_006 | PASS | `docs_build/dev/BUILD_PR.md:1` identifies `PR_26175_ALFA_006-game-hub-create-project-validation`. |
13+
| Validate create row before repository create | PASS | `saveAddedGame` calls `validateAddedGameFields` before `repository.createGame`: `toolbox/game-hub/game-hub.js:681`, `toolbox/game-hub/game-hub.js:703`, `toolbox/game-hub/game-hub.js:707`. |
14+
| Block blank or whitespace-only names | PASS | Validation trims the name and returns before save when empty: `toolbox/game-hub/game-hub.js:684`, `toolbox/game-hub/game-hub.js:685`, `toolbox/game-hub/game-hub.js:691`. |
15+
| Keep add row open and show creator-safe message | PASS | Validation does not re-render or call the repository on failure and writes `Enter a game name before saving.` to the existing status log: `toolbox/game-hub/game-hub.js:690`. |
16+
| Mark invalid input accessibly | PASS | The add-game input is required and receives `aria-invalid`: `toolbox/game-hub/game-hub.js:445`, `toolbox/game-hub/game-hub.js:687`. |
17+
| Preserve valid create/open/delete behavior | PASS | Existing create/open/delete test still creates `Launch Test Game`, opens it, edits it, creates an archive game, and deletes the open game: `tests/playwright/tools/GameHubMockRepository.spec.mjs:386`, `tests/playwright/tools/GameHubMockRepository.spec.mjs:425`. |
18+
| Preserve guest save redirect behavior | PASS | `ensureProjectRecordsSaveAllowedForSave` still runs before validation, so guest save handling remains unchanged: `toolbox/game-hub/game-hub.js:700`. |
19+
| Preserve API/service/repository contract | PASS | No API, service, or repository files changed. |
20+
| No silent create-name fallback in page flow | PASS | Targeted test verifies blank and whitespace saves do not create `Untitled Game`: `tests/playwright/tools/GameHubMockRepository.spec.mjs:379`, `tests/playwright/tools/GameHubMockRepository.spec.mjs:384`. |
21+
22+
## Validation Summary
23+
- PASS: `npx playwright test tests/playwright/tools/GameHubMockRepository.spec.mjs --workers=1 --grep "Game Hub creates, opens, and deletes mock games"` produced 1 passed, 0 failed.
24+
- PASS: changed-source style scan found no inline style or style-block matches.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# PR_26175_ALFA_006-game-hub-create-project-validation Requirements Checklist
2+
3+
- PASS: BUILD_PR.md was replaced with ALFA_006 as the source of truth.
4+
- PASS: Game Hub validates the add-game row before repository create.
5+
- PASS: Blank creator saves are blocked.
6+
- PASS: Whitespace-only creator saves are blocked.
7+
- PASS: The add-game row stays open after validation failure.
8+
- PASS: A creator-safe validation message appears in the existing Game Hub status log.
9+
- PASS: The game name input is marked invalid for accessibility.
10+
- PASS: Valid create/open/delete behavior is preserved.
11+
- PASS: Guest save redirect behavior is preserved.
12+
- PASS: API/service/repository contracts are preserved.
13+
- PASS: No browser-owned product data is used as source of truth.
14+
- PASS: No silent create-name fallback remains in the Game Hub page flow.
15+
- PASS: No inline styles, style blocks, or page-local CSS were added.
16+
- PASS: Targeted Playwright validation passed.
17+
- PASS: Required reports were created.
18+
- PASS: Repo-structured delta ZIP was created.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# PR_26175_ALFA_006-game-hub-create-project-validation Validation Lane
2+
3+
## Commands
4+
```powershell
5+
npx playwright test tests/playwright/tools/GameHubMockRepository.spec.mjs --workers=1 --grep "Game Hub creates, opens, and deletes mock games"
6+
```
7+
8+
Result: PASS, 1 passed and 0 failed.
9+
10+
```powershell
11+
rg -n "<[s]tyle|[s]tyle=" toolbox/game-hub/game-hub.js tests/playwright/tools/GameHubMockRepository.spec.mjs docs_build/dev/BUILD_PR.md docs_build/dev/reports/PR_26175_ALFA_006-game-hub-create-project-validation_report.md docs_build/dev/reports/PR_26175_ALFA_006-game-hub-create-project-validation_validation-lane.md docs_build/dev/reports/PR_26175_ALFA_006-game-hub-create-project-validation_requirements-checklist.md
12+
```
13+
14+
Result: PASS, no matches.
15+
16+
## Notes
17+
- The targeted lane verifies blank-name validation, whitespace-name validation, valid create/open/delete behavior, and existing Game Hub table behavior in the create workflow.
18+
- No product data source, API, service, or repository contract changes were made.
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
docs_build/dev/BUILD_PR.md
2+
toolbox/game-hub/game-hub.js
23
tests/playwright/tools/GameHubMockRepository.spec.mjs
3-
docs_build/dev/reports/PR_26175_ALFA_005-game-hub-audit-findings-cleanup_report.md
4-
docs_build/dev/reports/PR_26175_ALFA_005-game-hub-audit-findings-cleanup_validation-lane.md
5-
docs_build/dev/reports/PR_26175_ALFA_005-game-hub-audit-findings-cleanup_requirements-checklist.md
4+
docs_build/dev/reports/PR_26175_ALFA_006-game-hub-create-project-validation_report.md
5+
docs_build/dev/reports/PR_26175_ALFA_006-game-hub-create-project-validation_validation-lane.md
6+
docs_build/dev/reports/PR_26175_ALFA_006-game-hub-create-project-validation_requirements-checklist.md
67
docs_build/dev/reports/codex_changed_files.txt
78
docs_build/dev/reports/codex_review.diff

0 commit comments

Comments
 (0)