Skip to content

Commit 76ef2bc

Browse files
committed
Merge PR_26179_ALFA_012 Object Properties MVP
2 parents a2da07a + 005f100 commit 76ef2bc

15 files changed

Lines changed: 1790 additions & 886 deletions

assets/toolbox/objects/js/index.js

Lines changed: 356 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# PR_26179_ALFA_012 Branch Validation
2+
3+
Branch: PR_26179_ALFA_012-objects-properties-mvp
4+
Base stack: PR_26179_ALFA_011-objects-manager-mvp
5+
6+
## Gates
7+
- Current branch is PR_26179_ALFA_012-objects-properties-mvp: PASS
8+
- Project Instructions loaded from `dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md`: PASS
9+
- Canonical report path `dev/reports/`: PASS
10+
- Canonical ZIP path `dev/workspace/zips/`: PASS
11+
- No `docs_build/` report output created: PASS
12+
- No `tmp/` ZIP output created: PASS
13+
- One PR purpose only: PASS
14+
- No API architecture change: PASS
15+
16+
## Validation Commands
17+
- `node --check assets/toolbox/objects/js/index.js`: PASS
18+
- `node --check src/dev-runtime/toolbox-api/alfa-tool-services.mjs`: PASS
19+
- `node --check dev/tests/playwright/tools/ObjectsTool.spec.mjs`: PASS
20+
- `node --test dev/tests/dev-runtime/ObjectsApiService.test.mjs`: PASS
21+
- `npx playwright test dev/tests/playwright/tools/ObjectsTool.spec.mjs -g "Object Details panel"`: PASS
22+
- `npx playwright test dev/tests/playwright/tools/ObjectsTool.spec.mjs`: PASS
23+
- `git diff --check`: PASS
24+
- `npm run validate:canonical-structure`: PASS
25+
26+
Branch validation: PASS
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# PR_26179_ALFA_012 Manual Validation Notes
2+
3+
## Manual Review Path
4+
1. Open `toolbox/objects/index.html` with the API server running.
5+
2. Add an object from the Objects table.
6+
3. Select `Details` on the object row.
7+
4. Confirm Object Details shows Name, Description, Type, Tags, Active, Visible, Sprite reference, Audio reference, and Default values.
8+
5. Edit Description and confirm `Unsaved changes: yes` appears.
9+
6. Press Cancel and confirm the field resets and dirty state clears.
10+
7. Clear Name and press Save Details; confirm the friendly Name validation message appears.
11+
8. Enter valid details and press Save Details.
12+
9. Refresh the page; confirm saved details reload from the API-backed object record.
13+
14+
## Expected Owner Review Result
15+
The panel is reviewable as a normal product form. It does not expose a behavior editor, Rules, Worlds, JSON editor, or engine internals.
16+
17+
## Known Out-of-Scope Items
18+
- Behavior editor.
19+
- Rules integration.
20+
- Worlds integration.
21+
- Database schema expansion.
22+
- New API routes.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# PR_26179_ALFA_012-objects-properties-mvp Report
2+
3+
## Summary
4+
Implemented the Objects Object Details panel as the PR012 vertical slice. The panel lets a signed-in Creator review and edit Name, Description, Type, Tags, Active, Visible, Sprite reference, Audio reference, and Default values for the selected object.
5+
6+
## Scope
7+
- Added Object Details inspector form to `toolbox/objects/index.html`.
8+
- Added detail selection, unsaved-change detection, save/cancel behavior, required-field validation, duplicate-name validation, and sprite-reference validation to `assets/toolbox/objects/js/index.js`.
9+
- Persisted details through the existing Objects API service and existing `object_definition_records` JSON payloads without adding routes, tables, or new API architecture.
10+
- Updated Objects service tests to prove details round-trip through the database adapter.
11+
- Updated Objects Playwright tests to cover the human-testable details flow and refresh persistence.
12+
13+
## Architecture Notes
14+
- No behavior editor added.
15+
- No Rules integration added.
16+
- No Worlds integration added.
17+
- No browser-owned product data added.
18+
- No page-local product data source of truth added.
19+
- Object Details are persisted through the existing API-backed Objects service from PR011.
20+
- Review-only details are stripped before engine object-definition validation so engine schema remains unchanged.
21+
22+
## Validation Outcome
23+
PASS. Final targeted validation completed successfully.
24+
25+
## Corrective Notes From Validation
26+
- Initial Playwright run exposed engine validation rejecting the new review-only `details` field. Fixed by validating a stripped engine-definition shape.
27+
- Initial details save exposed nonexistent sprite references reaching DB persistence. Fixed by adding a friendly Sprite reference validation message.
28+
- Row/details rename saves preserved the old object slug. Fixed by regenerating object ids from the edited name.
29+
30+
## Changed Runtime Surface
31+
- Objects page Object Details inspector.
32+
- Objects browser controller.
33+
- Objects API service serialization for existing object records.
34+
35+
## Not Changed
36+
- API routes.
37+
- Database schema.
38+
- Behavior editor.
39+
- Rules or Worlds integrations.
40+
- Engine object model contract.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# PR_26179_ALFA_012 Requirement Checklist
2+
3+
- Complete Object Details panel using existing Objects API persistence from PR011: PASS
4+
- Do not modify API architecture: PASS
5+
- Focus on Product Owner reviewability: PASS
6+
- Name property: PASS
7+
- Description property: PASS
8+
- Type property: PASS
9+
- Tags property: PASS
10+
- Active property: PASS
11+
- Visible property: PASS
12+
- Sprite reference property: PASS
13+
- Audio reference property: PASS
14+
- Default values property: PASS
15+
- Required-field validation: PASS
16+
- Friendly validation messages: PASS
17+
- Save behavior: PASS
18+
- Cancel behavior: PASS
19+
- Unsaved-change detection: PASS
20+
- No behavior editor: PASS
21+
- No Rules integration: PASS
22+
- No Worlds integration: PASS
23+
- One PR purpose only: PASS
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# PR_26179_ALFA_012 Validation Lane Report
2+
3+
Lane: Objects tool focused validation
4+
5+
## Commands
6+
1. `node --check assets/toolbox/objects/js/index.js`
7+
2. `node --check src/dev-runtime/toolbox-api/alfa-tool-services.mjs`
8+
3. `node --check dev/tests/playwright/tools/ObjectsTool.spec.mjs`
9+
4. `node --test dev/tests/dev-runtime/ObjectsApiService.test.mjs`
10+
5. `npx playwright test dev/tests/playwright/tools/ObjectsTool.spec.mjs -g "Object Details panel"`
11+
6. `npx playwright test dev/tests/playwright/tools/ObjectsTool.spec.mjs`
12+
7. `git diff --check`
13+
8. `npm run validate:canonical-structure`
14+
15+
## Result
16+
PASS
17+
18+
## Impacted Coverage
19+
- Objects API service database adapter round-trip.
20+
- Objects table behavior.
21+
- Object Details panel properties, validation, save/cancel, dirty state, and refresh persistence.
22+
- Guest write redirect coverage retained.
23+
- Sprite asset link behavior retained.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# PR_26179_ALFA_012 Validation Report
2+
3+
## Final Targeted Validation
4+
5+
PASS: `node --check assets/toolbox/objects/js/index.js`
6+
PASS: `node --check src/dev-runtime/toolbox-api/alfa-tool-services.mjs`
7+
PASS: `node --check dev/tests/playwright/tools/ObjectsTool.spec.mjs`
8+
PASS: `node --test dev/tests/dev-runtime/ObjectsApiService.test.mjs`
9+
PASS: `npx playwright test dev/tests/playwright/tools/ObjectsTool.spec.mjs -g "Object Details panel"`
10+
PASS: `npx playwright test dev/tests/playwright/tools/ObjectsTool.spec.mjs`
11+
PASS: `git diff --check`
12+
PASS: `npm run validate:canonical-structure`
13+
14+
## Playwright Coverage
15+
The focused Objects Playwright suite passed 8/8 tests after fixes.
16+
17+
## Notes
18+
The first browser run intentionally remained in this report history because it caught useful defects before final packaging. Those defects were fixed and final validation passed.
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
M assets/toolbox/objects/js/index.js
2-
A dev/reports/PR_26179_ALFA_011-objects-manager-mvp_branch-validation.md
3-
A dev/reports/PR_26179_ALFA_011-objects-manager-mvp_manual-validation-notes.md
4-
A dev/reports/PR_26179_ALFA_011-objects-manager-mvp_report.md
5-
A dev/reports/PR_26179_ALFA_011-objects-manager-mvp_requirement-checklist.md
6-
A dev/reports/PR_26179_ALFA_011-objects-manager-mvp_validation-lane.md
7-
A dev/reports/PR_26179_ALFA_011-objects-manager-mvp_validation-report.md
8-
M dev/reports/codex_changed_files.txt
9-
M dev/reports/codex_review.diff
10-
A dev/tests/dev-runtime/ObjectsApiService.test.mjs
11-
M dev/tests/playwright/tools/ObjectsTool.spec.mjs
12-
M src/dev-runtime/server/local-api-router.mjs
13-
M src/dev-runtime/toolbox-api/alfa-tool-services.mjs
1+
assets/toolbox/objects/js/index.js
2+
dev/reports/codex_changed_files.txt
3+
dev/reports/codex_review.diff
4+
dev/reports/coverage_changed_js_guardrail.txt
5+
dev/reports/playwright_v8_coverage_report.txt
6+
dev/reports/PR_26179_ALFA_012-objects-properties-mvp_branch_validation.md
7+
dev/reports/PR_26179_ALFA_012-objects-properties-mvp_manual_validation_notes.md
8+
dev/reports/PR_26179_ALFA_012-objects-properties-mvp_report.md
9+
dev/reports/PR_26179_ALFA_012-objects-properties-mvp_requirement_checklist.md
10+
dev/reports/PR_26179_ALFA_012-objects-properties-mvp_validation_lane.md
11+
dev/reports/PR_26179_ALFA_012-objects-properties-mvp_validation_report.md
12+
dev/tests/dev-runtime/ObjectsApiService.test.mjs
13+
dev/tests/playwright/tools/ObjectsTool.spec.mjs
14+
src/dev-runtime/toolbox-api/alfa-tool-services.mjs
15+
toolbox/objects/index.html

0 commit comments

Comments
 (0)