Skip to content

Commit fb84cfb

Browse files
committed
Replace Objects dev copy with production-safe status summary - PR_26161_006-objects-production-copy-and-status
1 parent 5ccfdc8 commit fb84cfb

10 files changed

Lines changed: 814 additions & 608 deletions

File tree

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
# git status --short
22
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
33
M docs_build/dev/reports/playwright_v8_coverage_report.txt
4+
M src/dev-runtime/guest-seeds/tool-metadata-inventory.js
45
M tests/playwright/tools/ObjectsTool.spec.mjs
6+
M tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs
57
M toolbox/objects/index.html
68
M toolbox/objects/objects.js
7-
?? docs_build/dev/reports/objects-role-type-save-fix-report.md
9+
?? docs_build/dev/reports/objects-production-copy-and-status-report.md
810

911
# git ls-files --others --exclude-standard
10-
docs_build/dev/reports/objects-role-type-save-fix-report.md
12+
docs_build/dev/reports/objects-production-copy-and-status-report.md
1113

1214
# git diff --stat
13-
.../dev/reports/coverage_changed_js_guardrail.txt | 6 +-
15+
.../dev/reports/coverage_changed_js_guardrail.txt | 3 +-
1416
.../dev/reports/playwright_v8_coverage_report.txt | 13 +-
15-
tests/playwright/tools/ObjectsTool.spec.mjs | 32 +++--
16-
toolbox/objects/index.html | 8 +-
17-
toolbox/objects/objects.js | 142 ++++++++++++---------
18-
5 files changed, 111 insertions(+), 90 deletions(-)
17+
.../guest-seeds/tool-metadata-inventory.js | 10 +-
18+
tests/playwright/tools/ObjectsTool.spec.mjs | 66 ++++++--
19+
.../tools/ToolboxAdminMetadataSsot.spec.mjs | 2 +-
20+
toolbox/objects/index.html | 41 +++--
21+
toolbox/objects/objects.js | 180 ++++++++++++---------
22+
7 files changed, 190 insertions(+), 125 deletions(-)

docs_build/dev/reports/codex_review.diff

Lines changed: 578 additions & 476 deletions
Large diffs are not rendered by default.

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ Source: Playwright/Chromium built-in V8 coverage from the active Playwright run.
77

88
Changed runtime JS files considered:
99
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
10-
(67%) src/engine/object-model/objectModelRegistry.js - executed lines 139/139; executed functions 4/6
11-
(94%) toolbox/objects/objects.js - executed lines 762/762; executed functions 80/85
10+
(93%) toolbox/objects/objects.js - executed lines 790/790; executed functions 75/81
1211

