CANVAS BASICS VERIFICATION

Comprehensive guidelines for AI-assisted development within the Editor platform

Canvas Basics Verification Plan ๐Ÿ”

๐ŸŽฏ Objective

Verify that ALL basic canvas actions work correctly before proceeding with the JSON-first architecture plan.


โœ… Core Interactions Checklist

1. Element Selection

2. Element Dragging

3. Element Resizing

4. Element Rotation

5. Control Points (Connection Ports)

6. Connections

7. Shape Creation

8. AI Generation

9. Edit Operations

10. Alignment Tools

11. Keyboard Shortcuts

12. Persistence

13. Canvas Controls

14. Visual Feedback

15. Stats Display


๐Ÿงช Test Scenarios

Scenario 1: Complete Workflow

  1. Add circle
  2. Add rectangle
  3. Select circle
  4. Drag circle to new position
  5. Resize circle from right edge
  6. Rotate circle 45ยฐ
  7. Toggle control points
  8. Connect circle to rectangle
  9. Undo last 3 actions
  10. Redo last 2 actions
  11. Duplicate rectangle
  12. Select all
  13. Align center
  14. Delete one element
  15. Refresh page
  16. Verify all changes persisted

Expected: All actions work smoothly, no errors, state persists


Scenario 2: Resize Edge Cases

  1. Add large rectangle (200x150)
  2. Resize from top edge โ†’ should grow/shrink vertically, X unchanged
  3. Resize from bottom edge โ†’ should grow/shrink vertically, opposite anchor
  4. Resize from left edge โ†’ should grow/shrink horizontally, right edge fixed
  5. Resize from right edge โ†’ should grow/shrink horizontally, left edge fixed
  6. Resize to minimum (20x20) โ†’ should enforce minimum
  7. Try to resize beyond viewport โ†’ should constrain

Expected: No sliding, no distortion, predictable anchoring


Scenario 3: Rotation Precision

  1. Add hexagon
  2. Rotate without Shift โ†’ free rotation
  3. Undo
  4. Rotate with Shift held โ†’ should snap to 0ยฐ, 15ยฐ, 30ยฐ, 45ยฐ, etc.
  5. Verify rotation in data display
  6. Resize rotated element โ†’ should resize along rotated axes
  7. Drag rotated element โ†’ should move normally

Expected: Rotation accurate, constraints work, interactions clean


Scenario 4: Connection Stress Test

  1. Add 3 circles in a triangle layout
  2. Connect circle A โ†’ B
  3. Connect circle B โ†’ C
  4. Connect circle C โ†’ A
  5. Select circle A and move it โ†’ all connected lines follow
  6. Resize circle B โ†’ connections update anchor points
  7. Rotate circle C โ†’ connections adjust
  8. Delete circle B โ†’ connections to/from B are deleted
  9. Undo delete โ†’ circle B and connections restore

Expected: Connections always accurate, no orphaned lines


Scenario 5: Multi-Select Operations

  1. Add 5 shapes in a grid
  2. Select all (Ctrl+A)
  3. Drag group โ†’ all move together
  4. Align center horizontal โ†’ all align
  5. Deselect
  6. Select 3 specific elements
  7. Duplicate selection โ†’ 3 new elements created
  8. Delete selection โ†’ 3 elements removed
  9. Undo โ†’ 3 elements restore

Expected: Multi-select works consistently across operations


Scenario 6: AI Generation Quality

  1. Type: "draw a robot"
  2. Click generate
  3. Verify robot appears with body, head, arms, legs
  4. Select robot parts
  5. Verify all parts are interactive
  6. Clear canvas
  7. Type: "create a flowchart with 3 steps"
  8. Verify flowchart appears with connected boxes
  9. Verify connections work

Expected: AI generates valid, interactive compositions


Scenario 7: Undo/Redo Chain

  1. Add circle (state 1)
  2. Resize circle (state 2)
  3. Rotate circle (state 3)
  4. Add rectangle (state 4)
  5. Connect circle to rectangle (state 5)
  6. Undo 5 times โ†’ back to empty canvas
  7. Redo 5 times โ†’ back to state 5
  8. Undo 2 times โ†’ state 3
  9. Add triangle (new state 4, history branch)
  10. Verify old state 4-5 are lost

