Skip to main content
JUMP TO:Quick StartCLI CommandsConfigurationPlaywright APIMCP ServerGitHub Actions
Guides / Migrate from Lost Pixel(23 of 37)

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.

Local-First Privacy Boundary and Lost Pixel Migration Workflow
FIG 01 · MIGRATION MATRIX — PAGE & STORYBOOK ROUTES, VIEWPORTS & EXPLICIT BASELINE ACCEPTANCE

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.01threshold: 0.01Both tools use a 0–1 pixel ratio scale. Frontguard also computes SSIM and Chroma-SSIM.
waitBeforeScreenshot: 500waitForStability: trueReplaces fixed sleep timers with multi-frame convergence polling.
.lostpixel/baseline/frontguard-baselines orphan branchStored on an isolated git orphan branch rather than main working tree.
frontguard.config.ts: equivalent page + Storybook setup
export default {
  version: 1,
  baseUrl: 'http://localhost:3000',
  routes: ['/', '/pricing', '/login'],
  storybook: {
    url: 'http://localhost:6006',
  },
  viewports: [375, 1440],
  threshold: 0.01,
  waitForStability: true,
}

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.