Skip to content

Commit ff389a0

Browse files
committed
Compact Object Type Catalog to template and capability display - PR_26161_009-object-catalog-compact-display
1 parent 25a3e8f commit ff389a0

10 files changed

Lines changed: 209 additions & 467 deletions

docs_build/dev/codex_commands.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,3 +1294,32 @@ Required reports:
12941294
- `docs_build/dev/reports/coverage_changed_js_guardrail.txt`
12951295
- `docs_build/dev/reports/codex_changed_files.txt`
12961296
- `docs_build/dev/reports/codex_review.diff`
1297+
1298+
1299+
## PR_26161_009-object-catalog-compact-display
1300+
1301+
Changes:
1302+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
1303+
- Verified the current branch is `main` before edits.
1304+
- Continued from the latest Objects PR state.
1305+
- Updated the Object Type Catalog display to show only `Template` and `Capability`.
1306+
- Removed `State` and `Render` columns from the Object Type Catalog display only.
1307+
- Preserved State, Render, State Flow, object registry/config concepts, object validation contracts, render asset linking, and Sprite Editor linking behavior.
1308+
- Preserved table-first input, `Add Object` below the table, disabled Add while adding, Cancel, Edit, Trash, Reset Table, Object Status, and Sprite asset linking.
1309+
- Did not change engine runtime behavior, sample JSON, auth behavior, production DB behavior, or unrelated tool behavior.
1310+
1311+
Validation:
1312+
- `node --check toolbox/objects/objects.js`
1313+
- `node --check tests/playwright/tools/ObjectsTool.spec.mjs`
1314+
- HTML restriction check for `toolbox/objects/index.html`
1315+
- Objects forbidden wording scan for requested terms
1316+
- `npx playwright test tests/playwright/tools/ObjectsTool.spec.mjs --workers=1 --reporter=line`
1317+
- `git diff --check`
1318+
- Full samples validation skipped by request and because samples/runtime behavior were not changed.
1319+
1320+
Required reports:
1321+
- `docs_build/dev/reports/object-catalog-compact-display-report.md`
1322+
- `docs_build/dev/reports/playwright_v8_coverage_report.txt`
1323+
- `docs_build/dev/reports/coverage_changed_js_guardrail.txt`
1324+
- `docs_build/dev/reports/codex_changed_files.txt`
1325+
- `docs_build/dev/reports/codex_review.diff`

docs_build/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Add Objects status action links - PR_26161_007-objects-status-action-links
1+
Compact Objects type catalog display - PR_26161_009-object-catalog-compact-display

docs_build/dev/reports/codex_changed_files.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ docs_build/dev/commit_comment.txt
33
docs_build/dev/reports/codex_changed_files.txt
44
docs_build/dev/reports/codex_review.diff
55
docs_build/dev/reports/coverage_changed_js_guardrail.txt
6-
docs_build/dev/reports/objects-status-action-links-report.md
6+
docs_build/dev/reports/object-catalog-compact-display-report.md
77
docs_build/dev/reports/playwright_v8_coverage_report.txt
88
tests/playwright/tools/ObjectsTool.spec.mjs
99
toolbox/objects/index.html

docs_build/dev/reports/codex_review.diff

Lines changed: 99 additions & 456 deletions
Large diffs are not rendered by default.

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ 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-
(95%) toolbox/objects/objects.js - executed lines 987/987; executed functions 94/99
9+
(95%) toolbox/objects/objects.js - executed lines 985/985; executed functions 94/99
1010