Expected: Undo/redo works correctly, branching handled


Scenario 8: Persistence Recovery

  1. Create complex scene (5+ elements, 3+ connections)
  2. Move, resize, rotate various elements
  3. Note exact positions/sizes
  4. Refresh page
  5. Verify ALL element properties match exactly
  6. Verify connections intact
  7. Undo โ†’ verify undo history doesn't persist (or does, if implemented)

Expected: Full state recovery after refresh


๐Ÿ› Known Issues to Check

Issue 1: Resize Slide Bug

Issue 2: Event Propagation

Issue 3: Control Points Missing

Issue 4: setTimeout Usage


๐Ÿ“Š Testing Methodology

Manual Testing (Current)

  1. Open app: http://localhost:5701
  2. Navigate to Universal Compositor Demo
  3. Execute each test scenario
  4. Document results in this file
  5. Fix any issues found
  6. Re-test

Automated Testing (Future)


๐Ÿšฆ Test Results

Test Status Legend

Results Table

Category Test Status Notes
Selection Click to select โณ
Selection Deselect โณ
Selection Escape key โณ
Selection Ctrl+A โณ
Dragging Smooth drag โณ
Dragging Viewport constraint โณ
Dragging Multi-drag โณ
Resizing All 8 handles โœ… Fixed in this session
Resizing No sliding โœ… Fixed in this session
Resizing SVG scales โณ Need to verify
Rotation Purple handle โณ
Rotation Shift snap โณ
Rotation No drag trigger โœ… Fixed in this session
Control Points Toggle visibility โณ
Control Points Connection creation โณ
Connections 4 path types โณ
Connections Follow elements โณ
Connections Smart delete โณ
Shapes Create 5 types โณ
AI Prompt validation โœ… Fixed in this session
AI Template generation โณ
Edit Undo/Redo โณ
Edit Duplicate โณ
Edit Delete โณ
Alignment 6 directions โณ
Keyboard All shortcuts โณ
Persistence Auto-save โณ
Persistence Page refresh โณ
Persistence All properties โณ

๐ŸŽฏ Success Criteria

All basics working when:

  1. โœ… All 15 core interaction categories pass
  2. โœ… All 8 test scenarios execute successfully
  3. โœ… Zero linter errors
  4. โœ… Zero runtime errors
  5. โœ… Performance is smooth (no lag)
  6. โœ… Visual feedback is clear
  7. โœ… Persistence works reliably
  8. โœ… Code is clean and maintainable

Current Progress: ~40% (4 of 10 core features verified)


๐Ÿ“ Testing Instructions

For User

  1. Open: http://localhost:5701
  2. Navigate to: Universal Compositor Demo
  3. Test each scenario sequentially
  4. Report any issues found

For Developer

  1. Review code for potential issues
  2. Check console for errors
  3. Verify event flows
  4. Test edge cases
  5. Profile performance if needed

๐Ÿ”ง Issues Found During Testing

Document any issues discovered during verification

Issue Template

### Issue #N: [Title]
- **Category**: [Selection/Dragging/Resizing/etc.]
- **Severity**: [Critical/High/Medium/Low]
- **Description**: [What went wrong]
- **Steps to Reproduce**:
  1. ...
  2. ...
- **Expected**: [What should happen]
- **Actual**: [What actually happened]
- **Fix**: [Solution implemented or planned]
- **Status**: [Open/In Progress/Fixed/Verified]

๐Ÿ“ˆ Next Steps

  1. User Tests Canvas โ†’ Reports results
  2. Fix Any Issues โ†’ Implement fixes
  3. Re-verify โ†’ Confirm all basics work
  4. Document โ†’ Update this file with results
  5. Proceed โ†’ Move to JSON-first architecture (Phase A)

Status: ๐ŸŸก Verification In Progress Priority: ๐Ÿ”ด Critical - Must complete before advancing Owner: User + AI collaboration Timeline: Complete in current session