Skip to content

Commit 7fae159

Browse files
committed
Consolidate Objects status into table row actions - PR_26161_012-objects-table-status-actions
1 parent 773a579 commit 7fae159

8 files changed

Lines changed: 764 additions & 890 deletions

File tree

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +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/persistence/mock-db-store.js
5-
M src/dev-runtime/server/mock-api-router.mjs
64
M tests/playwright/tools/ObjectsTool.spec.mjs
5+
M toolbox/objects/index.html
76
M toolbox/objects/objects.js
8-
?? docs_build/dev/reports/objects-db-persistence-fix-report.md
9-
?? src/dev-runtime/persistence/tool-repositories/objects-mock-repository.js
10-
?? toolbox/objects/objects-api-client.js
7+
?? docs_build/dev/reports/objects-table-status-actions-report.md
118

129
# git ls-files --others --exclude-standard
13-
docs_build/dev/reports/objects-db-persistence-fix-report.md
14-
src/dev-runtime/persistence/tool-repositories/objects-mock-repository.js
15-
toolbox/objects/objects-api-client.js
10+
docs_build/dev/reports/objects-table-status-actions-report.md
1611

1712
# git diff --stat
18-
.../dev/reports/coverage_changed_js_guardrail.txt | 10 +-
19-
.../dev/reports/playwright_v8_coverage_report.txt | 19 +++-
20-
src/dev-runtime/persistence/mock-db-store.js | 5 +
21-
src/dev-runtime/server/mock-api-router.mjs | 20 +++-
22-
tests/playwright/tools/ObjectsTool.spec.mjs | 95 ++++++++++++++++++
23-
toolbox/objects/objects.js | 109 +++++++++++++++++++--
24-
6 files changed, 241 insertions(+), 17 deletions(-)
13+
.../dev/reports/coverage_changed_js_guardrail.txt | 2 +-
14+
.../dev/reports/playwright_v8_coverage_report.txt | 4 +-
15+
tests/playwright/tools/ObjectsTool.spec.mjs | 123 +++++++++++---------
16+
toolbox/objects/index.html | 21 +---
17+
toolbox/objects/objects.js | 128 ++++++++-------------
18+
5 files changed, 120 insertions(+), 158 deletions(-)

docs_build/dev/reports/codex_review.diff

Lines changed: 548 additions & 717 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
@@ -9,7 +9,7 @@ Changed runtime JS files considered:
99
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
1010
(0%) src/dev-runtime/persistence/tool-repositories/objects-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
1111
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
12-
(94%) toolbox/objects/objects.js - executed lines 1150/1150; executed functions 103/109
12+
(94%) toolbox/objects/objects.js - executed lines 1123/1123; executed functions 101/107
1313
(100%) toolbox/objects/objects-api-client.js - executed lines 10/10; executed functions 2/2
1414

