chore: Keep Screenshot editor sources under 500 lines

Merged
HA
3mo ago
+1493-1006

Summary

  • Split three Screenshot god classes so each implementation file stays under 500 lines without changing capture/annotation behavior.
  • Added ScreenshotUseCase characterization tests first; RaycastGridAnnotator/UIElementAnnotator already had strong dedicated coverage.

User Impact

  • No user-facing behavior change for screenshot capture, UI annotation, or raycast grid annotation.
  • Maintainability improves by separating capture orchestration, annotation rendering/styling, and raycast summary/physics builders.

Changes

  • ScreenshotUseCase → orchestration + coordinate metadata / parameter validator / file writer / response factory helpers
  • UIElementAnnotator → collection/overlay entrypoints + UIElementAnnotationRenderer / UIElementAnnotationStyling
  • RaycastGridAnnotator → grid orchestration + RaycastLayerSummaryBuilder / RaycastPhysicsColliderBuilder

Verification

  • uloop compile → 0/0
  • wc -l all target + extracted files < 500
  • EditMode Screenshot|RaycastGrid|UIElementAnnotator → 93 passed
  • dotnet test tests/UnityCliLoop.CodeComplexity.Tests → 12 passed

Made with Cursor