Skip to content

Commit 11de077

Browse files
committed
Audit template V2 and align Audio SFX Playground styling - PR_26144_003-audit-template-v2-and-align-audio-sfx-css
1 parent 0ead3f6 commit 11de077

41 files changed

Lines changed: 293 additions & 2425 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Audio / SFX Template CSS Alignment Playwright Report
2+
3+
PR: `PR_26144_003-audit-template-v2-and-align-audio-sfx-css`
4+
5+
## Playwright Impact
6+
7+
Playwright impacted: Yes.
8+
9+
Behavior intended for Playwright validation:
10+
11+
- Audio / SFX Playground V2 launches directly without console errors.
12+
- Audio / SFX Playground V2 renders using `tools/_templates-v2/styles/toolStarter.css`.
13+
- Workspace V2 still shows the Audio / SFX Playground V2 tile.
14+
- Workspace V2 tile launch still opens Audio / SFX Playground V2 in workspace launch mode.
15+
16+
Expected pass behavior:
17+
18+
- `npm run test:workspace-v2` passes.
19+
- The tool page has `body[data-tool-id="audio-sfx-playground-v2"]`.
20+
- The tool page loads the shared template stylesheet and does not load `audioSfxPlaygroundV2.css`.
21+
- Workspace launch shows the workspace NAV and no console errors.
22+
23+
Expected fail behavior:
24+
25+
- Missing tile, failed launch, console error, broken stylesheet load, or hidden/incorrect workspace NAV should fail the impacted Workspace V2 checks.
26+
27+
## Local Result
28+
29+
Blocked in this environment.
30+
31+
- `npm run test:workspace-v2` failed because PowerShell blocked `npm.ps1` by execution policy.
32+
- `npm.cmd run test:workspace-v2` reached the package script but failed because `playwright` is not installed or available on PATH.
33+
- `npm.cmd ci` failed with `UNABLE_TO_VERIFY_LEAF_SIGNATURE` while fetching `ws-8.20.0.tgz` from npm, so the missing Playwright binary could not be installed locally.
34+
35+
## Completed Static Validation
36+
37+
- Changed HTML, CSS, JS, and JSON static validation passed:
38+
- JS/MJS checked with `node --check`.
39+
- JSON parsed.
40+
- HTML checked for inline script blocks, style blocks, and inline event handlers.
41+
- CSS checked for balanced braces.
42+
- `tools/_templates-v2/starter-project-template/config/starter.game.manifest.json` passed Workspace Manager V2 `validateGameManifest`.
43+
- `git diff --check -- tools/_templates-v2 tools/audio-sfx-playground-v2 docs/dev/reports` passed.
44+
45+
## Manual Validation Steps
46+
47+
1. Install dependencies in an environment with a trusted npm certificate chain.
48+
2. Run `npm run test:workspace-v2`.
49+
3. Open `/tools/audio-sfx-playground-v2/index.html`.
50+
4. Confirm the page renders with the Tool Template V2 visual pattern.
51+
5. Confirm browser devtools shows no console errors.
52+
6. Open `/tools/workspace-manager-v2/index.html?workspace=uat`.
53+
7. Seed the UAT manifest, launch the Audio / SFX Playground V2 tile, and confirm workspace mode opens with no console errors.
54+
55+
## Full Samples Smoke Test
56+
57+
Skipped. This change is limited to template/tool CSS alignment and does not broadly impact samples.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Template V2 Audit
2+
3+
PR: `PR_26144_003-audit-template-v2-and-align-audio-sfx-css`
4+
5+
## Target Resolution
6+
7+
The request named `tools/_template_v2`. The repo contains `tools/_templates-v2`, so this audit used `tools/_templates-v2` as the intended Tool Template V2 folder.
8+
9+
## Findings Before
10+
11+
- `tools/_templates-v2/starter-project-template/config/starter.project.json` used an old project/workspace-shaped payload instead of the current game manifest contract.
12+
- The old starter project JSON embedded Asteroids-specific sprite IDs and `games/Asteroids/game.manifest.json` references.
13+
- `tools/_templates-v2/vector-native-arcade/config/template.project.json` pointed at `games/Asteroids/main.js#bootAsteroids`.
14+
- `tools/_templates-v2/vector-native-arcade/runtime/bootstrap.runtime.json` pointed at `games/Asteroids/main.js` and `bootAsteroids`.
15+
- `tools/audio-sfx-playground-v2` still contained copied template support files that were not used by the SFX tool runtime.
16+
- `tools/audio-sfx-playground-v2/index.html` used a custom `audioSfxPlaygroundV2.css` stylesheet.
17+
18+
## Changes Made
19+
20+
- Replaced the old starter project JSON with `tools/_templates-v2/starter-project-template/config/starter.game.manifest.json`.
21+
- Removed Asteroids references from `tools/_templates-v2`.
22+
- Removed `tools/_templates-v2/vector-native-arcade/runtime/bootstrap.runtime.json` because it was game-specific and not usable as a neutral template runtime contract.
23+
- Updated template docs to describe the current minimal game manifest starter.
24+
- Added reusable range, toggle, meter, and preview tag styling to `tools/_templates-v2/styles/toolStarter.css`.
25+
- Updated Audio / SFX Playground V2 to load `../_templates-v2/styles/toolStarter.css`.
26+
- Removed the audio tool's custom CSS file and unused copied starter/template support files.
27+
28+
## Findings After
29+
30+
- `rg "Asteroids|asteroids|games/Asteroids|bootAsteroids" tools/_templates-v2 tools/audio-sfx-playground-v2` returned no matches.
31+
- `tools/_templates-v2/starter-project-template/config/starter.game.manifest.json` validates through Workspace Manager V2 `validateGameManifest`.
32+
- Audio / SFX Playground V2 now renders on the Tool Template V2 CSS class pattern while preserving Workspace V2 launch aliases used by existing Playwright coverage.
33+
34+
## Full Samples Smoke Test
35+
36+
Skipped. This change is limited to template/tool CSS alignment and does not broadly impact samples.

