refactor: redesign debug panel with overlay visualization

Much better UX for identifying correct rotation:

- Shows ORIGINAL image scaled to fit the modal
- Draws GREEN bounding box showing the crop area
- Draws ORANGE rotated rectangle showing rotation effect
- Darkens everything outside the crop area (visual focus)
- Rotation slider updates the overlay in real-time
- Quick preset buttons for common angles
- Detailed debug logs showing all calculations
- Better styling: dark theme for readability

User can now visually see what will be extracted with the current
rotation angle. Report the angle that makes the label readable.
This commit is contained in:
2026-04-22 11:06:01 +03:00
parent 1a774088a1
commit f708fb7768
2 changed files with 120 additions and 108 deletions

View File

@@ -201,6 +201,7 @@ export default function ItemDetailModal({
originalCropBounds={item.labels_data ? JSON.parse(item.labels_data).image_processing?.crop_bounds : undefined}
originalRotation={item.labels_data ? JSON.parse(item.labels_data).image_processing?.rotation_degrees : undefined}
imageProcessing={item.labels_data ? JSON.parse(item.labels_data).image_processing : undefined}
onClose={() => setShowDebugPanel(false)}
/>
)}
</div>