Repository navigation
docs: tutorial share step with before/after screenshots and a template PR body - #3367
Merged
Merged
Conversation
Collaborator
Author
|
Fresh review: clear, no actionable findings. Checked:
Nit, not blocking: the manual commands run |
janicduplessis
marked this pull request as ready for review
October 10, 2026 17:16
This was referenced Oct 10, 2026
This was referenced Oct 10, 2026
Merged
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.
Description
The tutorial's optional share step opened a thin pull request:
gh pr create --fillbuilt the body from the commit message, with one screenshot of the result and no before state. appandflow/stim-tutorial now ships a pull request template (one-line summary, before/after table, "How it was verified", Stim link) and anAGENTS.mdthat routes agents tostim guide tutorial(appandflow/stim-tutorial#2, #5). This moves the instructions for that pull request into the version-matched guide.Solution
stim guide tutorial runtells the agent, for each change, to screenshot the running app with agent-device before editing and again after Fast Refresh, same screen and device, into.expo/screenshots/..expo/is already ignored by the tutorial repo and is not an Expo fingerprint source, so the files never get committed, never change the native cache key, and never block a plainstim worktree remove. A/screenshots/.gitignoreentry was tried first and dropped: Expo's fingerprint hashes.gitignore.stim guide tutorial sharewrites the body from the repo template, filling "How it was verified" only with what the agent observed (ios.name, theapp reported readyline,lastBuilds.ios.durationMsandcacheHit,stim logs --errors). It opens the pull request with--body-fileplus two--attachflags. gh rewrites the matching./.expo/screenshots/*.pngreferences in the table to uploaded assets. When a before shot is missing, the agent shows the original screen withgit checkout origin/main -- <files>, captures it, and restores the change withgit checkout HEAD -- <files>; the change is already committed at that point. The fallback for a gh without--attachno longer commits a PNG with a relative link, which does not render in a pull request body: the user drags the images into the table instead.TutorialSteps.swiftis regenerated fromtutorial-data.ts.#3365 also edits
tutorial.ts,tutorial-data.tsand the generatedTutorialSteps.swift(restart, not share). The branches merge cleanly. Whichever merges second should rerunnode apps/desktop/scripts/generate-tokens.mjs.Test plan
~/.stim, own worktrees only): agent-device before/after shots and thegit checkout origin/mainfallback both captured the expected screens. A plainstim worktree removerefused only for unpushed commits, not for ignored screenshots.npx fingerprint fingerprint:generate --platform iosgave the same hash with and without.expo/screenshots/files.--attachrewrite confirmed on real pull requests: docs: agent instructions and a before/after PR template stim-tutorial#2 (./screenshots/) and fix(gc): reap orphaned sims that are shut down #5 (./.expo/screenshots/). Their bodies follow the template, and both table cells render the uploaded images with no duplicates appended.pnpm test packages/stim-cli/src/__tests__/guide.test.ts: 96 passed. The share contract test now also checks that the attached paths match the body's image references. format:check, lint, typecheck and knip pass. The fullpnpm testrun had timeouts in unrelated suites (doctor, web, monorepo-resolution) at load average 140-375; CI is the evidence there. Swift was not built locally because of that load; CI builds Desktop.Fixes #3362