Add README and automate framed screenshots#2
Open
filiptronicek wants to merge 2 commits intomainfrom
Open
Conversation
Adds a README with build/test/regenerate instructions and a screenshots table sourced from docs/screenshots/. Extends the Screenshots workflow to install viticci/frames-cli, frame the iPhone 16 Pro captures into docs/screenshots/, gate spurious diffs with an imagehash perceptual hash check (Hamming distance \u2264 5 on a 16x16 pHash), and commit any genuine UI changes back to main. Closes #1. Co-authored-by: Ona <no-reply@ona.com>
frames-cli refuses to run without its asset pack and 'frames setup' is interactive. Download AppleFrames40.zip directly, cache it, and point FRAMES_ASSETS at the extracted directory so the framing step works headlessly in CI. Co-authored-by: Ona <no-reply@ona.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1.
Summary
README.mdwith project overview, build/test instructions, and a Screenshots table sourced fromdocs/screenshots/..github/workflows/screenshots.ymlso that, after fastlane snapshot runs, the iPhone 16 Pro captures are framed withviticci/frames-cliand committed back tomainwhenever the UI actually changes.How the screenshot pipeline works
fastlane snapshotruns the existing UI test on iPhone 16 Pro Max, iPhone 16 Pro and iPad Pro 13.docs/screenshots/*_framed.png.hash_size=16) of each freshly framed PNG and the same path atHEAD(viaimagehash). When the Hamming distance is ≤ 5, the new bytes are replaced with the committed bytes — so simulator/encoder noise can't trigger a "screenshot refresh" commit.git add -A docs/screenshotsthen either commits genuine UI changes (and deletions, if asnapshot()call is removed) back to the branch, or no-ops.The threshold and hash size are exposed as workflow env vars (
SCREENSHOT_PHASH_THRESHOLD,SCREENSHOT_PHASH_SIZE) for easy tuning.Things to verify on first green run
mainallowsgithub-actions[bot]pushes (otherwise the auto-commit step will fail and we should switch to a PR-based flow).5is the right pHash threshold — the per-fileKEEP/CHANGE/NEWlog lines will tell us whether to tighten or loosen it.docs/screenshots/after the workflow runs once onmain; until then the README image links 404 by design.Devices in the README
iPhone 16 Pro only, per discussion. The iPhone 16 Pro Max and iPad Pro 13 captures are still produced by the test (they're needed for App Store Connect) and uploaded as workflow artifacts, just not surfaced in the README.