chadtmiller.com/knotless
git that lives in your Atmosphere account
just ios-look draws the iOS app's screens in any state
MergedThis adds just ios-look. It has a debug-only recorded-answers client, a UI test that drives the simulator, and ios/look.mjs to plan the runs. It also fixes the "1 followers" text and the dark-mode reaction background. The DEBUG gating looks right: release builds get constant nil for now and scheme, and recording isn't compiled in. I read the diff but couldn't run it, since it needs Xcode.
One real flaw: look.mjs never clears old pictures from target/look. A --top run, or one that scrolls less than before, will print the earlier run's -2, -3 files as if they were new. See the comment below. It's small, and the pull's next step is comparing before and after, so I'd fix it soon.
Minor: custom routes are named from the route cut to 40 characters, so two long routes could share a name and the startsWith listing could mix their pictures.
ios/look.mjsline 232Outdated
} | |
for (const r of runs) { | |
const base = r.out.split('/').pop() | |
for (const file of readdirSync(out).filter((f) => f.startsWith(base) && f.endsWith('.png')).sort()) console.log(join(out, file)) |
This lists every png in target/look that starts with the run's name, but nothing deletes earlier runs' pictures. Only .ios is cleared at line 186. After a full scroll of a screen, a later --top run, or a run that scrolls less, lists the stale -2, -3 files as part of this run. Before the test runs, remove the ios-<name>-<scheme>*.png files for each run in the plan.
The stale-pictures problem from my last round is fixed. ios/look.mjs now has one picturesOf helper. It matches exactly <run>.png or <run>-<n>.png, with the run name regex-escaped. Each run's old pictures are deleted before the test runs, and the same helper builds the printed list. Because the match is exact, the 40-character route-name overlap I noted also stops mixing pictures from different runs. rmSync and readdirSync are both imported. The other changes in the range (the webcredentials entry in the app-site association, its test and doc line, and the deploy repo list) came in with the base merge. I didn't look at them closely, and they aren't part of this pull's feature. I couldn't run any of this, since it needs Xcode.
Carried forward: the change this pull makes at 51c43126d0aa7d8f75438a28675630a1a8aa159f is the one reviewed at 53118df040d729878d464781e90b4d8b3c0d2e4f, so that review stands. What is new comes from its base.
8 passed, 2 skipped
- just ios-look draws the iOS app's screens in any state
- main
What changes
just ios-look <screen>draws a screen of the iOS app in the simulator, light and dark, as pictures intarget/look, with no server and no account. Asjust lookdoes for the pages,--set getMergeStatus.state=conflictingchanges an answer, and--tapand--typereach a state behind a touch. Without--topit scrolls and shoots all of the screen.A debug build answers from a file when it is told to (
KNOTLESS_ANSWERS). The file isharness/shots/fixtures.json, with what that lacks fromios/look-answers.json: the signed-in viewer, the inbox, whether a pull merges and a diff's rows. None of this is in a release build. Answers made up or changed are held to their lexicons whennpm cihas been run inharness/.Two small fixes it found: the profile said "1 followers", and the reaction button lost its background in dark mode.
Why
Layout bugs in the app have only been seen once they reached a phone. This shows them before a push, from the same world as the web's shots, and pins the clock, status bar and relative times so pictures read alike between runs. Stable enough to compare is the next question, for a before and after like
just shots-check, and this is how to find out.It needs Xcode, so it is a tool to run on a Mac and not a check. Nothing makes anyone run it.
How it was tested
Every screen drawn, light, and looked at. On
pull-open: a conflict and a blocked review through--set, expanding a row with--tap, and typing into the composer with--tapand--type. Dark mode onprofileandpull-merged. A--setof a value the lexicon only suggests isn't refused, as a known value isn't enforced.🤖 Generated with Claude Code