Skip to content

Commit 711baf1

Browse files
committed
Relocate object catalog selector and promote Objects to beta - PR_26161_014-objects-beta-promotion-and-catalog-relocation
1 parent 7efe487 commit 711baf1

8 files changed

Lines changed: 422 additions & 372 deletions

File tree

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
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
56
M toolbox/objects/index.html
6-
M toolbox/objects/objects.js
7-
?? docs_build/dev/reports/objects-action-spacing-cleanup-report.md
7+
?? docs_build/dev/reports/objects-beta-promotion-and-catalog-relocation-report.md
88

99
# git ls-files --others --exclude-standard
10-
docs_build/dev/reports/objects-action-spacing-cleanup-report.md
10+
docs_build/dev/reports/objects-beta-promotion-and-catalog-relocation-report.md
1111

1212
# git diff --stat
13-
.../dev/reports/coverage_changed_js_guardrail.txt | 10 +---
14-
.../dev/reports/playwright_v8_coverage_report.txt | 16 +-----
15-
tests/playwright/tools/ObjectsTool.spec.mjs | 64 +++++++++++++++-------
16-
toolbox/objects/index.html | 1 -
17-
toolbox/objects/objects.js | 50 ++++++-----------
18-
5 files changed, 66 insertions(+), 75 deletions(-)
13+
.../dev/reports/coverage_changed_js_guardrail.txt | 3 +-
14+
.../dev/reports/playwright_v8_coverage_report.txt | 4 +-
15+
.../guest-seeds/tool-metadata-inventory.js | 21 +++++-----
16+
tests/playwright/tools/ObjectsTool.spec.mjs | 45 ++++++++++++++++++----
17+
toolbox/objects/index.html | 22 +++++++----
18+
5 files changed, 70 insertions(+), 25 deletions(-)

docs_build/dev/reports/codex_review.diff

Lines changed: 257 additions & 338 deletions
Large diffs are not rendered by default.

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Missing changed runtime JS files are WARN, not FAIL.
66
Source: Playwright/Chromium built-in V8 coverage from the active Playwright run.
77

88
Changed runtime JS files considered:
9+
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
910
(94%) toolbox/objects/objects.js - executed lines 1107/1107; executed functions 99/105
1011