1312
Guardrail warnings:
1413
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file missing from coverage; advisory only
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# PR_26161_006 Objects Production Copy And Status Report
2+
3+
## Scope
4+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before edits.
5+
- Verified current branch is `main`.
6+
- Treated Objects copy as production-facing while preserving table-first editing, wireframe status, Add Object below the table, Add-disable behavior, row Edit/Trash/Cancel, and sprite asset linking.
7+
- No sample JSON alignment, auth behavior, production DB behavior, or engine runtime behavior was added.
8+
9+
## Implementation Evidence
10+
- Replaced Objects center copy with creator-facing wording: `Object Builder`, production-safe page description, and neutral object table guidance.
11+
- Replaced Readiness Checks with an `Object Status` table covering ready objects, render assets, missing hitboxes, and missing events.
12+
- Removed low-value Object Status rows for object row, object names, and object roles.
13+
- Preserved wireframe-safe labels for unavailable hitbox/event values with `Not connected yet` messaging.
14+
- Kept blank/None render rows free of render asset requirements and preserved Sprite render asset create/resolve behavior.
15+
- Updated the Objects tool metadata copy because the runtime page title consumes the DB/mock metadata record.
16+
17+
## Validation
18+
- PASS: `node --check toolbox/objects/objects.js`
19+
- PASS: `node --check tests/playwright/tools/ObjectsTool.spec.mjs`
20+
- PASS: `node --check src/dev-runtime/guest-seeds/tool-metadata-inventory.js`
21+
- PASS: `node --check tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs`
22+
- PASS: `npx playwright test tests/playwright/tools/ObjectsTool.spec.mjs --workers=1 --reporter=line` -> 4 passed.
23+
- PASS: `npx playwright test tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs --workers=1 --reporter=line` -> 4 passed after aligning the Objects capability label assertion with the updated metadata copy.
24+
- PASS: `git diff --check` with line-ending warnings only.
25+
- PASS: Objects Playwright validates removed internal copy is absent, `Object Status` appears, table editing works, Toolbox clickability remains, and Sprite render asset linking still works.
26+
27+
## Coverage
28+
- Produced `docs_build/dev/reports/playwright_v8_coverage_report.txt`.
29+
- Objects runtime coverage: `toolbox/objects/objects.js` at 93% function coverage.
30+
- Metadata seed coverage is advisory-only at 0% because that seed module is not collected as browser runtime JavaScript; the conditional Toolbox/Admin metadata Playwright lane covers the metadata behavior.
31+
32+
## Skipped Lanes
33+
- Full samples validation skipped by request; no sample JSON or sample runtime files changed.
34+
- Production DB/auth lanes skipped; this PR only updates the mock/DB metadata seed copy and Objects UI behavior, with no production DB or auth behavior changes.
35+
- Engine runtime lanes skipped; no engine runtime files or runtime object execution behavior changed.

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ Note: entry percentages use function coverage when available, otherwise line cov
1212
Note: coverage entries are aggregated across every page/tool where coverageReporter.start(page) and coverageReporter.stop(page) ran.
1313

1414
Exercised tool entry points detected:
15-
(85%) Toolbox Index - exercised 5 runtime JS files
15+
(84%) Toolbox Index - exercised 5 runtime JS files
1616
(0%) Tool Template V2 - not exercised by this Playwright run
1717
(59%) Theme V2 Shared JS - exercised 2 runtime JS files
1818

1919
Changed runtime JS files covered:
2020
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
21-
(67%) src/engine/object-model/objectModelRegistry.js - executed lines 139/139; executed functions 4/6
22-
(94%) toolbox/objects/objects.js - executed lines 762/762; executed functions 80/85
21+
(93%) toolbox/objects/objects.js - executed lines 790/790; executed functions 75/81
2322