tools/_templates-v2/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ tools/_templates-v2/
3333
playwright/
3434
FirstClassToolStarter.spec.mjs
3535
starter-project-template/
36+
config/starter.game.manifest.json
3637
vector-native-arcade/
3738
```
3839

@@ -52,7 +53,7 @@ tools/_templates-v2/
5253

5354
## Additional Template Folders
5455

55-
- `starter-project-template/`: existing shared project manifest starter.
56+
- `starter-project-template/`: current minimal game manifest starter.
5657
- `vector-native-arcade/`: existing vector-native arcade project/game starter.
5758

5859
These folders remain under `tools/_templates-v2/` as support/reference template assets. They are not the active First-Class Tool V2 starter shell.
Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
1-
# Starter Project Template
1+
# Starter Game Manifest Template
22

3-
This template is a single reusable project manifest for the shared tools project system.
3+
This template is a minimal reusable game manifest for Workspace Manager V2 and First-Class Tool V2 launch validation.
44

55
## Purpose
6-
- prove cross-tool open/save/reload compatibility
7-
- keep assets and palettes referenced by shared ids and paths
8-
- avoid introducing gameplay systems or sample cards
6+
- provide the current `html-js-gaming.game-manifest` structure
7+
- keep tool payloads under root `tools`
8+
- avoid gameplay-specific runtime or sample dependencies
99

1010
## Open flow
11-
1. Open any active first-class tool.
12-
2. Use the shared shell `Open Project` action.
13-
3. Select `tools/_templates-v2/starter-project-template/config/starter.project.json`.
11+
1. Open Workspace Manager V2.
12+
2. Import or load `tools/_templates-v2/starter-project-template/config/starter.game.manifest.json`.
13+
3. Use the generated toolState context to validate starter tool wiring.
1414

1515
## Shared references used
16-
- vector: `tools/_templates-v2/vector-native-arcade/assets/vectors/template-player.vector.json`
17-
- tilemap: `tools/_templates-v2/vector-native-arcade/assets/tilemaps/template-arena.tilemap.json`
18-
- parallax: `tools/_templates-v2/vector-native-arcade/assets/parallax/template-backdrop.parallax.json`
19-
- sprite: `games/Asteroids/game.manifest.json#tools.sprite-editor.sprites.sprite.asteroids.demo.runtime`
20-
- palette: `tools/_templates-v2/vector-native-arcade/assets/palettes/vector-native-primary.palette.json`
16+
- manifest: `tools/_templates-v2/starter-project-template/config/starter.game.manifest.json`
17+
- palette source: `tools/_templates-v2`
2118

