✨ Add region sync for local TDD auto-approval#191
Conversation
- Add `getRegions` API endpoint function for fetching 2D bounding boxes - Create region-metadata.js for local .vizzly/regions.json storage - Create region-service.js for downloading regions from API - Integrate auto-sync into TDD baseline download flow - Add `vizzly regions:sync` standalone command with options: - --screenshots: Sync specific screenshots (comma-separated) - --include-candidates: Include candidate regions (not just confirmed) Regions are user-defined hotspot areas (2D boxes) that mark dynamic content. Unlike historical hotspots (1D Y-bands from diff analysis), these are explicit definitions users have confirmed in the cloud dashboard.
Phase 2 of region sync feature: - Add POST /api/regions/sync endpoint for UI-triggered sync - Add region-coverage.js for 2D bounding box intersection calculation - Integrate region auto-approval into comparison service (80% threshold) - Add getRegionsForScreenshot() method to TDD service - Add "Sync Regions" button in Settings view with include-candidates toggle - Add HotSpotOverlay integration in fullscreen viewer with 'G' keyboard shortcut - Update Observatory to v0.3.1 with new HotSpotOverlay component Regions are user-confirmed 2D bounding boxes from the cloud dashboard. When 80%+ of diff clusters fall within confirmed regions, comparisons auto-pass as "region-filtered" (same behavior as cloud product).
This comment has been minimized.
This comment has been minimized.
Pull Request Review: Region Sync for Local TDD Auto-ApprovalOverviewThis PR adds a significant feature that brings feature parity between local TDD mode and the cloud product by enabling region-based filtering for visual diffs. The implementation is well-structured and follows the existing codebase patterns. ✅ StrengthsArchitecture & Design
Code Quality
|
Features: - Regions bundled in baseline download (no separate sync needed) - Auto-approve comparisons when 80%+ of diff clusters are in confirmed regions - Visualize confirmed regions in fullscreen viewer (green dashed boxes) - Normalize browser name to lowercase for consistent signature matching Changes: - Remove standalone regions:sync command (consolidated into baseline download) - Remove regions router and sync button from Settings UI - Update TDD handler to include full comparison data (regionAnalysis, confirmedRegions) - Use HotSpotOverlay from @vizzly-testing/observatory for region visualization
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@claude can you rereview |
This comment has been minimized.
This comment has been minimized.
|
Claude finished @Robdel12's task in 4m 39s —— View job Re-review of PR #191 ✅SummaryAfter re-reviewing this PR, I can confirm that my original review was based on a misunderstanding. I had reviewed this PR as if it included Phase 1 (CLI commands), but this PR only implements Phase 2 (TDD Server & UI visualization). The PR description mentions both phases, but only Phase 2 code is present. Key Finding: The missing Status: ✅ APPROVED with Minor SuggestionsThe code quality is good, follows established patterns, and the core functionality is sound. The critical issues I flagged previously either:
What Changed Since Original ReviewCommits added:
Observable improvements:
Re-assessment of Original Concerns1.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Vizzly - Visual Test ResultsCLI Reporter - 14 changes need review
Changes needing review (14)search-no-results · Firefox · 1920×1080 · 0.2% diff filter-failed-only · Firefox · 1920×1080 · 1.3% diff search-homepage · Firefox · 1920×1080 · 0.3% diff bulk-accept-dialog · Firefox · 1920×1080 · 10.4% diff viewer-slide-mode · Firefox · 1920×1080 · 0.7% diff viewer-zoomed-100 · Firefox · 1920×1080 · 0.4% diff ...and 8 more in Vizzly. CLI TUI - Processing...Build in progress...
|
Vizzly - Visual Test ResultsCLI Reporter - 14 changes need review
Changes needing review (14)search-no-results · Firefox · 1920×1080 · 0.2% diff filter-failed-only · Firefox · 1920×1080 · 1.3% diff search-homepage · Firefox · 1920×1080 · 0.3% diff bulk-accept-dialog · Firefox · 1920×1080 · 10.4% diff viewer-slide-mode · Firefox · 1920×1080 · 0.7% diff viewer-zoomed-100 · Firefox · 1920×1080 · 0.4% diff ...and 8 more in Vizzly. CLI TUI - 1 change needs review
|







Summary
Enables local TDD mode to use user-defined regions from the cloud dashboard for auto-approving visual diffs. This brings feature parity with the cloud product's region-based filtering.
Phase 1 - CLI & API:
POST /api/sdk/screenshots/regionsendpoint in cloud APIvizzly regions:synccommand with--include-candidatesflag.vizzly/regions.jsonPhase 2 - TDD Server & UI:
POST /api/regions/syncendpoint for UI-triggered syncGto toggle)HotSpotOverlaycomponent to Observatory for sharing with cloudHow it works
vizzly regions:syncor Settings UITest plan
vizzly regions:syncwith valid API token - regions saved to.vizzly/regions.jsonG- green region boxes appear on screenshotnpm test- all tests pass