Skip to content

Commit fbdb0ba

Browse files
author
DavidQ
committed
Track future Object Vector architecture and refine tool order and live point editing - PR_26133_062-object-vector-future-notes-tool-sort-and-live-point-edit
1 parent 7db3b3c commit fbdb0ba

6 files changed

Lines changed: 112 additions & 40 deletions

File tree

docs/dev/reports/playwright_v8_coverage_report.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# PR_26133_061 Playwright V8 Coverage Report
1+
# PR_26133_062 Playwright V8 Coverage Report
22

3-
Task: PR_26133_061-shape-tools-square-and-icon-alignment
3+
Task: PR_26133_062-object-vector-future-notes-tool-sort-and-live-point-edit
44
Date: 2026-05-15
55

66
## Result
@@ -25,7 +25,7 @@ PASS - Coverage reporting was generated during `npm run test:workspace-v2`.
2525

2626
```text
2727
(94%) src/engine/rendering/ObjectVectorRuntimeAssetService.js - executed lines 1131/1131; executed functions 111/118
28-
(95%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 5710/5710; executed functions 601/632
28+
(95%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 5731/5731; executed functions 605/636
2929
```
3030

3131
## Guardrail
@@ -36,4 +36,4 @@ PASS - Coverage reporting was generated during `npm run test:workspace-v2`.
3636

3737
## PR-Specific Note
3838

39-
The Workspace V2 run exercised Object Vector Studio V2 Square tool creation, schema validation for `tool: "square"` shapes backed by rectangle geometry, one-size Square geometry editing, Shape/Tools Nerd Font icon mapping and alignment, and Asteroids runtime object-vector rendering.
39+
The Workspace V2 run exercised Object Vector Studio V2 Shape/Tools ordering, Angle Snap UI/status behavior, live geometry point-handle editing before mouseup, Object Geometry input refresh during drag, workspace dirty tracking during drag, schema validation, and Asteroids runtime object-vector rendering.
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# PR_26133_061 Workspace V2 Playwright Results
1+
# PR_26133_062 Workspace V2 Playwright Results
22

3-
Task: PR_26133_061-shape-tools-square-and-icon-alignment
3+
Task: PR_26133_062-object-vector-future-notes-tool-sort-and-live-point-edit
44
Date: 2026-05-15
55

66
## Result
@@ -14,14 +14,14 @@ PASS - `npm run test:workspace-v2` completed successfully.
1414

1515
## PR-Specific Coverage
1616

17-
- Verified the new Square tool renders in Shape/Tools and creates a schema-valid `tool: "square"` shape backed by rectangle geometry.
18-
- Verified Square geometry uses one `Size` input and applies equal width/height values.
19-
- Verified Oval/Ellipse, Circle, Arc, and Square use the requested Nerd Font icon names.
20-
- Verified Shape/Tools icon spacing stays aligned with text labels visible and in icon-only mode.
17+
- Verified `possible.future.adds.txt` contains the Object Vector atomic-object, future World Vector/Scene instancing, Object/World separation, and future 3D point3d/camera/projection/mesh notes.
18+
- Verified Shape/Tools order is Select first, alphabetical middle, and Text last.
19+
- Verified Angle Snap UI documents current behavior: enabled Angle Snap rounds the Rotate action's entered delta to 15 degree increments; disabled uses the raw entered delta.
20+
- Verified point-handle dragging updates geometry, Object Geometry inputs, preview geometry, selection handle position, and workspace dirty state before mouseup.
2121
- Verified Object Vector Studio V2 and Asteroids runtime scenarios completed without page or console errors.
2222

2323
## Additional Validation
2424

25-
- Focused Shape/Tools layout and Square creation slice passed:
26-
`npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list --grep "layout shell|square shapes"` completed with 2 passed, 0 failed.
25+
- Focused Shape/Tools, Square creation, and dirty-state live edit slices passed:
26+
`npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list --grep "layout shell|square shapes|dirty state"` completed with 3 passed, 0 failed.
2727
- `git diff --check` passed. The command reported existing Windows LF-to-CRLF warnings for touched files and no whitespace errors.

