Skip to content

Commit ea617a6

Browse files
committed
Remove duplicate Objects Type Choices section - PR_26161_015-objects-remove-type-choices
1 parent 711baf1 commit ea617a6

8 files changed

Lines changed: 237 additions & 290 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
54
M tests/playwright/tools/ObjectsTool.spec.mjs
65
M toolbox/objects/index.html
7-
?? docs_build/dev/reports/objects-beta-promotion-and-catalog-relocation-report.md
6+
M toolbox/objects/objects.js
7+
?? docs_build/dev/reports/objects-remove-type-choices-report.md
88

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

1212
# git diff --stat
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(-)
13+
docs_build/dev/reports/coverage_changed_js_guardrail.txt | 2 +-
14+
docs_build/dev/reports/playwright_v8_coverage_report.txt | 8 ++++----
15+
tests/playwright/tools/ObjectsTool.spec.mjs | 14 +++++++++++---
16+
toolbox/objects/index.html | 7 -------
17+
toolbox/objects/objects.js | 2 +-
18+
5 files changed, 17 insertions(+), 16 deletions(-)

docs_build/dev/reports/codex_review.diff

Lines changed: 133 additions & 265 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
@@ -7,7 +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-
(94%) toolbox/objects/objects.js - executed lines 1107/1107; executed functions 99/105
10+
(93%) toolbox/objects/objects.js - executed lines 1107/1107; executed functions 98/105
1111

1212
Guardrail warnings:
1313
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file missing from coverage; advisory only
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# PR_26161_015 Objects Remove Type Choices Report
2+
3+
## Branch Validation
4+
5+
PASS
6+
7+
- Current branch: `main`
8+
- Expected branch: `main`
9+
- Worktree was clean before PR_26161_015 edits.
10+
11+
## Scope
12+
13+
- Impacted lane: Objects tool UI/runtime and targeted Objects Playwright coverage.
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: Removed the duplicate visible `Type Choices` section from Objects.
23+
- PASS: Kept `Object Type Catalog` as the single visible reference list for object templates and capabilities.
24+
- PASS: Kept the catalog display limited to `Template` and `Capability`.
25+
- PASS: Preserved object template/type values in the underlying registry, validator, row type dropdown, and footer template selector.
26+
- PASS: Preserved Render, State, Asset, Sprite linking, DB persistence, and table editing behavior.
27+
- PASS: Kept Events integration framed as future behavior/event configuration by updating the user-facing Events action title to `Events configure when object behavior happens.`
28+
- PASS: Preserved Objects beta status.
29+
- PASS: Did not add sample JSON alignment, auth behavior, production DB behavior, or unrelated tool rewrites.
30+
- PASS: Kept Theme V2 only and preserved HTML restrictions.
31+
32+
## Testing Performed
33+
34+
- PASS: `node --check toolbox/objects/objects.js`
35+
- PASS: `node --check tests/playwright/tools/ObjectsTool.spec.mjs`
36+
- PASS: `git diff --check`
37+
- Result: PASS. Git reported line-ending normalization warnings only.
38+
- PASS: `rg --pcre2 -n '<script(?![^>]*\bsrc=)|<style\b|\son[a-z]+\s*=' toolbox/objects/index.html`
39+
- Expected no matches; command exited with no matches.
40+
- PASS: `rg -n 'Type Choices|data-objects-type-basics' toolbox/objects/index.html`
41+
- Expected no matches; command exited with no matches.
42+
- PASS: `npx playwright test tests/playwright/tools/ObjectsTool.spec.mjs --workers=1 --reporter=line`
43+
- Result: 6 passed.
44+
45+
## Playwright Behavior Covered
46+
47+
- PASS: `Type Choices` no longer appears in the primary Objects UI.
48+
- PASS: `Object Type Catalog` remains visible.
49+
- PASS: Catalog headers remain `Template` and `Capability` only.
50+
- PASS: Events is not exposed as an object template/type in the catalog.
51+
- PASS: Footer template selector still offers object templates and can prefill active rows.
52+
- PASS: Row type dropdown still offers object type values.
53+
- PASS: Add, edit, delete, reset, and DB persistence after reload still work.
54+
- PASS: Sprite asset creation/resolution and linked sprite asset display still work.
55+
- PASS: Objects remains a clickable beta tool from Toolbox.
56+
57+
## Playwright V8 Coverage
58+
59+
- Report: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
60+
- Changed runtime JavaScript coverage notes:
61+
- `(93%) toolbox/objects/objects.js - executed lines 1107/1107; executed functions 98/105`
62+
- `(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only`
63+
- The advisory warning is safe for this PR because PR_26161_015 did not modify `src/dev-runtime/guest-seeds/tool-metadata-inventory.js`; this change only touched Objects UI/runtime, Objects Playwright coverage, and generated reports.
64+
65+
## Manual Validation Steps
66+
67+
1. Open `/toolbox/objects/index.html`.
68+
2. Confirm the left Objects panel shows `Object Setup` and `Object Type Catalog`, with no `Type Choices` section.
69+
3. Confirm the Object Type Catalog table shows only `Template` and `Capability`.
70+
4. Use the table footer template selector to choose `Hero`, then click `Add Object` and confirm the active row is prefilled.
71+
5. Save a Sprite object, reload the Objects page, and confirm the row plus linked sprite asset remain.
72+
6. Confirm `Open Events` is presented as event configuration for when object behavior happens, not as an object type.
73+
74+
## Skipped Lanes
75+
76+
- Full samples validation: SKIP, explicitly requested and no samples changed.
77+
- 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.
78+
- Full registry suite: SKIP, registry and validator values were intentionally preserved; targeted Objects Playwright validates row type/template dropdown behavior.

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +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-
(86%) Toolbox Index - exercised 6 runtime JS files
15+
(85%) Toolbox Index - exercised 6 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-
(94%) toolbox/objects/objects.js - executed lines 1107/1107; executed functions 99/105
21+
(93%) toolbox/objects/objects.js - executed lines 1107/1107; executed functions 98/105
2222

