Migrate from Lost Pixel
MANUAL MIGRATION. Frontguard does not import hosted review history or automatically approve Lost Pixel snapshots.
Migrate pageShots and storybookShots from lostpixel.config.ts to Frontguard routes and Storybook discovery.
Scope
- Map page and Storybook captures to Frontguard routes.
- Configure viewports and thresholds explicitly.
- Review and accept new Frontguard baselines with frontguard update-baselines --confirm-baselines.
- Run both systems until your team accepts the new evidence and failure semantics.
Configuration mapping
| Lost Pixel (lostpixel.config.ts) | Frontguard (frontguard.config.ts) | Migration Notes |
|---|---|---|
pageShots: { pages: [{ path, name }], baseUrl } | baseUrl + routes: ["/login", "/pricing"] | Pass route strings or route objects with custom actions/thresholds. |
storybookShots: { storybookUrl } | storybook: { url: "http://localhost:6006" } | Queries Storybook /index.json and renders each story in an isolated iframe. |
threshold: 0.01 | threshold: 0.01 | Both tools use a 0–1 pixel ratio scale. Frontguard also computes SSIM and Chroma-SSIM. |
waitBeforeScreenshot: 500 | waitForStability: true | Replaces fixed sleep timers with multi-frame convergence polling. |
.lostpixel/baseline/ | frontguard-baselines orphan branch | Stored on an isolated git orphan branch rather than main working tree. |
Baseline migration
Start your application (and Storybook if configured), run frontguard update-baselines --confirm-baselines, inspect the generated captures, and push origin/frontguard-baselines.
Cutover
Once your pull-request workflow passes cleanly against frontguard-baselines, remove the legacy Lost Pixel workflow and .lostpixel baseline directory.
