Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
b4d0d4d
chore: migrate React Navigation to v6
asalsys Feb 27, 2026
459d521
chore: update yarn.lock for React Navigation v6
asalsys Feb 27, 2026
b5b938e
fix: update React Navigation v6 types
asalsys Feb 27, 2026
afb65bd
don't show headers on tab pages
asalsys Feb 27, 2026
76b7d34
Merge remote-tracking branch 'origin/main' into feat/react-navigation…
asalsys Mar 2, 2026
c499e5a
apply the global param list typing to use Navigation
asalsys Mar 2, 2026
b625de7
fix tsc lint
asalsys Mar 2, 2026
907be62
Merge branch 'main' into feat/react-navigation-v6-migration
asalsys Mar 2, 2026
1667a65
fix transparent modal and header shown issue for tab bar pages
asalsys Mar 3, 2026
b9d8bb3
fix modal transparency for earn and rewards
asalsys Mar 3, 2026
d0c8f3c
update snaps
asalsys Mar 4, 2026
06810da
Merge branch 'main' into feat/react-navigation-v6-migration
asalsys Mar 4, 2026
040f378
fix nmerged snapshots
asalsys Mar 4, 2026
d36a120
fix tsc
asalsys Mar 4, 2026
04302fa
update snap
asalsys Mar 4, 2026
54dd674
fix snaps
asalsys Mar 4, 2026
0855b42
fix shard 7
asalsys Mar 4, 2026
c4e0456
fix shard 3 issues
asalsys Mar 5, 2026
4eed21c
Merge branch 'main' into feat/react-navigation-v6-migration
asalsys Mar 5, 2026
0321885
fix shard 8 tests
asalsys Mar 5, 2026
c4390a2
Merge branch 'main' into feat/react-navigation-v6-migration
asalsys Mar 5, 2026
1bae221
fix tsc and snap
asalsys Mar 5, 2026
57c82f8
fix shard 5 tests
asalsys Mar 5, 2026
4677478
fix shard 9 tests
asalsys Mar 5, 2026
8607f70
fix shard 10 tests
asalsys Mar 5, 2026
479004a
chore: add Maestro visual regression testing framework
asalsys Mar 10, 2026
0c2f114
Merge main into feat/react-navigation-v6-migration
asalsys Mar 10, 2026
99b724c
Merge branch 'main' into feat/react-navigation-v6-migration
asalsys Mar 10, 2026
9c3c1fc
fix: add @metamask/geolocation-controller mock for unit tests
asalsys Mar 10, 2026
83a6285
fix shard 1 unit tests
asalsys Mar 10, 2026
a501de8
fix shard 2 unit tests
asalsys Mar 10, 2026
dbc8244
fix shard 3 unit tests
asalsys Mar 10, 2026
c4e3afd
fix shard 4 unit tests
asalsys Mar 10, 2026
c6e30b6
fix shard 6 unit tests
asalsys Mar 10, 2026
575f68c
fix shard 7 unit tests
asalsys Mar 10, 2026
edd697e
fix shard 8 unit tests
asalsys Mar 10, 2026
a1edc3c
fix shard 9 unit tests
asalsys Mar 10, 2026
0087b1c
fix shard 10 unit tests
asalsys Mar 10, 2026
d0aed8a
Merge branch 'main' into feat/react-navigation-v6-migration
asalsys Mar 11, 2026
943f6ab
fix tron tsc error
asalsys Mar 11, 2026
512d6c6
fix: update unit test snapshots for React Navigation v6 migration
asalsys Mar 11, 2026
1db6f30
fix unit test shard 7
asalsys Mar 11, 2026
7649432
fix: update additional unit test snapshots for React Navigation v6
asalsys Mar 11, 2026
375162f
fix: update more unit test snapshots for React Navigation v6
asalsys Mar 11, 2026
161ff35
update snaps
asalsys Mar 11, 2026
03ea180
update snaps
asalsys Mar 11, 2026
bf2ecdb
update snaps
asalsys Mar 11, 2026
3b6e9e2
fix: update final unit test snapshots for React Navigation v6
asalsys Mar 11, 2026
989d28f
fix shard 6
asalsys Mar 11, 2026
e681b49
Delete maestro-output.log
asalsys Mar 11, 2026
f8e8c2c
Merge branch 'main' into feat/react-navigation-v6-migration
asalsys Mar 11, 2026
21387e3
fix ci view tests
asalsys Mar 11, 2026
2141326
Merge remote-tracking branch 'origin/chore/add-maestro-visual-regress…
asalsys Mar 11, 2026
e649825
feat: add visual regression comparison workflow and Cursor skill
asalsys Mar 11, 2026
5f466b4
chore: update visual regression baselines
asalsys Mar 11, 2026
dbc9e9f
fix smoke tests
asalsys Mar 12, 2026
9de0042
Merge remote-tracking branch 'origin/feat/react-navigation-v6-migrati…
asalsys Mar 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
227 changes: 227 additions & 0 deletions .cursor/skills/visual-regression-compare/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
---
name: visual-regression-compare
description: Compare visual regression baselines between PRs to detect UI changes. Use when asked to compare UI changes between branches, generate visual diffs, or validate navigation/UI migration impact.
---

# Visual Regression Comparison Skill

This skill helps compare visual regression baselines between different branches or PRs, typically used to assess the visual impact of significant UI changes like navigation migrations.

## When to Use This Skill

Use this skill when the user wants to:

- Compare visual baselines between two branches or PRs
- Generate visual diff images showing UI changes
- Assess the impact of navigation or UI framework changes
- Validate that UI changes are intentional and acceptable
- Create a visual comparison report for PR review