2323
Files with executed line/function counts where available:
2424
(33%) src/engine/api/toolbox-votes-api-client.js - executed lines 46/46; executed functions 2/6
@@ -32,7 +32,7 @@ Files with executed line/function counts where available:
3232
(75%) src/engine/object-model/objectDefinitionSchema.js - executed lines 58/58; executed functions 3/4
3333
(77%) toolbox/tools-page-accordions.js - executed lines 965/965; executed functions 79/103
3434
(86%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 24/28
35-
(94%) toolbox/objects/objects.js - executed lines 1107/1107; executed functions 99/105
35+
(93%) toolbox/objects/objects.js - executed lines 1107/1107; executed functions 98/105
3636
(100%) src/engine/object-model/index.js - executed lines 29/29; executed functions 1/1
3737
(100%) toolbox/objects/objects-api-client.js - executed lines 10/10; executed functions 2/2
3838
(100%) toolbox/project-workspace/project-workspace-api-client.js - executed lines 12/12; executed functions 2/2
@@ -43,4 +43,4 @@ Uncovered or low-coverage changed JS files:
4343
Changed JS files considered:
4444
(0%) src/dev-runtime/guest-seeds/tool-metadata-inventory.js - changed JS file not collected as browser runtime coverage
4545
(0%) tests/playwright/tools/ObjectsTool.spec.mjs - changed JS file not collected as browser runtime coverage
46-
(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

tests/playwright/tools/ObjectsTool.spec.mjs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ test("Objects exposes production copy, setup status, and broad table input", asy
156156
await expect(page.locator("[data-objects-template-catalog] td:first-child")).toHaveText(TYPE_OPTIONS);
157157
await expect(page.locator("[data-objects-template-catalog]")).toContainText("Spawn Point");
158158
await expect(page.locator("[data-objects-template-catalog]")).toContainText("Decoration");
159+
await expect(page.locator("[data-objects-template-catalog]")).not.toContainText("Events");
159160
await expect(page.locator("[data-objects-template-catalog]")).not.toContainText("Sprite");
160161
await expect(page.locator("[data-objects-template-catalog]")).toContainText("Can Move");
161162
await expect(page.locator("[data-objects-template-catalog]")).toContainText("Scores Points");
@@ -174,7 +175,8 @@ test("Objects exposes production copy, setup status, and broad table input", asy
174175
]);
175176
await expect(page.locator("[data-objects-list-table] thead")).not.toContainText("Status");
176177
await expect(page.getByText("Object Types", { exact: true })).toHaveCount(0);
177-
await expect(page.locator("[data-objects-type-basics] li")).toHaveText(TYPE_OPTIONS);
178+
await expect(page.getByText("Type Choices", { exact: true })).toHaveCount(0);
179+
await expect(page.locator("[data-objects-type-basics]")).toHaveCount(0);
178180
await expect(page.locator("[data-objects-readiness]")).toHaveText("Not Configured");
179181
await expect(page.locator("[data-objects-output-readiness]")).toHaveText("Not Configured");
180182
await expect(page.locator("[data-objects-asset-status]")).toHaveText("Not Configured");
@@ -227,7 +229,10 @@ test("Objects exposes production copy, setup status, and broad table input", asy
227229
await expect(page.locator("[data-objects-row-open-hitboxes]").first()).toHaveClass(/primary/);
228230
await expect(page.locator("[data-objects-row-open-events]").first()).toHaveClass(/primary/);
229231
await expect(page.locator("[data-objects-row-open-hitboxes]").first()).toHaveAttribute("title", "Missing Hitbox.");
230-
await expect(page.locator("[data-objects-row-open-events]").first()).toHaveAttribute("title", "Missing Events.");
232+
await expect(page.locator("[data-objects-row-open-events]").first()).toHaveAttribute(
233+
"title",
234+
"Missing Events. Events configure when object behavior happens."
235+
);
231236
await expect(page.locator("[data-objects-output-render-asset]")).toHaveText("None");
232237
await expect(page.locator("[data-objects-edit-sprite]")).toBeHidden();
233238
await expect(page.locator("[data-objects-output-setup]")).toHaveText("Objects have saved setup details.");
@@ -471,7 +476,10 @@ test("Object Type Catalog selection prefills active table rows", async ({ page }
471476
await expect(page.locator("[data-objects-row-open-events]")).toHaveClass(/primary/);
472477
await expect(page.locator("[data-objects-row-edit-sprite]")).toHaveAttribute("title", "Sprite asset ready.");
473478
await expect(page.locator("[data-objects-row-open-hitboxes]")).toHaveAttribute("title", "Missing Hitbox.");
474-
await expect(page.locator("[data-objects-row-open-events]")).toHaveAttribute("title", "Missing Events.");
479+
await expect(page.locator("[data-objects-row-open-events]")).toHaveAttribute(
480+
"title",
481+
"Missing Events. Events configure when object behavior happens."
482+
);
475483
await expect(page.locator("[data-objects-edit-sprite]")).toHaveAttribute(
476484
"href",
477485
"/toolbox/sprites/index.html?assetKey=sprite_catalog_hero&objectKey=catalog-hero&sourceTool=objects"

toolbox/objects/index.html

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ <h2>Objects</h2>
5555
</div>
5656
</div>
5757
</details>
58-
<details class="vertical-accordion" open>
59-
<summary>Type Choices</summary>
60-
<div class="accordion-body content-stack">
61-
<p>Types describe each object's setup purpose. Use Custom when a project-specific type is not listed.</p>
62-
<ul data-objects-type-basics></ul>
63-
</div>
64-
</details>
6558
</div>
6659
</aside>
6760
<div data-tool-display-mode data-asset-root="assets/theme-v2/images" data-tool-slug="objects" data-tool-icon-src="assets/theme-v2/images/badges/objects.png" data-tool-character-src="assets/theme-v2/images/tools/objects.png"></div>

toolbox/objects/objects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ function rowConfigurationActions(object) {
558558
const openHitboxes = actionLink("Open Hitboxes", hitboxesHref(object), "objectsRowOpenHitboxes", id, "btn btn--compact primary");
559559
const openEvents = actionLink("Open Events", eventsHref(object), "objectsRowOpenEvents", id, "btn btn--compact primary");
560560
openHitboxes.title = "Missing Hitbox.";
561-
openEvents.title = "Missing Events.";
561+
openEvents.title = "Missing Events. Events configure when object behavior happens.";
562562
links.push(openHitboxes, openEvents);
563563
return links;
564564
}

0 commit comments

Comments
 (0)