1112
Guardrail warnings:
12-
(100%) none - no changed runtime JS coverage warnings
13+
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file missing from coverage; advisory only
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# PR_26161_014 Objects Beta Promotion And Catalog Relocation Report
2+
3+
## Branch Validation
4+
5+
PASS
6+
7+
- Current branch: `main`
8+
- Expected branch: `main`
9+
- Local branches observed: `* main`
10+
11+
## Scope
12+
13+
- Impacted lane: Objects tool UI/runtime plus Toolbox tool metadata registry.
14+
- Playwright impacted: Yes.
15+
- Runtime engine behavior changed: No.
16+
- Samples validation: Skipped as requested. No sample JSON, auth behavior, production DB behavior, engine runtime behavior, or unrelated tool behavior changed.
17+
18+
## Requirement Checklist
19+
20+
- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before edits.
21+
- PASS: Verified current git branch was `main` before edits.
22+
- PASS: Moved the Object Type Catalog selector into the Objects Table footer.
23+
- PASS: Placed the selector in the right-side footer group.
24+
- PASS: Kept `Add Object` and `Reset Table` in the left-side footer group.
25+
- PASS: Kept Object Type Catalog display limited to `Template` and `Capability`.
26+
- PASS: Preserved object creation workflows, including template-prefilled row creation.
27+
- PASS: Preserved DB/mock-adapter persistence after reload.
28+
- PASS: Preserved Sprite asset linking after reload.
29+
- PASS: Preserved row action buttons: `Edit`, `Edit Sprite`, `Open Hitboxes`, `Open Events`, and `Trash`.
30+
- PASS: Preserved Missing/Complete button highlighting through existing Theme V2 button classes.
31+
- PASS: Updated Objects tool metadata/status registry to `status = beta`.
32+
- PASS: Removed remaining Objects wireframe-only messaging from the displayed Objects tool surface.
33+
- PASS: Did not add sample JSON alignment, auth behavior, production DB behavior, or unrelated tool rewrites.
34+
- PASS: Kept Theme V2 only and preserved HTML restrictions.
35+
36+
## Testing Performed
37+
38+
- PASS: `node --check toolbox/objects/objects.js`
39+
- PASS: `node --check tests/playwright/tools/ObjectsTool.spec.mjs`
40+
- PASS: `node --check src/dev-runtime/guest-seeds/tool-metadata-inventory.js`
41+
- PASS: `rg --pcre2 -n '<script(?![^>]*\bsrc=)|<style\b|\son[a-z]+\s*=' toolbox/objects/index.html`
42+
- Expected no matches; command exited with no matches.
43+
- PASS: `rg -n 'Wireframe|wireframe|Static wireframe|not wired|Not implemented yet|Role|Traits|Not connected yet' toolbox/objects/index.html`
44+
- Expected no matches; command exited with no matches.
45+
- PASS: `node --input-type=module -e "...getToolById('objects')..."`
46+
- Result: Objects registry seed reports `status: "beta"`, `releaseChannel: "beta"`, and `releaseChannelLabel: "Beta"`.
47+
- PASS: `npx playwright test tests/playwright/tools/ObjectsTool.spec.mjs --workers=1 --reporter=line`
48+
- Result: 6 passed.
49+
- PASS: `git diff --check`
50+
- Result: PASS. Git reported line-ending normalization warnings only.
51+
52+
## Playwright Behavior Covered
53+
54+
- PASS: Object Type Catalog selector appears inside the Objects Table footer.
55+
- PASS: Footer selector is in the right-side catalog group.
56+
- PASS: `Add Object` and `Reset Table` remain in the left-side footer group.
57+
- PASS: Selecting a footer template before adding an object still prefills Type, State, Render, and Capabilities.
58+
- PASS: Add, cancel, save, edit, trash, reset, and DB persistence after reload still work.
59+
- PASS: Sprite asset creation/resolution and linked sprite asset display persist after reload.
60+
- PASS: Row actions and Missing/Complete visual classes remain intact.
61+
- PASS: Toolbox displays Objects as `Beta`, not `Wireframe`.
62+
- PASS: Toolbox registry API reports Objects as `status: "beta"`.
63+
64+
## Playwright V8 Coverage
65+
66+
- Report: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
67+
- Changed runtime JavaScript coverage notes:
68+
- `(94%) toolbox/objects/objects.js - executed lines 1107/1107; executed functions 99/105`
69+
- `(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only`
70+
- The warning is safe for this PR because `tool-metadata-inventory.js` is a dev-runtime seed module validated by syntax check and by the targeted Playwright registry/API status assertion.
71+
72+
## Manual Validation Steps
73+
74+
1. Open `/toolbox/objects/index.html`.
75+
2. Confirm the Objects Table footer has `Add Object` and `Reset Table` on the left.
76+
3. Confirm the Object Type Catalog selector is in the right side of the table footer.
77+
4. Select `Hero` in the footer selector, click `Add Object`, and confirm the active row is prefilled.
78+
5. Save a Sprite object, reload the page, and confirm the row and linked sprite asset remain.
79+
6. Open `/toolbox/index.html` and confirm the Objects card displays `Beta`.
80+
81+
## Skipped Lanes
82+
83+
- Full samples validation: SKIP, explicitly requested and no samples changed.
84+
- Broad workspace/project suite: SKIP, no shared Project Workspace contract, engine runtime behavior, public navigation behavior, auth behavior, production DB behavior, or sample behavior changed.
85+
- Full registry suite: SKIP, registry impact is scoped to the Objects metadata seed and covered by targeted Objects Playwright plus direct seed inspection.
86+

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Exercised tool entry points detected:
1717
(59%) Theme V2 Shared JS - exercised 2 runtime JS files
1818