## Prerequisites

Before running the comparison workflow:

1. **Maestro CLI** must be installed (`curl -Ls 'https://get.maestro.mobile.dev' | bash`)
2. **ImageMagick** must be installed (`brew install imagemagick`)
3. **iOS Simulator** must be running with the app built and installed
4. **Visual regression baselines** must exist in `.maestro/baselines/ios/`

## Workflow Overview

```mermaid
flowchart TD
A[Start] --> B[Create comparison branch]
B --> C[Merge source PR changes]
C --> D[Build app with changes]
D --> E[Run Maestro flows]
E --> F[Capture after-nav screenshots]
F --> G[Generate diff images]
G --> H[Review summary]
H --> I{Acceptable?}
I -->|Yes| J[Document in PR]
I -->|No| K[Investigate changes]
```

## Step-by-Step Instructions

### 1. Set Up Comparison Branch

Create a new branch that combines the visual regression framework with the target PR changes:

```bash
# Start from the target PR branch (e.g., navigation migration)
git checkout feat/react-navigation-v6-migration

# Create comparison branch
git checkout -b chore/visual-regression-nav-comparison

# Merge visual regression framework
git merge origin/chore/add-maestro-visual-regression-tests --no-edit
```

### 2. Prepare the Environment

```bash
# Ensure simulator is running
xcrun simctl boot "iPhone 15 Pro" 2>/dev/null || true

# Build the app with changes
yarn setup:expo # or yarn setup for native
yarn watch:clean &
yarn start:ios
```

### 3. Capture Screenshots with Changes

Run the comparison script to capture new screenshots:

```bash
.maestro/scripts/compare-visual-regression.sh capture
```

This will:

- Create `.maestro/after-nav/` directory structure
- Run Maestro flows with modified screenshot paths
- Save screenshots to `after-nav/` instead of `baselines/`

### 4. Generate Diff Images

```bash
.maestro/scripts/generate-diffs.sh
```

This generates:

- `*-diff.png` - Highlighting changed pixels in red
- `*-comparison.png` - Side-by-side comparison (baseline | after | diff)
- `*-report.txt` - Change metrics for each screen
- `summary.md` - Overall regression summary

### 5. Review Results

Check the summary:

```bash
cat .maestro/diffs/summary.md
```

View diff images:

```bash
open .maestro/diffs/
```

## Script Reference

### compare-visual-regression.sh

| Command | Description |
| --------- | ---------------------------------------------------------- |
| `sync` | Merge latest navigation changes and regenerate screenshots |
| `capture` | Only capture new screenshots (skip merge) |
| `diff` | Only generate diff images (skip capture) |
| `full` | Run full workflow: sync + capture + diff (default) |

### generate-diffs.sh

| Option | Default | Description |
| ------------------- | ------- | --------------------------------- |
| `--highlight-color` | `red` | Color for changed pixels |
| `--threshold` | `5%` | Fuzz threshold for comparison |
| `--output-format` | `both` | `diff`, `side-by-side`, or `both` |

## Directory Structure

```
.maestro/
├── baselines/ios/ # Original baseline screenshots
├── after-nav/ios/ # Screenshots after changes (gitignored)
├── diffs/ios/ # Generated diff images (gitignored)
│ ├── *-diff.png # Pixel difference highlights
│ ├── *-comparison.png # Side-by-side comparisons
│ ├── *-report.txt # Per-screen metrics
│ └── summary.md # Overall summary
└── scripts/
├── compare-visual-regression.sh
└── generate-diffs.sh
```

## Interpreting Results

### Diff Images

- **Red pixels** in diff images indicate changes
- **White pixels** indicate unchanged areas
- Higher change percentage = more significant visual impact

### Expected vs Unexpected Changes

- **Expected**: Navigation transitions, header styles, tab animations
- **Unexpected**: Content shifts, missing elements, layout breaks

### Change Thresholds

- `< 1%` - Minor rendering differences, usually acceptable
- `1-5%` - Small UI changes, review needed
- `> 5%` - Significant changes, detailed review required

## Syncing Updates

When the source PR is updated:

```bash
# On comparison branch
git fetch origin
.maestro/scripts/compare-visual-regression.sh sync
```

This will:

1. Merge latest changes from the navigation PR
2. Rebuild and recapture screenshots
3. Regenerate diff images
4. Update the summary report

## Documenting for PR Review

Include in your PR description:

```markdown
## Visual Regression Analysis

Compared visual baselines before and after navigation migration.

### Summary

- **Total screens**: X
- **Unchanged**: Y
- **Changed**: Z

### Notable Changes

- [Screen Name]: Description of change and why it's expected

### Diff Images

[Attach or link to relevant diff images]
```

## Troubleshooting

### No Screenshots Captured

- Verify iOS Simulator is running with app installed
- Check Maestro can connect: `maestro hierarchy`
- Ensure flows exist in `.maestro/flows/`

### ImageMagick Errors

- Install with: `brew install imagemagick`
- Verify: `compare --version`

### Large Number of Changes

- Check if app state is consistent (logged in, same network)
- Verify baseline screenshots are from a clean state
- Consider re-generating baselines if they're outdated
14 changes: 14 additions & 0 deletions .maestro/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Ignore diff files generated during visual regression testing
baselines/diff/

# Visual regression comparison directories (generated locally)
after-nav/
diffs/
flows-temp/

# Ignore temporary test artifacts
*.tmp
*.log

# Ignore local test results (CI results are uploaded as artifacts)
test-results/
Loading
Loading