Repository navigation
Conversation
A pull request that touches Live Activity code now gets a comment with each affected style rendered on an iPhone 17 Pro simulator (iOS 27) before and after the change: Lock Screen, minimized Dynamic Island, expanded Dynamic Island, stacked as one 1206x1222 image per style. "Live Activity previews" (pull_request, read-only, xcode-27 runner): - affected-styles.mjs picks the styles: a changed style file plus every style that reuses it (found by scanning for `standard.`/`approval.` references), or all styles when shared widget code, contracts, the expo-widgets patch or this tooling changes. - build-app.sh builds the debug app for the simulator with ad-hoc signing, which keeps the widget extension's App Group without an Apple account. - run.sh swaps apps/expo/src/widgets and packages/contracts/src to the base commit, captures "before" through Metro, restores the PR's code and captures "after", all on one native build. - capture.sh is the existing capture-la.sh flow with frames read from serve-sim's MJPEG stream by frame.py (Pillow, since the runner has no ffmpeg). open-url.sh and tap-label.sh accept a fresh simulator's 'Open in "Hark"?' and "Allow Live Activities" prompts. - The debug build sometimes crashes on launch (expo-notifications NotificationCenterManager.addDelegate, ExpoFabricView assertion); run.sh relaunches when the app process disappears. - serve-sim is built from Ryan's fork at a pinned commit: npm's 0.1.48 has no `state` command and sends touches to the target Xcode 27 ignores. "Live Activity previews comment" (workflow_run, write access, default branch only) never runs PR code: it checks that the PR's head is the captured commit, copies only validated PNGs to the live-activity-preview-images branch and updates one marked comment. Verified locally as CI would run it: fresh worktree, pnpm install, build-app.sh (BUILD SUCCEEDED, ~4 min on this Mac), a new simulator from setup-sim.sh, then run.sh for approval+standard and for verdict against a812cab~1. Outputs were 1206x1222 before/after pairs showing the expected changes; comment.mjs rendered the table. affected-styles.mjs on b05c813, a812cab, 758a2d0 and db73330 gave all, the four approval styles, all, and none. shellcheck is clean; actionlint only flags the new xcode-27 label. The workflows themselves have not run on GitHub yet.
The first run on the xcode-27 runner built the app but `simctl create` for the iPhone 17 Pro failed with "Incompatible device" on the runner's newest iOS runtime. setup-sim.sh now falls back to the iPhone 18 Pro, which has the same 1206x2622 screen the crops assume and is preinstalled on the image, and logs the runtime, the device type it used, and the device types when neither works. The failure surfaced only in the next step as `Invalid device: ` because `echo "udid=$(setup-sim.sh | tail -1)"` swallowed the script's exit status. Both workflows now run steps with `shell: bash` (-eo pipefail) and the build and boot steps assign the script output before writing it, failing on an empty UDID. Verified: an iPhone 18 Pro simulator here captures 1206x2622 frames; shellcheck is clean and actionlint only flags the xcode-27 label.
The second run picked the newest runtime, iOS 27.1, which the runner's default Xcode 27.0 can't create devices on, so both the iPhone 17 Pro and the 18 Pro fallback failed. setup-sim.sh now tries the runtime matching `xcrun --sdk iphonesimulator --show-sdk-version` first, then the others newest first, each with both device types. Verified locally: SDK 27.0 orders iOS-27-0 before iOS-26-5 and creates an iPhone 17 Pro; shellcheck is clean.
This branch has not been deployed
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.
Adds a workflow that renders every Live Activity style a PR touches on an iPhone 17 Pro simulator (iOS 27), before and after the change, and posts them as one comment: Lock Screen, minimized Dynamic Island and expanded Dynamic Island per style.
How it works
Live Activity previewsruns on PRs that touchapps/expo/src/widgets/**, contracts, the expo-widgets patch or this tooling, on thexcode-27runner with read-only permissions. It picks the affected styles (a changed style plus every style that reuses it), builds the debug app with ad-hoc signing, captures "before" on the base commit's widget code and "after" on the PR's, and uploads the PNGs.Live Activity previews commentruns frommainwith write access and never executes PR code. It checks the PR's head matches the captured commit, stores validated PNGs on thelive-activity-preview-imagesbranch and updates one comment per PR.R44VC0RP/serve-simat a pinned commit (hark-ci): the npm release lacks thestatecommand and the Xcode 27 touch routing the long-press needs.Testing
Verified locally as CI would run it (fresh worktree,
build-app.sh, new simulator,run.shfor approval, standard and verdict). This PR changes the tooling, so it should capture all nine styles as its first real run. The comment step only starts working once this is merged, becauseworkflow_runworkflows run from the default branch; until then the images are in the run'slive-activity-previewsartifact.Known
The debug build sometimes crashes on launch (expo-notifications
NotificationCenterManager.addDelegate, anExpoFabricViewassertion).run.shrelaunches when the app process disappears.