1111
Guardrail warnings:
1212
(100%) none - no changed runtime JS coverage warnings
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# PR_26161_009 Object Catalog Compact Display Report
2+
3+
## Branch Guard
4+
- Current branch: `main`
5+
- Expected branch: `main`
6+
- Local branches found: `* main`
7+
- Branch validation: PASS
8+
9+
## Source Of Truth
10+
- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before branch validation and edits.
11+
- PASS: Used the user-provided `PR_26161_009-object-catalog-compact-display` request as the active BUILD source.
12+
- PASS: Confirmed the PR purpose is singular: compact the Object Type Catalog display.
13+
14+
## Requirement Checklist
15+
- PASS: Object Type Catalog now displays only `Template` and `Capability`.
16+
- PASS: Removed `State` and `Render` columns from the Object Type Catalog display only.
17+
- PASS: Kept State, Render, State Flow, registry/config concepts, and object validation contracts in the underlying model.
18+
- PASS: Kept Render available in the Objects table/editor where object render configuration belongs.
19+
- PASS: Kept table-first input, `Add Object` below the table, Add disabled while adding, Cancel, Edit, Trash, Reset Table, Object Status, and Sprite asset linking.
20+
- PASS: Preserved render asset linking and Sprite Editor linking behavior.
21+
- PASS: Did not add sample JSON alignment, auth behavior, production DB behavior, or unrelated tool rewrites.
22+
- PASS: Kept Theme V2 only and preserved HTML restrictions.
23+
24+
## Implementation Evidence
25+
- `toolbox/objects/index.html`: compacted the Object Type Catalog table headers to `Template` and `Capability`.
26+
- `toolbox/objects/objects.js`: compacted Object Type Catalog row rendering to type plus capability labels only.
27+
- `tests/playwright/tools/ObjectsTool.spec.mjs`: verifies the compact catalog headers, absence of catalog State/Render columns, Render availability in the Objects table/editor, table input behavior, and Sprite asset linking.
28+
29+
## Impacted Lane
30+
- Impacted lane: Objects tool UI/runtime.
31+
- Playwright impacted: Yes.
32+
- Changed runtime JavaScript: `toolbox/objects/objects.js`.
33+
34+
## Testing Performed
35+
- PASS: `node --check toolbox/objects/objects.js`
36+
- PASS: `node --check tests/playwright/tools/ObjectsTool.spec.mjs`
37+
- PASS: HTML restriction check for `toolbox/objects/index.html`
38+
- PASS: Objects forbidden wording scan for requested terms.
39+
- PASS: `npx playwright test tests/playwright/tools/ObjectsTool.spec.mjs --workers=1 --reporter=line` (5 passed)
40+
- PASS: `docs_build/dev/reports/playwright_v8_coverage_report.txt` was produced by targeted Objects Playwright.
41+
- PASS: `docs_build/dev/reports/coverage_changed_js_guardrail.txt` reports no changed runtime JS coverage warnings.
42+
- PASS: `git diff --check` exited 0 with line-ending warnings only.
43+
44+
## Playwright Behavior Coverage
45+
- PASS: Object Type Catalog shows `Template` and `Capability` only.
46+
- PASS: `State` and `Render` no longer appear in the Object Type Catalog headers.
47+
- PASS: `Render` still appears in the Objects table where object render configuration belongs.
48+
- PASS: Object Type Catalog selection still prefills Type, State, Render, and Capabilities in the active table row.
49+
- PASS: Table input and Sprite asset linking still work.
50+
51+
## Skipped Lanes
52+
- Full samples validation: SKIP. Safe because no sample JSON, sample launch path, or sample runtime behavior changed.
53+
- Engine runtime validation beyond changed-file syntax/import coverage: SKIP. Safe because no engine runtime files or behavior changed.
54+
- Production DB/auth validation: SKIP. Safe because no production DB or auth behavior changed.
55+
- Broad Toolbox/Admin validation: SKIP. Safe because no shared navigation, registration, metadata, or admin surface changed.
56+
57+
## Manual Validation Steps
58+
- Open `/toolbox/objects/index.html`.
59+
- Confirm Object Type Catalog table headers show only `Template` and `Capability`.
60+
- Confirm the Object Type Catalog does not display `State` or `Render` columns.
61+
- Confirm the Objects Table still shows `State` and `Render` columns.
62+
- Select a catalog template, add an object row, and confirm Type, State, Render, and Capabilities still prefill in the Objects table/editor.
63+
- Save a Sprite object and confirm the Sprite asset is created/resolved and the Sprite Editor link remains available.
64+
65+
## Required Artifacts
66+
- PASS: `docs_build/dev/reports/object-catalog-compact-display-report.md`
67+
- PASS: `docs_build/dev/reports/codex_review.diff`
68+
- PASS: `docs_build/dev/reports/codex_changed_files.txt`
69+
- PASS: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
70+
- PASS: `tmp/PR_26161_009-object-catalog-compact-display_delta.zip`

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +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-
(95%) toolbox/objects/objects.js - executed lines 987/987; executed functions 94/99
20+
(95%) toolbox/objects/objects.js - executed lines 985/985; executed functions 94/99
2121

