Skip to content

Commit 7621082

Browse files
author
DavidQ
committed
Add World Vector Studio V2 and Object Vector Studio V2 from Tool Template V2 - PR_26132_001-add-world-object-vector-studios
1 parent e39e49d commit 7621082

79 files changed

Lines changed: 4476 additions & 7 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# PR_26132_001-add-world-object-vector-studios
2+
3+
## Purpose
4+
5+
Add World Vector Studio and Object Vector Studio as copied First-Class Tool V2 starter surfaces while keeping Primitive Skin Editor and Vector Map Editor intact.
6+
7+
## Changes
8+
9+
- Copied `tools/templates-v2/` into `tools/world-vector-studio-v2/`.
10+
- Copied `tools/templates-v2/` into `tools/object-vector-studio-v2/`.
11+
- Updated copied tool ids, visible titles, headers, README documentation, and copied launch checks.
12+
- Registered both new tools in `tools/toolRegistry.js` for registry-driven tools index launch wiring.
13+
- Marked Vector Map Editor and Primitive Skin Editor as deprecated in tool tiles and their existing documentation only.
14+
- Added How To Use pages for the two new studio tools.
15+
- Added Workspace Manager V2 Playwright coverage for tools index cards, launch definitions, and direct launch of both copied tool shells.
16+
17+
## Validation
18+
19+
- `npm run test:workspace-v2` passed: 38 tests.
20+
- Full samples smoke test was not run per BUILD scope.