1919
Changed runtime JS files covered:
20+
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2021
(94%) toolbox/objects/objects.js - executed lines 1107/1107; executed functions 99/105
2122

2223
Files with executed line/function counts where available:
@@ -37,8 +38,9 @@ Files with executed line/function counts where available:
3738
(100%) toolbox/project-workspace/project-workspace-api-client.js - executed lines 12/12; executed functions 2/2
3839

3940
Uncovered or low-coverage changed JS files:
40-
(100%) none - no low-coverage changed runtime JS files
41+
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: uncovered changed runtime JS file; advisory only
4142

4243
Changed JS files considered:
44+
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - changed JS file not collected as browser runtime coverage
4345
(0%) tests/playwright/tools/ObjectsTool.spec.mjs - changed JS file not collected as browser runtime coverage
4446
(94%) toolbox/objects/objects.js - changed JS file with browser V8 coverage

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

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ export const TOOL_STATUS_MODEL = Object.freeze([
66
"Under Construction",
77
"Planned",
88
"Hidden",
9-
"Deprecated"
9+
"Deprecated",
10+
"beta"
1011
]);
1112

1213
export const TOOL_RELEASE_CHANNELS = Object.freeze([
@@ -52,7 +53,8 @@ const READINESS_BY_STATUS = Object.freeze({
5253
"Under Construction": "No",
5354
Planned: "No",
5455
Hidden: "No",
55-
Deprecated: "No"
56+
Deprecated: "No",
57+
beta: "Yes"
5658
});
5759

5860
const RELEASE_CHANNEL_BY_STATUS = Object.freeze({
@@ -61,7 +63,8 @@ const RELEASE_CHANNEL_BY_STATUS = Object.freeze({
6163
"Under Construction": "beta",
6264
Planned: "planned",
6365
Hidden: "planned",
64-
Deprecated: "deprecated"
66+
Deprecated: "deprecated",
67+
beta: "beta"
6568
});
6669

6770
export const TOOL_REGISTRY = Object.freeze([
@@ -150,7 +153,7 @@ export const TOOL_REGISTRY = Object.freeze([
150153
"requires": [
151154
"project-workspace"
152155
],
153-
"status": "Ready",
156+
"status": "beta",
154157
"releaseChannel": "beta",
155158
"progressChecklist": [
156159
"Open Project Workspace",
@@ -410,14 +413,14 @@ export const TOOL_REGISTRY = Object.freeze([
410413
"id": "objects",
411414
"name": "Objects",
412415
"displayName": "Objects",
413-
"shortDescription": "Create game objects with roles, state, and sprite assets.",
416+
"shortDescription": "Create game objects with types, state, and sprite assets.",
414417
"shortLabel": "Objects",
415418
"path": "objects",
416419
"folderName": "objects",
417420
"entryPoint": "objects/index.html",
418421
"badge": "/assets/theme-v2/images/badges/objects.png",
419422
"tool": "/assets/theme-v2/images/tools/objects.png",
420-
"description": "Create game objects with roles, state, and sprite assets.",
423+
"description": "Create game objects with types, state, and sprite assets.",
421424
"category": "Design",
422425
"colorGroup": "tool-group-design",
423426
"active": true,
@@ -426,8 +429,8 @@ export const TOOL_REGISTRY = Object.freeze([
426429
"requiredForTestable": true,
427430
"requiredForPublish": true,
428431
"requires": [],
429-
"status": "Wireframe",
430-
"releaseChannel": "wireframe",
432+
"status": "beta",
433+
"releaseChannel": "beta",
431434
"progressChecklist": [
432435
"Editable object table available",
433436
"Inline row add, save, cancel, edit, and trash actions available",
@@ -438,7 +441,7 @@ export const TOOL_REGISTRY = Object.freeze([
438441
"adminOnly": false,
439442
"visibleInToolsList": true,
440443
"toolboxGroup": "Create",
441-
"capabilityLabel": "Object role types",
444+
"capabilityLabel": "Object types",
442445
"childCapabilities": [
443446
"Static",
444447
"Dynamic",

tests/playwright/tools/ObjectsTool.spec.mjs

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ async function objectDefinitionRecords(page) {
111111
});
112112
}
113113

114+
async function objectsRegistryEntry(page) {
115+
return page.evaluate(async () => {
116+
const response = await fetch("/api/toolbox/registry/snapshot");
117+
const payload = await response.json();
118+
return payload.data.tools.find((tool) => tool.id === "objects") || null;
119+
});
120+
}
121+
114122
test("Objects exposes production copy, setup status, and broad table input", async ({ page }) => {
115123
const failures = await openObjectsPage(page);
116124

@@ -126,7 +134,20 @@ test("Objects exposes production copy, setup status, and broad table input", asy
126134
await expect(page.locator("main")).not.toContainText(["Not", "connected", "yet"].join(" "));
127135
await expect(page.getByRole("heading", { level: 2, name: "Object Builder" })).toBeVisible();
128136
await expect(page.getByText("Object Type Catalog", { exact: true })).toBeVisible();
129-
await expect(page.locator("[data-objects-template-select] option")).toHaveText(["Select template", ...TYPE_OPTIONS]);
137+
await expect(page.locator("[data-objects-template-select]")).toHaveCount(1);
138+
await expect(page.locator("[data-objects-list-table] tfoot [data-objects-template-select] option")).toHaveText(["Select template", ...TYPE_OPTIONS]);
139+
await expect(page.locator("[data-objects-table-footer-actions] [data-objects-add-row]")).toBeVisible();
140+
await expect(page.locator("[data-objects-table-footer-actions] [data-objects-reset-table]")).toBeVisible();
141+
await expect(page.locator("[data-objects-table-footer-catalog] [data-objects-template-select]")).toBeVisible();
142+
const footerPositions = await page.locator("[data-objects-table-footer]").evaluate((footer) => {
143+
const actions = footer.querySelector("[data-objects-table-footer-actions]");
144+
const catalog = footer.querySelector("[data-objects-table-footer-catalog]");
145+
return {
146+
actionsLeft: actions.getBoundingClientRect().left,
147+
catalogLeft: catalog.getBoundingClientRect().left,
148+
};
149+
});
150+
expect(footerPositions.catalogLeft).toBeGreaterThan(footerPositions.actionsLeft);
130151
await expect(page.locator("[aria-label='Object type catalog'] th")).toHaveText(["Template", "Capability"]);
131152
await expect(page.locator("[aria-label='Object type catalog'] thead")).not.toContainText("State");
132153
await expect(page.locator("[aria-label='Object type catalog'] thead")).not.toContainText("Render");
@@ -168,10 +189,8 @@ test("Objects exposes production copy, setup status, and broad table input", asy
168189
await expect(page.locator("[data-objects-capability-basics]")).toContainText("Takes Damage");
169190
await expect(page.locator("[data-objects-capability-basics]")).not.toContainText("bounces");
170191

171-
const addAfterTable = await page.locator("[data-objects-list-table]").evaluate((table) => (
172-
Boolean(table.compareDocumentPosition(document.querySelector("[data-objects-add-row]")) & Node.DOCUMENT_POSITION_FOLLOWING)
173-
));
174-
expect(addAfterTable).toBe(true);
192+
await expect(page.locator("[data-objects-list-table] tfoot [data-objects-add-row]")).toBeVisible();
193+
await expect(page.locator("[data-objects-list-table] tfoot [data-objects-reset-table]")).toBeVisible();
175194

176195
await page.getByRole("button", { name: "Seed Starter Objects" }).click();
177196
await expect(page.locator("[data-objects-log]")).toHaveText("Seeded starter objects: Hero, Projectile, and Wall.");
@@ -382,6 +401,7 @@ test("Object Type Catalog selection prefills active table rows", async ({ page }
382401
const failures = await openObjectsPage(page);
383402

384403
try {
404+
await expect(page.locator("[data-objects-list-table] tfoot [data-objects-template-select]")).toBeVisible();
385405
await page.locator("[data-objects-template-select]").selectOption("Hazard");
386406
await expect(page.locator("[data-objects-log]")).toHaveText("Hazard template selected for the next object row.");
387407

@@ -588,14 +608,25 @@ test("Objects table save preserves linked sprite asset create and resolve behavi
588608
}
589609
});
590610

591-
test("Objects is a clickable wireframe tool from Toolbox", async ({ page }) => {
611+
test("Objects is a clickable beta tool from Toolbox", async ({ page }) => {
592612
const failures = await openToolboxPage(page);
593613

594614
try {
595615
const objectsCard = page.locator("[data-toolbox-tool-card='Objects']");
596616
await expect(objectsCard).toBeVisible();
597-
await expect(objectsCard.locator("[data-toolbox-kicker]")).toHaveText("Wireframe");
617+
await expect(objectsCard).toHaveAttribute("data-toolbox-release-channel", "beta");
618+
await expect(objectsCard.locator("[data-toolbox-kicker]")).toHaveText("Beta");
619+
await expect(objectsCard.locator("[data-toolbox-plan-details]")).toHaveCount(0);
620+
await expect(objectsCard).not.toContainText("Wireframe details");
598621
await expect(objectsCard.locator("[data-toolbox-tool-name-link='Objects']")).toHaveAttribute("href", "/toolbox/objects/index.html");
622+
const registryEntry = await objectsRegistryEntry(page);
623+
expect(registryEntry).toEqual(expect.objectContaining({
624+
releaseChannel: "beta",
625+
releaseChannelLabel: "Beta",
626+
status: "beta",
627+
}));
628+
expect(registryEntry.shortDescription).toContain("types");
629+
expect(registryEntry.shortDescription).not.toMatch(/\broles\b/i);
599630
await objectsCard.locator("[data-toolbox-tool-name-link='Objects']").click();
600631
await expect(page.getByRole("heading", { level: 1, name: "Objects" })).toBeVisible();
601632

toolbox/objects/index.html

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ <h2>Objects</h2>
4242
<details class="vertical-accordion" open>
4343
<summary>Object Type Catalog</summary>
4444
<div class="accordion-body content-stack">
45-
<div class="content-cluster" aria-label="Object type catalog selection">
46-
<select aria-label="Object Type Catalog" data-objects-template-select></select>
47-
</div>
4845
<div class="table-wrapper">
4946
<table class="data-table" aria-label="Object type catalog">
5047
<thead>
@@ -96,12 +93,23 @@ <h3>Objects Table</h3>
9693
</tr>
9794
</thead>
9895
<tbody data-objects-list></tbody>
96+
<tfoot>
97+
<tr>
98+
<td colspan="7">
99+
<div class="content-split" data-objects-table-footer>
100+
<div class="content-cluster" aria-label="Objects table actions" data-objects-table-footer-actions>
101+
<button class="btn" type="button" data-objects-add-row>Add Object</button>
102+
<button class="btn" type="button" data-objects-reset-table>Reset Table</button>
103+
</div>
104+
<div class="action-group action-group--end" aria-label="Object type catalog selection" data-objects-table-footer-catalog>
105+
<select aria-label="Object Type Catalog" data-objects-template-select></select>
106+
</div>
107+
</div>
108+
</td>
109+
</tr>
110+
</tfoot>
99111
</table>
100112
</div>
101-
<div class="content-cluster" aria-label="Objects table actions">
102-
<button class="btn" type="button" data-objects-add-row>Add Object</button>
103-
<button class="btn" type="button" data-objects-reset-table>Reset Table</button>
104-
</div>
105113
</div>
106114
</article>
107115
</section>

0 commit comments

Comments
 (0)