2222
Files with executed line/function counts where available:
2323
(33%) src/engine/api/toolbox-votes-api-client.js - executed lines 46/46; executed functions 2/6
@@ -31,7 +31,7 @@ Files with executed line/function counts where available:
3131
(75%) src/engine/object-model/objectDefinitionSchema.js - executed lines 58/58; executed functions 3/4
3232
(77%) toolbox/tools-page-accordions.js - executed lines 965/965; executed functions 79/103
3333
(86%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 24/28
34-
(95%) toolbox/objects/objects.js - executed lines 987/987; executed functions 94/99
34+
(95%) toolbox/objects/objects.js - executed lines 985/985; executed functions 94/99
3535
(100%) src/engine/object-model/index.js - executed lines 29/29; executed functions 1/1
3636
(100%) toolbox/project-workspace/project-workspace-api-client.js - executed lines 12/12; executed functions 2/2
3737

tests/playwright/tools/ObjectsTool.spec.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,15 @@ test("Objects exposes production copy, setup status, and broad table input", asy
119119
await expect(page.getByRole("heading", { level: 2, name: "Object Builder" })).toBeVisible();
120120
await expect(page.getByText("Object Type Catalog", { exact: true })).toBeVisible();
121121
await expect(page.locator("[data-objects-template-select] option")).toHaveText(["Select template", ...TYPE_OPTIONS]);
122+
await expect(page.locator("[aria-label='Object type catalog'] th")).toHaveText(["Template", "Capability"]);
123+
await expect(page.locator("[aria-label='Object type catalog'] thead")).not.toContainText("State");
124+
await expect(page.locator("[aria-label='Object type catalog'] thead")).not.toContainText("Render");
125+
await expect(page.locator("[data-objects-template-catalog] tr").first().locator("td")).toHaveCount(2);
122126
await expect(page.locator("[data-objects-template-catalog] tr")).toHaveCount(TYPE_OPTIONS.length);
123127
await expect(page.locator("[data-objects-template-catalog] td:first-child")).toHaveText(TYPE_OPTIONS);
124128
await expect(page.locator("[data-objects-template-catalog]")).toContainText("Spawn Point");
125129
await expect(page.locator("[data-objects-template-catalog]")).toContainText("Decoration");
126-
await expect(page.locator("[data-objects-template-catalog]")).toContainText("Sprite");
130+
await expect(page.locator("[data-objects-template-catalog]")).not.toContainText("Sprite");
127131
await expect(page.locator("[data-objects-template-catalog]")).toContainText("Can Move");
128132
await expect(page.locator("[data-objects-template-catalog]")).toContainText("Scores Points");
129133
await expect(page.getByRole("heading", { level: 3, name: "Object Status" })).toBeVisible();

toolbox/objects/index.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ <h2>Objects</h2>
5050
<thead>
5151
<tr>
5252
<th>Template</th>
53-
<th>State</th>
54-
<th>Render</th>
55-
<th>Capabilities</th>
53+
<th>Capability</th>
5654
</tr>
5755
</thead>
5856
<tbody data-objects-template-catalog></tbody>

toolbox/objects/objects.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,8 +826,6 @@ function renderTemplateCatalog() {
826826
const row = document.createElement("tr");
827827
row.append(
828828
tableCell(template.type),
829-
tableCell(template.state),
830-
tableCell(template.renderType),
831829
tableCell(capabilityText(template.capabilities))
832830
);
833831
elements.templateCatalog.append(row);

0 commit comments

Comments
 (0)