tests/playwright/tools/WorkspaceManagerV2.spec.mjs

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,18 @@ test.describe("Workspace Manager V2 bootstrap", () => {
982982
await expect(textToSpeechToolCard).toBeVisible();
983983
await expect(textToSpeechToolCard.locator("a", { hasText: "Text to Speech V2" })).toHaveAttribute("href", "/tools/text2speech-V2/index.html");
984984
await expect(textToSpeechToolCard).toContainText("First-Class Tool V2 for browser speech synthesis");
985+
const worldVectorStudioCard = page.locator(".tools-platform-card", { has: page.locator("h3", { hasText: "World Vector Studio" }) });
986+
await expect(worldVectorStudioCard).toBeVisible();
987+
await expect(worldVectorStudioCard.locator("a", { hasText: "World Vector Studio" })).toHaveAttribute("href", "/tools/world-vector-studio-v2/index.html");
988+
await expect(worldVectorStudioCard).toContainText("Terrain, tile/world geometry, layered scenes, level/environment layout, and parallax/background structures");
989+
const objectVectorStudioCard = page.locator(".tools-platform-card", { has: page.locator("h3", { hasText: "Object Vector Studio" }) });
990+
await expect(objectVectorStudioCard).toBeVisible();
991+
await expect(objectVectorStudioCard.locator("a", { hasText: "Object Vector Studio" })).toHaveAttribute("href", "/tools/object-vector-studio-v2/index.html");
992+
await expect(objectVectorStudioCard).toContainText("Ships, enemies, pickups, actors, and reusable gameplay entities");
993+
const vectorMapEditorCard = page.locator(".tools-platform-card", { has: page.locator("h3", { hasText: "Vector Map Editor" }) });
994+
await expect(vectorMapEditorCard).toContainText("Deprecated");
995+
const primitiveSkinEditorCard = page.locator(".tools-platform-card", { has: page.locator("h3", { hasText: "Primitive Skin Editor" }) });
996+
await expect(primitiveSkinEditorCard).toContainText("Deprecated");
985997
const toolsIndexState = await page.evaluate(async () => {
986998
const registryModule = await import("/tools/toolRegistry.js");
987999
const launchModule = await import("/tools/shared/toolLaunchSSoTData.js");
@@ -1010,6 +1022,10 @@ test.describe("Workspace Manager V2 bootstrap", () => {
10101022
plannedCards: Array.from(plannedToolsGrid?.querySelectorAll(".card h3") || [])
10111023
.map((heading) => heading.textContent.trim()),
10121024
registryIds: registryModule.getToolRegistry().map((tool) => tool.id),
1025+
studioLaunchDefinitions: {
1026+
world: launchModule.getSampleToolLaunchDefinition("world-vector-studio-v2"),
1027+
object: launchModule.getSampleToolLaunchDefinition("object-vector-studio-v2")
1028+
},
10131029
removedLaunchDefinitions: {
10141030
assetBrowser: launchModule.getSampleToolLaunchDefinition("asset-browser"),
10151031
tileModelConverter: launchModule.getSampleToolLaunchDefinition("tile-model-converter")
@@ -1044,6 +1060,11 @@ test.describe("Workspace Manager V2 bootstrap", () => {
10441060
expect(toolsIndexState.workflowCards).toEqual(["Workspace Manager V2"]);
10451061
expect(toolsIndexState.utilitiesCards).not.toContain("Workspace Manager V2");
10461062
expect(toolsIndexState.utilitiesCards).toContain("Text to Speech V2");
1063+
expect(toolsIndexState.allCards).toEqual(expect.arrayContaining(["World Vector Studio", "Object Vector Studio"]));
1064+
expect(toolsIndexState.registryIds).toEqual(expect.arrayContaining(["world-vector-studio-v2", "object-vector-studio-v2"]));
1065+
expect(toolsIndexState.launchIds).toEqual(expect.arrayContaining(["tool.world-vector-studio-v2", "tool.object-vector-studio-v2"]));
1066+
expect(toolsIndexState.studioLaunchDefinitions.world.launchDefinition.targetPath).toBe("/tools/world-vector-studio-v2/index.html");
1067+
expect(toolsIndexState.studioLaunchDefinitions.object.launchDefinition.targetPath).toBe("/tools/object-vector-studio-v2/index.html");
10471068
expect(toolsIndexState.allCards).not.toContain("Asset Browser / Import Hub");
10481069
expect(toolsIndexState.allCards).not.toContain("Tile Model Converter");
10491070
expect(toolsIndexState.registryIds).not.toContain("asset-browser");
@@ -1091,6 +1112,48 @@ test.describe("Workspace Manager V2 bootstrap", () => {
10911112
}
10921113
});
10931114

1115+
test("launches World Vector Studio and Object Vector Studio copied tool shells", async ({ page }) => {
1116+
const server = await startRepoServer();
1117+
const pageErrors = [];
1118+
1119+
page.on("pageerror", (error) => {
1120+
pageErrors.push(error.message);
1121+
});
1122+
1123+
await coverageReporter.start(page);
1124+
try {
1125+
for (const tool of [
1126+
{
1127+
description: "Terrain, tile/world geometry, layered scenes, level/environment layout, and parallax/background structures",
1128+
id: "world-vector-studio-v2",
1129+
name: "World Vector Studio",
1130+
path: "world-vector-studio-v2"
1131+
},
1132+
{
1133+
description: "Ships, enemies, pickups, actors, and reusable gameplay entities",
1134+
id: "object-vector-studio-v2",
1135+
name: "Object Vector Studio",
1136+
path: "object-vector-studio-v2"
1137+
}
1138+
]) {
1139+
await page.goto(`${server.baseUrl}/tools/${tool.path}/index.html`, { waitUntil: "networkidle" });
1140+
await expect(page.locator(`body.tools-platform-tool-page[data-tool-id="${tool.id}"]`)).toBeVisible();
1141+
await expect(page.locator("[data-tool-starter-header]")).toContainText(tool.name);
1142+
await expect(page.locator("[data-tool-starter-header]")).toContainText(tool.description);
1143+
await expect(page.locator(".tool-starter__tool__menu")).toBeVisible();
1144+
await expect(page.locator(".tool-starter__workspace__menu")).toBeHidden();
1145+
await page.locator("#sourceInput").fill(`${tool.name} launch coverage`);
1146+
await page.locator("#toolExportButton").click();
1147+
await expect(page.locator("#inspectorOutput")).toContainText(`"toolId": "${tool.id}"`);
1148+
await expect(page.locator("#statusLog")).toHaveValue(new RegExp(`Processed source value: ${tool.name} launch coverage`));
1149+
}
1150+
expect(pageErrors).toEqual([]);
1151+
} finally {
1152+
await coverageReporter.stop(page);
1153+
await server.close();
1154+
}
1155+
});
1156+
10941157
test("uses First-Class Tool V2 theme contract", async ({ page }) => {
10951158
const server = await openWorkspaceManagerV2(page);
10961159
const pageErrors = [];

tools/SVG Asset Studio.zip

34.6 KB
Binary file not shown.

tools/Skin Editor/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Skin Editor
22

3+
Deprecated: use Object Vector Studio for ships, enemies, pickups, actors, and reusable gameplay entities. Primitive Skin Editor remains available for existing workflows and has not been renamed or deleted.
4+
35
Skin Editor is a visual-plus-JSON skin workflow tool for:
46

57
- Breakout

tools/Skin Editor/how_to_use.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
<main class="wrap">
1414
<section class="hero">
1515
<h1>Skin Editor: How To Use</h1>
16-
<p class="subtitle">Edit game skin JSON for Breakout, Pong, Solar System, and Bouncing Ball.</p>
16+
<p class="subtitle">Deprecated: use Object Vector Studio for ships, enemies, pickups, actors, and reusable gameplay entities.</p>
1717
</section>
1818

1919
<section class="section">
2020
<h2>Details</h2>
2121
<div class="card">
22+
<p><strong>Deprecated:</strong> Primitive Skin Editor remains available for existing workflows and has not been renamed or deleted.</p>
2223
<p>Skin Editor manages color/size skin payloads for arcade games and stores overrides in browser local storage for immediate play-test loops.</p>
2324
</div>
2425
</section>

tools/Vector Map Editor.zip

42.2 KB
Binary file not shown.

tools/Vector Map Editor/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ README.md
55

66
# Vector Map Editor
77

8+
Deprecated: use World Vector Studio for terrain, tile/world geometry, layered scenes, level/environment layout, and parallax/background structures. Vector Map Editor remains available for existing workflows and has not been renamed or deleted.
9+
810
High-level overview for 'Vector Map Editor' under 'tools/Vector Map Editor/'.
911

1012
## Purpose

tools/Vector Map Editor/how_to_use.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
<main class="wrap">
1414
<section class="hero">
1515
<h1>Vector Map Editor: How To Use</h1>
16-
<p class="subtitle">Detailed workflow with practical steps and control guidance.</p>
16+
<p class="subtitle">Deprecated: use World Vector Studio for terrain, tile/world geometry, layered scenes, level/environment layout, and parallax/background structures.</p>
1717
</section>
1818

1919
<section class="section">
2020
<h2>Details</h2>
2121
<div class="card">
22+
<p><strong>Deprecated:</strong> Vector Map Editor remains available for existing workflows and has not been renamed or deleted.</p>
2223
<p>Vector geometry authoring tool for map layout, collision review, and runtime export workflows.</p>
2324
</div>
2425
</section>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Object Vector Studio
2+
3+
Object Vector Studio is a First-Class Tool V2 surface for ships, enemies, pickups, actors, and reusable gameplay entities.
4+
5+
The tool folder was copied from `tools/templates-v2/` for `PR_26132_001-add-world-object-vector-studios`. It keeps the copied template CSS and modular control structure intact while giving the new studio its own first-class tool id: `object-vector-studio-v2`.
6+
7+
## Scope
8+
9+
- Ships and player/enemy actor vectors.
10+
- Pickups, hazards, projectiles, and reusable gameplay entities.
11+
- Entity-oriented vector object previews.
12+
- Reusable actor/object art structures for game manifests and future tool payloads.
13+
14+
## Runtime Notes
15+
16+
- The current implementation is the copied Tool Template V2 shell with Object Vector Studio naming and documentation.
17+
- JavaScript and CSS remain external.
18+
- The copied `docs/CONTROL_SERVICE_CONTRACTS.md` and `docs/BATCH_GUARDRAIL_CONTRACT.md` remain the local implementation contracts.
19+
- Primitive Skin Editor and Vector Map Editor remain available, but their active tool tiles are marked deprecated in favor of the new studio split.
20+
21+
## Validation
22+
23+
Targeted validation for this PR is:
24+
25+
`npm run test:workspace-v2`
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Tool Template V2 Batch Guardrail Contract
2+
3+
Batch operations process repeated work across real discovered inputs. A First-Class Tool V2 batch flow must be explicit, observable, and safe to resume or diagnose.
4+
5+
## Discovery Rules
6+
7+
- Discover real files and directories.
8+
- Never assume numeric folder sequences.
9+
- Missing discovered candidates are logged as `SKIP`, not `FAIL`, unless the missing item is the selected single input.
10+
- Logs must identify the resolved input path or identifier for every item.
11+
12+
## Per-Item Logging
13+
14+
Every item must log exactly one terminal outcome through the tool logger:
15+
16+
- `OK`: item completed and wrote or updated the expected output.
17+
- `WARN`: item completed with a recoverable warning.
18+
- `FAIL`: item failed with an actionable error.
19+
- `SKIP`: item was intentionally skipped.
20+
21+
Per-item logs must include the item identifier and the reason for `WARN`, `FAIL`, or `SKIP`.
22+
23+
## Failure Isolation
24+
25+
- One item failure must not stop the batch unless the failure is global.
26+
- Global failures include missing required configuration, unavailable repo access, invalid destination root, or a cancelled run.
27+
- Batch processors must keep processing remaining discovered items after item-level `FAIL` or `SKIP` outcomes.
28+
29+
## Summary Contract
30+
31+
Every batch run must finish with a summary that includes:
32+
33+
- `written`
34+
- `failed`
35+
- `skipped`
36+
- `warnings`
37+
38+
The summary must match the per-item log outcomes.
39+
40+
## Stop/Cancel Contract
41+
42+
Long-running batches must support a stop or cancel pattern when applicable.
43+
44+
- Stop/cancel requests must prevent new items from starting.
45+
- Already-running item work should finish or fail safely.
46+
- Cancelled remaining items should be logged as `SKIP` or another clearly documented non-success outcome.
47+
- The final summary must make cancellation visible.
48+
49+
## No Silent Fallback
50+
51+
Batch processors must not invent default inputs, substitute fallback targets, or claim success when a fallback or partial result occurred.

0 commit comments

Comments
 (0)