Reference
Pull request tools
You can use these three commands to work on a pull request or on rendered pages. Run them from your project folder with npx passback.
passback review-pr
Run npx passback review-pr <n> to post the open comments in .passback/inbox as one review on pull request <n>. It uses the GitHub CLI gh with the account you are already signed in with.
| Option | Value | What it does |
|---|---|---|
--repo |
owner/name |
Chooses the GitHub repository. Default: the repository detected by gh repo view. |
--root |
<dir> |
Sets the project folder whose .passback/inbox you read. Default: your current folder. |
--dry-run |
none | Prints the planned review as formatted JSON instead of posting it. If there are no open comments, prints no open marks to post. |
In a monorepo, comment file paths are relative to the Vite project root, while GitHub paths are relative to the repository root. If your Vite root is a subfolder, the paths do not match: those comments land in the review body instead of inline, and are never rejected for that mismatch.
gh installed and signed in to use review-pr.passback pr-check
Run npx passback pr-check --base base.json --head head.json to compare two snapshot files. You get a report of moved, resized, added and removed elements, layout findings in the head snapshot, and any failed assertions.
| Option | Value | What it does |
|---|---|---|
--base |
a snapshot file | Sets the base snapshot file. Required. |
--head |
a snapshot file | Sets the head snapshot file. Required. |
--assertions |
a folder | Checks the folder's JSON assertion files against head snapshots with matching viewport dimensions. You write these assertion files yourself; Passback does not generate them yet. |
--json |
none | Prints the result as JSON instead of the text report. |
Exit code 0 means there are no layout findings or failed assertions; changed elements alone do not fail the check. Exit code 1 means there are layout findings or failed assertions. Exit code 2 means an input file or assertions folder cannot be read, an input file is malformed, or the command arguments are invalid. An unexpected error exits with 1.
passback snapshot
Run npx passback snapshot --url http://localhost:5173 --routes /,/about --viewports 375,1280 --out head.json to write one JSON file of element rectangles for every route and viewport width you choose. Each viewport is 800 pixels tall; capture waits for fonts and disables animations and transitions.
| Option | Value | What it does |
|---|---|---|
--url |
a base URL | Sets the running site's base URL. Required. |
--routes |
comma-separated paths | Chooses routes, each starting with /, for example /,/about. Required. |
--viewports |
comma-separated widths | Chooses viewport widths in pixels as positive whole numbers, for example 375,1280. Required. |
--out |
a file path | Sets where you write the snapshot JSON file. Required. |
You need Playwright installed. If it cannot load Playwright, the command prints passback snapshot needs Playwright: npm i -D playwright and exits with code 2.