2423
Files with executed line/function counts where available:
2524
(33%) src/engine/api/toolbox-votes-api-client.js - executed lines 46/46; executed functions 2/6
@@ -33,7 +32,7 @@ Files with executed line/function counts where available:
3332
(75%) src/engine/object-model/objectDefinitionSchema.js - executed lines 58/58; executed functions 3/4
3433
(77%) toolbox/tools-page-accordions.js - executed lines 965/965; executed functions 79/103
3534
(86%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 24/28
36-
(94%) toolbox/objects/objects.js - executed lines 762/762; executed functions 80/85
35+
(93%) toolbox/objects/objects.js - executed lines 790/790; executed functions 75/81
3736
(100%) src/engine/object-model/index.js - executed lines 29/29; executed functions 1/1
3837
(100%) toolbox/project-workspace/project-workspace-api-client.js - executed lines 12/12; executed functions 2/2
3938

@@ -42,10 +41,6 @@ Uncovered or low-coverage changed JS files:
4241

4342
Changed JS files considered:
4443
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - changed JS file not collected as browser runtime coverage
45-
(0%) tests/engine/ObjectModelContract.test.mjs - changed JS file not collected as browser runtime coverage
4644
(0%) tests/playwright/tools/ObjectsTool.spec.mjs - changed JS file not collected as browser runtime coverage
47-
(0%) tests/playwright/tools/RootToolsFutureState.spec.mjs - changed JS file not collected as browser runtime coverage
4845
(0%) tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs - changed JS file not collected as browser runtime coverage
49-
(0%) tests/playwright/tools/ToolboxRoutePages.spec.mjs - changed JS file not collected as browser runtime coverage
50-
(67%) src/engine/object-model/objectModelRegistry.js - changed JS file with browser V8 coverage
51-
(94%) toolbox/objects/objects.js - changed JS file with browser V8 coverage
46+
(93%) toolbox/objects/objects.js - changed JS file with browser V8 coverage

src/dev-runtime/guest-seeds/tool-metadata-inventory.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -410,14 +410,14 @@ export const TOOL_REGISTRY = Object.freeze([
410410
"id": "objects",
411411
"name": "Objects",
412412
"displayName": "Objects",
413-
"shortDescription": "Define game object setup with broad roles, body types, and render asset handoff.",
413+
"shortDescription": "Create game objects with roles, state, and sprite assets.",
414414
"shortLabel": "Objects",
415415
"path": "objects",
416416
"folderName": "objects",
417417
"entryPoint": "objects/index.html",
418418
"badge": "/assets/theme-v2/images/badges/objects.png",
419419
"tool": "/assets/theme-v2/images/tools/objects.png",
420-
"description": "Define game object setup with broad roles, body types, and render asset handoff.",
420+
"description": "Create game objects with roles, state, and sprite assets.",
421421
"category": "Design",
422422
"colorGroup": "tool-group-design",
423423
"active": true,
@@ -429,16 +429,16 @@ export const TOOL_REGISTRY = Object.freeze([
429429
"status": "Wireframe",
430430
"releaseChannel": "wireframe",
431431
"progressChecklist": [
432-
"Table input wireframe adapted",
432+
"Editable object table available",
433433
"Inline row add, save, cancel, edit, and trash actions available",
434-
"Sprite asset handoff preserved for saved Sprite rows"
434+
"Sprite asset linking available for saved Sprite rows"
435435
],
436436
"deferred": false,
437437
"hidden": false,
438438
"adminOnly": false,
439439
"visibleInToolsList": true,
440440
"toolboxGroup": "Create",
441-
"capabilityLabel": "Object setup types",
441+
"capabilityLabel": "Object role types",
442442
"childCapabilities": [
443443
"Static",
444444
"Dynamic",

tests/playwright/tools/ObjectsTool.spec.mjs

Lines changed: 53 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ import { workspaceV2CoverageReporter } from "../../helpers/workspaceV2CoverageRe
55

66
const ROLE_OPTIONS = ["Collectible", "Custom", "Enemy", "Goal", "Hazard", "Hero", "Platform", "Projectile", "Spawner", "UI", "Wall"];
77
const OLD_SAMPLE_PATH_PATTERN = new RegExp(["M" + "VP", "Padd" + "le", "Ba" + "ll"].join("|"), "i");
8+
const OLD_INTERNAL_COPY_PATTERN = new RegExp([
9+
["page", " session only"].join(""),
10+
["hand", "off"].join(""),
11+
["Setup ", "readiness"].join(""),
12+
["Session ", "\\+ Assets"].join(""),
13+
["Readiness ", "Checks"].join(""),
14+
["Runtime ", "Scope"].join(""),
15+
["authoring ", "hand", "off"].join(""),
16+
["Game Configuration is ", "not ready"].join(""),
17+
["Object ", "setup ", "table"].join(""),
18+
["Object ", "setup ", "rows"].join(""),
19+
].join("|"), "i");
20+
const LOW_VALUE_STATUS_CHECK_PATTERN = new RegExp([
21+
["Object ", "row"].join(""),
22+
["Object ", "names"].join(""),
23+
["Object ", "roles"].join(""),
24+
].join("|"), "i");
825

926
test.beforeEach(async ({ page }) => {
1027
await installPlaywrightStorageIsolation(page, {
@@ -75,13 +92,29 @@ async function fillActiveRow(page, { name, renderType = "None", role, state = "A
7592
await page.locator("[data-objects-row-render-type]").selectOption(renderType);
7693
}
7794

78-
test("Objects exposes broad table input without sample-path wording", async ({ page }) => {
95+
test("Objects exposes production copy, Object Status, and broad table input", async ({ page }) => {
7996
const failures = await openObjectsPage(page);
8097

8198
try {
8299
await expect(page.locator(".tool-workspace")).toBeVisible();
83100
await expect(page.locator("style, [style], script:not([src])")).toHaveCount(0);
84101
await expect(page.locator("main")).not.toContainText(OLD_SAMPLE_PATH_PATTERN);
102+
await expect(page.locator("main")).not.toContainText(OLD_INTERNAL_COPY_PATTERN);
103+
await expect(page.getByRole("heading", { level: 2, name: "Object Builder" })).toBeVisible();
104+
await expect(page.getByRole("heading", { level: 3, name: "Object Status" })).toBeVisible();
105+
await expect(page.locator("[aria-label='Object status summary'] th")).toHaveText([
106+
"Area",
107+
"Status",
108+
"Next Step",
109+
]);
110+
await expect(page.locator("[data-objects-status-summary] tr")).toHaveCount(4);
111+
await expect(page.locator("[data-objects-status-summary] td:first-child")).toHaveText([
112+
"Ready Objects",
113+
"Render Assets",
114+
"Missing Hitboxes",
115+
"Missing Events",
116+
]);
117+
await expect(page.locator("[data-objects-status-summary]")).not.toContainText(LOW_VALUE_STATUS_CHECK_PATTERN);
85118
await expect(page.locator("[data-objects-list-table] th")).toHaveText([
86119
"Name",
87120
"Role",
@@ -94,9 +127,12 @@ test("Objects exposes broad table input without sample-path wording", async ({ p
94127
await expect(page.locator("[data-objects-row-type]")).toHaveCount(0);
95128
await expect(page.getByText("Object Types", { exact: true })).toHaveCount(0);
96129
await expect(page.locator("[data-objects-role-basics] li")).toHaveText(ROLE_OPTIONS);
97-
await expect(page.locator("[data-objects-readiness]")).toHaveText("Needs Input");
98-
await expect(page.locator("[data-objects-validation-overlay]")).toBeVisible();
99-
await expect(page.locator("[data-objects-validation-list]")).toContainText("Object row: Add at least one object row.");
130+
await expect(page.locator("[data-objects-readiness]")).toHaveText("Needs Objects");
131+
await expect(page.locator("[data-objects-output-readiness]")).toHaveText("Needs Objects");
132+
await expect(page.locator("[data-objects-asset-status]")).toHaveText("No sprite render selected");
133+
await expect(page.locator("[data-objects-output-setup]")).toHaveText("Add objects to begin the object list.");
134+
await expect(page.locator("[data-objects-validation-overlay]")).toBeHidden();
135+
await expect(page.locator("[data-objects-validation-list]")).toHaveText("PASS: Object details are valid.");
100136
await expect(page.locator("[data-objects-trait-basics]")).toContainText("movable");
101137
await expect(page.locator("[data-objects-trait-basics]")).toContainText("playerControlled");
102138
await expect(page.locator("[data-objects-trait-basics]")).toContainText("collides");
@@ -109,11 +145,12 @@ test("Objects exposes broad table input without sample-path wording", async ({ p
109145

110146
await page.getByRole("button", { name: "Seed Starter Objects" }).click();
111147
await expect(page.locator("[data-objects-log]")).toHaveText("Seeded starter objects: Hero, Projectile, and Wall.");
112-
await expect(page.locator("[data-objects-readiness]")).toHaveText("Ready");
113-
await expect(page.locator("[data-objects-output-readiness]")).toHaveText("Ready");
148+
await expect(page.locator("[data-objects-readiness]")).toHaveText("Objects Ready");
149+
await expect(page.locator("[data-objects-output-readiness]")).toHaveText("Objects Ready");
114150
await expect(page.locator("[data-objects-count]")).toHaveText("3");
115-
await expect(page.locator("[data-objects-output-static]")).toHaveText("1");
116-
await expect(page.locator("[data-objects-output-dynamic]")).toHaveText("2");
151+
await expect(page.locator("[data-objects-output-count]")).toHaveText("3");
152+
await expect(page.locator("[data-objects-status-summary]")).toContainText("3/3");
153+
await expect(page.locator("[data-objects-status-summary]")).toContainText("No sprite render selected");
117154
await expect(page.locator("[data-objects-validation-overlay]")).toBeHidden();
118155
await expect(page.locator("[data-objects-list] tr")).toHaveCount(3);
119156
await expect(page.locator("[data-objects-list]")).toContainText("Hero");
@@ -123,11 +160,12 @@ test("Objects exposes broad table input without sample-path wording", async ({ p
123160
await expect(page.locator("[data-objects-list] [data-objects-trash-row]")).toHaveCount(3);
124161
await expect(page.locator("[data-objects-output-render-asset]")).toHaveText("None");
125162
await expect(page.locator("[data-objects-edit-sprite]")).toBeHidden();
126-
await expect(page.locator("[data-objects-output-setup]")).toHaveText("Object setup table has the required row details.");
163+
await expect(page.locator("[data-objects-output-setup]")).toHaveText("Objects have saved table details.");
127164

128165
await page.getByRole("button", { name: "Validate Setup" }).click();
129-
await expect(page.locator("[data-objects-log]")).toHaveText("Validation PASS: Object setup rows are ready for authoring handoff.");
130-
await expect(page.locator("[data-objects-validation-list]")).toHaveText("PASS: Object setup rows are ready.");
166+
await expect(page.locator("[data-objects-log]")).toHaveText("Validation PASS: Object details are ready for review.");
167+
await expect(page.locator("[data-objects-validation-list]")).toHaveText("PASS: Object details are valid.");
168+
await expect(page.locator("main")).not.toContainText(OLD_INTERNAL_COPY_PATTERN);
131169

132170
await expectNoPageFailures(failures);
133171
} finally {
@@ -201,8 +239,9 @@ test("Objects table save preserves linked sprite asset create and resolve behavi
201239

202240
await expect(page.locator("[data-objects-log]")).toContainText("Added Bolt.");
203241
await expect(page.locator("[data-objects-log]")).toContainText("Created editable default sprite asset sprite_bolt for Bolt.");
204-
await expect(page.locator("[data-objects-log]")).toContainText("Game Configuration is not ready");
205242
await expect(page.locator("[data-objects-list]")).toContainText("sprite_bolt");
243+
await expect(page.locator("[data-objects-asset-status]")).toHaveText("Linked");
244+
await expect(page.locator("[data-objects-status-summary]")).toContainText("Linked");
206245
await expect(page.locator("[data-objects-output-render-asset]")).toHaveText("sprite_bolt");
207246
await expect(page.locator("[data-objects-output-sprite-preview]")).toContainText("sprite_bolt");
208247
await expect(page.locator("[data-objects-output-sprite-preview]")).toContainText("projects/");
@@ -216,8 +255,9 @@ test("Objects table save preserves linked sprite asset create and resolve behavi
216255
await expect(page.locator("[data-objects-row-render-asset-preview]")).toHaveText("sprite_bolt");
217256
await page.locator("[data-objects-save-row]").click();
218257
await expect(page.locator("[data-objects-log]")).toHaveText("Saved Bolt.");
219-
await expect(page.locator("[data-objects-log]")).not.toContainText("Sprite asset handoff blocked");
258+
await expect(page.locator("[data-objects-log]")).not.toContainText("Sprite asset link blocked");
220259
await expect(page.locator("[data-objects-list]")).toContainText("sprite_bolt");
260+
await expect(page.locator("main")).not.toContainText(OLD_INTERNAL_COPY_PATTERN);
221261

222262
await page.getByRole("button", { name: "Reset Table" }).click();
223263
await page.getByRole("button", { name: "Add Object" }).click();

tests/playwright/tools/ToolboxAdminMetadataSsot.spec.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ test("Toolbox and Admin Tool Votes share the same 43-tool DB-backed metadata and
200200
expect(Array.isArray(registryColors.progressChecklist)).toBe(true);
201201
expect(Array.isArray(registryColors.requires)).toBe(true);
202202
expect(registrySnapshot.activeTools.find((tool) => tool.id === "objects")).toEqual(expect.objectContaining({
203-
capabilityLabel: "Object setup types",
203+
capabilityLabel: "Object role types",
204204
childCapabilities: ["Static", "Dynamic", "Collectible", "Hazard", "Goal"],
205205
releaseChannel: "wireframe",
206206
status: "wireframe",

0 commit comments

Comments
 (0)