2219
## Notes
23-
- `Sprite Editor` remains first-class.
24-
- `SpriteEditor_old_keep` remains legacy and hidden.
25-
- `tools/index.html` remains tool-only and sample-free.
26-
20+
- The template manifest intentionally has an empty Asset Manager V2 registry.
21+
- The template manifest contains no game-specific runtime references.
22+
- Sample launch validation remains out of scope until sample JSON alignment is complete.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"$schema": "tools/schemas/game.manifest.schema.json",
3+
"schema": "html-js-gaming.game-manifest",
4+
"version": 1,
5+
"game": {
6+
"id": "starter-template",
7+
"name": "Starter Template",
8+
"folder": "_starter-template"
9+
},
10+
"screen": {
11+
"width": 1280,
12+
"height": 720
13+
},
14+
"launch": {
15+
"directPath": "/games/_starter-template/index.html",
16+
"workspaceManagerPath": "/tools/workspace-manager-v2/index.html",
17+
"workspaceManagerOptional": true
18+
},
19+
"tools": {
20+
"asset-manager-v2": {
21+
"$schema": "tools/schemas/tools/asset-manager-v2.schema.json",
22+
"schema": "html-js-gaming.asset-manager-v2",
23+
"version": 1,
24+
"id": "starter-template.assets",
25+
"name": "Starter Template Assets",
26+
"source": "manifest",
27+
"assets": {}
28+
},
29+
"palette-manager-v2": {
30+
"$schema": "tools/schemas/tools/palette-manager-v2.schema.json",
31+
"schema": "html-js-gaming.palette",
32+
"version": 1,
33+
"id": "starter-template.palette",
34+
"name": "Starter Template Palette",
35+
"source": "tools/_templates-v2",
36+
"sourceId": "tools/_templates-v2/starter-project-template/config/starter.game.manifest.json",
37+
"locked": true,
38+
"swatches": [
39+
{
40+
"symbol": "B",
41+
"hex": "#05070D",
42+
"name": "Template Background",
43+
"source": "Tool Template V2",
44+
"tags": ["background"]
45+
},
46+
{
47+
"symbol": "L",
48+
"hex": "#6FD3FF",
49+
"name": "Template Line",
50+
"source": "Tool Template V2",
51+
"tags": ["line", "accent"]
52+
},
53+
{
54+
"symbol": "F",
55+
"hex": "#E8F0FF",
56+
"name": "Template Fill",
57+
"source": "Tool Template V2",
58+
"tags": ["fill", "ui"]
59+
}
60+
]
61+
},
62+
"input-mapping-v2": {
63+
"$schema": "tools/schemas/tools/input-mapping-v2.schema.json",
64+
"toolId": "input-mapping-v2",
65+
"version": 1,
66+
"engineInputModel": "src/engine/input/InputMap",
67+
"actions": [
68+
{
69+
"action": "confirm",
70+
"label": "Confirm",
71+
"inputs": [
72+
{
73+
"source": "keyboard",
74+
"binding": "Enter",
75+
"label": "Enter",
76+
"engine": "Keyboard"
77+
}
78+
]
79+
}
80+
]
81+
}
82+
}
83+
}

0 commit comments

Comments
 (0)