tests/playwright/tools/WorkspaceManagerV2.spec.mjs

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,16 @@ test.describe("Workspace Manager V2 bootstrap", () => {
13081308
await page.locator("#objectVectorStudioV2ObjectNameInput").fill("Blocked Object");
13091309
await page.locator("#objectVectorStudioV2AddObjectButton").click();
13101310
await expect(page.locator("#statusLog")).toHaveValue(/FAIL Add object blocked: load a schema-valid Object Vector Studio V2 payload before adding objects\./);
1311-
await expect(page.locator(".object-vector-studio-v2__tool-toggle")).toHaveText(["Select", "Triangle", "Rectangle", "Square", "Circle", "Ellipse", "Line", "Polygon", "Arc", "Text"]);
1311+
await expect(page.locator(".object-vector-studio-v2__tool-toggle")).toHaveText(["Select", "Arc", "Circle", "Ellipse", "Line", "Polygon", "Rectangle", "Square", "Triangle", "Text"]);
1312+
const futureNotes = await readFile("tools/object-vector-studio-v2/possible.future.adds.txt", "utf8");
1313+
expect(futureNotes).toContain("Object Vector Studio V2 should stay focused on reusable atomic vector objects.");
1314+
expect(futureNotes).toContain("Future World Vector or Scene layers should instance Object Vector objects");
1315+
expect(futureNotes).toContain("Keep Object Vector and World Vector separate");
1316+
expect(futureNotes).toContain("Future 3D vector workflows can build from Object Vector concepts");
1317+
expect(futureNotes).toContain("point3d");
1318+
expect(futureNotes).toContain("camera");
1319+
expect(futureNotes).toContain("projection");
1320+
expect(futureNotes).toContain("mesh");
13121321
await expect(page.locator(".object-vector-studio-v2__shape-icon--triangle")).toBeVisible();
13131322
await expect(page.locator(".object-vector-studio-v2__shape-icon--arc")).toBeVisible();
13141323
const iconStyleState = await page.evaluate(async () => {
@@ -1384,6 +1393,7 @@ test.describe("Workspace Manager V2 bootstrap", () => {
13841393
},
13851394
titles: {
13861395
add: title("#objectVectorStudioV2AddObjectButton"),
1396+
angle: title("#objectVectorStudioV2AngleSnapButton"),
13871397
grid: title("#objectVectorStudioV2GridRenderButton"),
13881398
rename: title("#objectVectorStudioV2RenameObjectButton"),
13891399
shape: title("[data-shape-tool='rectangle']"),
@@ -1484,11 +1494,18 @@ test.describe("Workspace Manager V2 bootstrap", () => {
14841494
expect(iconStyleState.viewportIcons.zoomOut.iconName).toBe("nf-oct-zoom_out");
14851495
expect(iconStyleState.titles).toEqual({
14861496
add: "Add a schema-valid object to the loaded payload",
1497+
angle: "When enabled, the Rotate action rounds the entered rotation delta to 15 degree increments.",
14871498
grid: "Show or hide the preview grid",
14881499
rename: "Disabled until a schema-valid object is selected.",
14891500
shape: "Create a rectangle shape on the selected object",
14901501
zoomIn: "Zoom the work surface in"
14911502
});
1503+
await page.locator("#objectVectorStudioV2AngleSnapButton").click();
1504+
await expect(page.locator("#objectVectorStudioV2AngleSnapButton")).toHaveAttribute("aria-pressed", "true");
1505+
await expect(page.locator("#statusLog")).toHaveValue(/OK Angle snap enabled: Rotate action rounds entered rotation delta to 15 degree increments\./);
1506+
await page.locator("#objectVectorStudioV2AngleSnapButton").click();
1507+
await expect(page.locator("#objectVectorStudioV2AngleSnapButton")).toHaveAttribute("aria-pressed", "false");
1508+
await expect(page.locator("#statusLog")).toHaveValue(/OK Angle snap disabled: Rotate action uses raw entered rotation delta\./);
14921509

14931510
await page.locator('[data-shape-tool="rectangle"]').click();
14941511
await expect(page.locator('[data-shape-tool="rectangle"]')).toHaveAttribute("aria-pressed", "true");
@@ -8723,9 +8740,29 @@ test.describe("Workspace Manager V2 bootstrap", () => {
87238740
await page.locator("#objectVectorStudioV2ApplyGeometryButton").click();
87248741
});
87258742
await expectObjectVectorDirtyAfter("object geometry point handle drag edit", async () => {
8726-
await expect(page.locator("#objectVectorStudioV2RenderSurface [data-geometry-point-handle='polygon-0']")).toHaveCount(1);
8743+
const handle = page.locator("#objectVectorStudioV2RenderSurface [data-geometry-point-handle='polygon-0']");
8744+
await expect(handle).toHaveCount(1);
87278745
const pointBefore = await page.evaluate(() => ({ ...window.__objectVectorStudioV2App.selectedShape().geometry.points[0] }));
8728-
await dragPreviewLocator("#objectVectorStudioV2RenderSurface [data-geometry-point-handle='polygon-0']", 18, 12);
8746+
const pointsBefore = await page.locator("#objectVectorStudioV2RenderSurface [data-shape-index='0']").getAttribute("points");
8747+
const handleBoxBefore = await handle.boundingBox();
8748+
expect(handleBoxBefore).not.toBeNull();
8749+
const x = handleBoxBefore.x + handleBoxBefore.width / 2;
8750+
const y = handleBoxBefore.y + handleBoxBefore.height / 2;
8751+
await page.mouse.move(x, y);
8752+
await page.mouse.down();
8753+
await page.mouse.move(x + 18, y + 12, { steps: 4 });
8754+
await expect.poll(async () => page.evaluate(() => ({ ...window.__objectVectorStudioV2App.selectedShape().geometry.points[0] }))).not.toEqual(pointBefore);
8755+
const livePoint = await page.evaluate(() => ({ ...window.__objectVectorStudioV2App.selectedShape().geometry.points[0] }));
8756+
await expect(page.locator("#objectVectorStudioV2ObjectDetails [data-polygon-point-index='0'][data-polygon-point-axis='x']")).toHaveValue(String(livePoint.x));
8757+
await expect(page.locator("#objectVectorStudioV2ObjectDetails [data-polygon-point-index='0'][data-polygon-point-axis='y']")).toHaveValue(String(livePoint.y));
8758+
await expect.poll(async () => page.locator("#objectVectorStudioV2RenderSurface [data-shape-index='0']").getAttribute("points")).not.toBe(pointsBefore);
8759+
await expect.poll(async () => {
8760+
const box = await handle.boundingBox();
8761+
return box ? { x: Math.round(box.x), y: Math.round(box.y) } : null;
8762+
}).not.toEqual({ x: Math.round(handleBoxBefore.x), y: Math.round(handleBoxBefore.y) });
8763+
const dirtyWhileDragging = await readObjectVectorWorkspaceSession(page);
8764+
expect(dirtyWhileDragging.dirty.isDirty).toBe(true);
8765+
await page.mouse.up();
87298766
const pointAfter = await page.evaluate(() => ({ ...window.__objectVectorStudioV2App.selectedShape().geometry.points[0] }));
87308767
expect(pointAfter).not.toEqual(pointBefore);
87318768
});

tools/object-vector-studio-v2/index.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,9 @@ <h2 class="tools-platform-frame__eyebrow">First-Class Tools Surface V2</h2>
182182
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--select" aria-hidden="true"></span>
183183
<span class="object-vector-studio-v2__tool-label">Select</span>
184184
</button>
185-
<button class="object-vector-studio-v2__tool-toggle" type="button" aria-pressed="false" data-shape-tool="triangle" title="Create a triangle shape on the selected object">
186-
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--triangle" aria-hidden="true"></span>
187-
<span class="object-vector-studio-v2__tool-label">Triangle</span>
188-
</button>
189-
<button class="object-vector-studio-v2__tool-toggle" type="button" aria-pressed="false" data-shape-tool="rectangle" title="Create a rectangle shape on the selected object">
190-
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--rectangle" aria-hidden="true"></span>
191-
<span class="object-vector-studio-v2__tool-label">Rectangle</span>
192-
</button>
193-
<button class="object-vector-studio-v2__tool-toggle" type="button" aria-pressed="false" data-shape-tool="square" title="Create a square shape on the selected object">
194-
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--square" aria-hidden="true"></span>
195-
<span class="object-vector-studio-v2__tool-label">Square</span>
185+
<button class="object-vector-studio-v2__tool-toggle" type="button" aria-pressed="false" data-shape-tool="arc" title="Create an arc shape on the selected object">
186+
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--arc" aria-hidden="true"></span>
187+
<span class="object-vector-studio-v2__tool-label">Arc</span>
196188
</button>
197189
<button class="object-vector-studio-v2__tool-toggle" type="button" aria-pressed="false" data-shape-tool="circle" title="Create a circle shape on the selected object">
198190
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--circle" aria-hidden="true"></span>
@@ -210,9 +202,17 @@ <h2 class="tools-platform-frame__eyebrow">First-Class Tools Surface V2</h2>
210202
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--polygon" aria-hidden="true"></span>
211203
<span class="object-vector-studio-v2__tool-label">Polygon</span>
212204
</button>
213-
<button class="object-vector-studio-v2__tool-toggle" type="button" aria-pressed="false" data-shape-tool="arc" title="Create an arc shape on the selected object">
214-
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--arc" aria-hidden="true"></span>
215-
<span class="object-vector-studio-v2__tool-label">Arc</span>
205+
<button class="object-vector-studio-v2__tool-toggle" type="button" aria-pressed="false" data-shape-tool="rectangle" title="Create a rectangle shape on the selected object">
206+
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--rectangle" aria-hidden="true"></span>
207+
<span class="object-vector-studio-v2__tool-label">Rectangle</span>
208+
</button>
209+
<button class="object-vector-studio-v2__tool-toggle" type="button" aria-pressed="false" data-shape-tool="square" title="Create a square shape on the selected object">
210+
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--square" aria-hidden="true"></span>
211+
<span class="object-vector-studio-v2__tool-label">Square</span>
212+
</button>
213+
<button class="object-vector-studio-v2__tool-toggle" type="button" aria-pressed="false" data-shape-tool="triangle" title="Create a triangle shape on the selected object">
214+
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--triangle" aria-hidden="true"></span>
215+
<span class="object-vector-studio-v2__tool-label">Triangle</span>
216216
</button>
217217
<button class="object-vector-studio-v2__tool-toggle" type="button" aria-pressed="false" data-shape-tool="text" title="Create a text shape on the selected object">
218218
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--text" aria-hidden="true"></span>
@@ -222,7 +222,7 @@ <h2 class="tools-platform-frame__eyebrow">First-Class Tools Surface V2</h2>
222222
<hr class="object-vector-studio-v2__separator">
223223
<div class="object-vector-studio-v2__snap-actions" aria-label="Snap controls">
224224
<button id="objectVectorStudioV2GridSnapButton" type="button" aria-pressed="false" title="Snap move and resize edits to the grid">Grid Snap</button>
225-
<button id="objectVectorStudioV2AngleSnapButton" type="button" aria-pressed="false" title="Snap rotation edits to 15 degree increments">Angle Snap</button>
225+
<button id="objectVectorStudioV2AngleSnapButton" type="button" aria-pressed="false" title="When enabled, the Rotate action rounds the entered rotation delta to 15 degree increments.">Angle Snap</button>
226226
<button id="objectVectorStudioV2GridRenderButton" type="button" aria-pressed="false" title="Show or hide the preview grid">Grid</button>
227227
<button id="objectVectorStudioV2ToolLabelModeButton" type="button" aria-pressed="false" title="Toggle shape tool labels between icon-only and icon plus text">Icon/Text</button>
228228
</div>

0 commit comments

Comments
 (0)