1515
Guardrail warnings:
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# PR_26161_012 Objects Table Status Actions 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 edits.
11+
- PASS: Used the user-provided `PR_26161_012-objects-table-status-actions` request as the active BUILD source.
12+
- PASS: Continued from `PR_26161_011`.
13+
- PASS: Kept the PR purpose singular: consolidate Objects status/actions into table rows.
14+
15+
## Requirement Checklist
16+
- PASS: Consolidated Object Status into the Objects Table with a row-level `Status` column.
17+
- PASS: Removed the separate Object Status panel because it duplicated per-row status/actions.
18+
- PASS: Added row-level actions between `Edit` and `Trash`: `Edit Sprite`, `Open Hitboxes`, and `Open Events`.
19+
- PASS: `Edit Sprite` appears only for saved Sprite rows with a linked render asset.
20+
- PASS: `Open Hitboxes` and `Open Events` appear for saved object rows with object keys.
21+
- PASS: Missing Hitbox/Event actions use existing Theme V2 `btn btn--compact primary` classes to highlight attention-needed setup.
22+
- PASS: Available linked Sprite actions use existing Theme V2 `btn btn--compact cyan` classes to highlight ready/available setup.
23+
- PASS: Row status uses existing Theme V2 `swatch-label swatch-gold` for missing setup and `swatch-label swatch-green` for ready rows.
24+
- PASS: Used creator-facing labels only; no handoff/session/MVP/internal wording was introduced in Objects UI files.
25+
- PASS: Preserved PR_26161_011 DB/mock-adapter persistence.
26+
- PASS: Preserved Asset as linked render record display, not invalid free text.
27+
- PASS: Preserved State as visible in the Objects table.
28+
- PASS: Preserved Object Type Catalog compact display with `Template` and `Capability` only.
29+
- PASS: Preserved table-first input, `Add Object` below the table, Add disabled while adding, Cancel, Edit, Trash, Reset Table, and Sprite asset linking.
30+
- PASS: Did not add sample JSON alignment, auth behavior, production DB behavior, or unrelated tool rewrites.
31+
- PASS: Kept Theme V2 only and preserved HTML restrictions.
32+
33+
## Implementation Evidence
34+
- `toolbox/objects/index.html`: removed the duplicate Object Status card and added `Status` to the Objects table.
35+
- `toolbox/objects/objects.js`: renders row status badges and inserts configuration action links between `Edit` and `Trash`.
36+
- `toolbox/objects/objects.js`: keeps Sprite asset display linked to shared asset records and preserves existing persistence calls.
37+
- `tests/playwright/tools/ObjectsTool.spec.mjs`: verifies removed status panel, row action order, action state classes, persistence after reload, and Sprite linking after reload.
38+
39+
## Impacted Lane
40+
- Impacted lane: Objects tool UI/runtime.
41+
- Playwright impacted: Yes.
42+
- Changed runtime JavaScript: `toolbox/objects/objects.js`.
43+
44+
## Testing Performed
45+
- PASS: `node --check toolbox/objects/objects.js`
46+
- PASS: `node --check tests/playwright/tools/ObjectsTool.spec.mjs`
47+
- PASS: HTML restriction check for `toolbox/objects/index.html` returned no inline script/style/event handler matches.
48+
- PASS: Objects forbidden wording scan returned no matches in `toolbox/objects/index.html` or `toolbox/objects/objects.js`.
49+
- PASS: `npx playwright test tests/playwright/tools/ObjectsTool.spec.mjs --workers=1 --reporter=line` (6 passed).
50+
- PASS: `git diff --check` exited 0 with line-ending warnings only.
51+
- PASS: `docs_build/dev/reports/playwright_v8_coverage_report.txt` was produced by targeted Objects Playwright.
52+
53+
## Playwright Behavior Coverage
54+
- PASS: Separate Object Status panel and summary table are absent.
55+
- PASS: Objects Table includes the consolidated `Status` column.
56+
- PASS: Row status shows `Missing Hitbox, Missing Events` for saved rows that need setup.
57+
- PASS: `Open Hitboxes` and `Open Events` render between `Edit` and `Trash` and use the attention-needed button class.
58+
- PASS: Saved Sprite rows render `Edit Sprite` between `Edit` and `Open Hitboxes` and use the ready/available button class.
59+
- PASS: Add/Edit/Delete persistence still survives page reload.
60+
- PASS: Sprite asset link persistence still survives page reload.
61+
- PASS: Asset cells remain display-only linked render record output.
62+
63+
## Coverage Notes
64+
- Targeted browser V8 coverage includes `toolbox/objects/objects.js` at 94%.
65+
- The generated coverage report still lists advisory WARN entries for dev-runtime files changed in the current HEAD baseline from PR_26161_011. Those files were not modified in this PR and are not browser-collected runtime files for PR_26161_012.
66+
67+
## Skipped Lanes
68+
- Full samples validation: SKIP. Safe because no sample JSON, sample launch path, or sample runtime behavior changed.
69+
- Engine runtime validation beyond changed-file syntax/import checks: SKIP. Safe because no engine runtime behavior changed.
70+
- Production DB/auth validation: SKIP. Safe because no production DB or auth behavior changed.
71+
- Broad Toolbox/Admin validation: SKIP. Safe because navigation, registration, metadata, admin surfaces, and sample paths were not changed.
72+
73+
## Manual Validation Steps
74+
- Open `/toolbox/objects/index.html`.
75+
- Confirm there is no separate Object Status panel.
76+
- Add a non-Sprite object and confirm the saved row shows `Status` with Missing Hitbox/Event setup.
77+
- Confirm row actions read `Edit`, `Open Hitboxes`, `Open Events`, `Trash`.
78+
- Add a Sprite object and confirm the saved row actions read `Edit`, `Edit Sprite`, `Open Hitboxes`, `Open Events`, `Trash`.
79+
- Confirm `Edit Sprite` opens with the linked sprite asset key.
80+
- Reload after add/edit/delete/reset and confirm the table state persists correctly.
81+
82+
## Required Artifacts
83+
- PASS: `docs_build/dev/reports/objects-table-status-actions-report.md`
84+
- PASS: `docs_build/dev/reports/codex_review.diff`
85+
- PASS: `docs_build/dev/reports/codex_changed_files.txt`
86+
- PASS: `docs_build/dev/reports/playwright_v8_coverage_report.txt`
87+
- PASS: `tmp/PR_26161_012-objects-table-status-actions_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
@@ -20,7 +20,7 @@ Changed runtime JS files covered:
2020
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2121
(0%) src/dev-runtime/persistence/tool-repositories/objects-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2222
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
23-
(94%) toolbox/objects/objects.js - executed lines 1150/1150; executed functions 103/109
23+
(94%) toolbox/objects/objects.js - executed lines 1123/1123; executed functions 101/107
2424
(100%) toolbox/objects/objects-api-client.js - executed lines 10/10; executed functions 2/2
2525

2626
Files with executed line/function counts where available:
@@ -35,7 +35,7 @@ Files with executed line/function counts where available:
3535
(75%) src/engine/object-model/objectDefinitionSchema.js - executed lines 58/58; executed functions 3/4
3636
(77%) toolbox/tools-page-accordions.js - executed lines 965/965; executed functions 79/103
3737
(86%) toolbox/tool-registry-api-client.js - executed lines 152/152; executed functions 24/28
38-
(94%) toolbox/objects/objects.js - executed lines 1150/1150; executed functions 103/109
38+
(94%) toolbox/objects/objects.js - executed lines 1123/1123; executed functions 101/107
3939
(100%) src/engine/object-model/index.js - executed lines 29/29; executed functions 1/1
4040
(100%) toolbox/objects/objects-api-client.js - executed lines 10/10; executed functions 2/2
4141
(100%) toolbox/project-workspace/project-workspace-api-client.js - executed lines 12/12; executed functions 2/2

0 commit comments

Comments
 (0)