Skip to content

Commit e5d71a8

Browse files
committed
ALFA 006 game hub create project validation
1 parent 6d94477 commit e5d71a8

8 files changed

Lines changed: 350 additions & 551 deletions

docs_build/dev/BUILD_PR.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
# PR_26175_ALFA_002-toolbox-status-bar-context-polish
1+
# PR_26175_ALFA_006-game-hub-create-project-validation
22

33
## Purpose
4-
Polish the shared toolbox status bar context display so it shows only selected-game name/purpose on the left and categorized tool context in the center.
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_002-toolbox-status-bar-context-polish`.
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-
- Do not include environment text in the status bar because environment already appears in the platform banner.
11-
- On the left side, display the selected Game Hub game name and selected Game Hub game purpose.
12-
- On the center side, display tool context messages for tool actions, save state, validation messages, warnings, or errors.
13-
- Preserve normal placement above the footer.
14-
- Preserve fullscreen/tool display mode bottom anchoring.
15-
- Preserve Idea Board selected-game filtering exclusion.
16-
- Preserve Game Hub as selected-game owner through the existing repository contract.
17-
- Keep the shared Theme V2 toolbox component model.
18-
- Update targeted Playwright coverage for the polished left and center context.
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.
1919

2020
## Exact Targets
2121
- `docs_build/dev/BUILD_PR.md`
22-
- `assets/theme-v2/js/toolbox-status-bar.js`
23-
- `assets/theme-v2/css/status.css`
24-
- `tests/playwright/tools/ToolboxSelectedGameStatusBar.spec.mjs`
25-
- `docs_build/dev/reports/PR_26175_ALFA_002-toolbox-status-bar-context-polish_report.md`
26-
- `docs_build/dev/reports/PR_26175_ALFA_002-toolbox-status-bar-context-polish_validation-lane.md`
27-
- `docs_build/dev/reports/PR_26175_ALFA_002-toolbox-status-bar-context-polish_requirements-checklist.md`
22+
- `toolbox/game-hub/game-hub.js`
23+
- `tests/playwright/tools/GameHubMockRepository.spec.mjs`
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`
2827
- `docs_build/dev/reports/codex_review.diff`
2928
- `docs_build/dev/reports/codex_changed_files.txt`
3029

3130
## Out Of Scope
32-
- No environment status in the toolbox status bar.
33-
- No row highlights.
34-
- No large banners.
35-
- No modal-style status messages.
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.
35+
- No browser-owned product data as source of truth.
36+
- No silent create-name fallback in the Game Hub page flow.
3637
- No inline styles, style blocks, or page-local CSS.
37-
- No API/service contract changes.
3838
- No engine core changes.
3939
- No `start_of_day` folder changes.
4040

4141
## Validation
42-
Run:
42+
Run targeted create-project validation:
4343

4444
```powershell
45-
npx playwright test tests/playwright/tools/ToolboxSelectedGameStatusBar.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"
4646
```
4747

48-
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:
4949

5050
```powershell
51-
rg -n "<style|style=" assets/theme-v2/js/toolbox-status-bar.js assets/theme-v2/css/status.css tests/playwright/tools/ToolboxSelectedGameStatusBar.spec.mjs
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
5252
```
5353

5454
## Artifact
5555
Create repo-structured delta ZIP:
5656

5757
```text
58-
tmp/PR_26175_ALFA_002-toolbox-status-bar-context-polish_delta.zip
58+
tmp/PR_26175_ALFA_006-game-hub-create-project-validation_delta.zip
5959
```
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: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
assets/theme-v2/css/status.css
2-
assets/theme-v2/js/toolbox-status-bar.js
31
docs_build/dev/BUILD_PR.md
4-
docs_build/dev/reports/PR_26175_ALFA_002-toolbox-status-bar-context-polish_report.md
5-
docs_build/dev/reports/PR_26175_ALFA_002-toolbox-status-bar-context-polish_validation-lane.md
6-
docs_build/dev/reports/PR_26175_ALFA_002-toolbox-status-bar-context-polish_requirements-checklist.md
2+
toolbox/game-hub/game-hub.js
3+
tests/playwright/tools/GameHubMockRepository.spec.mjs
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
77
docs_build/dev/reports/codex_changed_files.txt
88
docs_build/dev/reports/codex_review.diff
9-
tests/playwright/tools/ToolboxSelectedGameStatusBar.spec.mjs

0 commit comments

Comments
 (0)