Skip to content

Commit e88dee5

Browse files
nedtwiggclaude
andcommitted
Render and upload every pushed commit's stories in CI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent c80826e commit e88dee5

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

‎.github/workflows/selfie.yml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Renders every story of every pushed commit, and uploads the batch to hackathon.selfie.dev,
2+
# which gives the commit a `selfie` status. See specs/ui/storybook.md -> Selfie.
3+
name: Selfie
4+
on:
5+
push:
6+
branches: ["**"]
7+
jobs:
8+
selfie:
9+
# arm64, so the images match Selfie's pinned environment.
10+
runs-on: ubuntu-24.04-arm
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
# What a commit reaches is what its approvals come from, so this needs all of its history.
15+
fetch-depth: 0
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 26
19+
- uses: oven-sh/setup-bun@v2
20+
- run: bun install --frozen-lockfile
21+
# Pinned to the commit the server at hackathon.selfie.dev was deployed from.
22+
- uses: diffplug/selfie-hackathon/.github/actions/selfie@33fdf999b97004773b800054eae5ba8213f3a08b
23+
with:
24+
upload-token: ${{ secrets.SELFIE_UPLOAD_TOKEN }}

‎specs/ui/storybook.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ An agent's loop, after changing a component:
3030
2. Look at the diff images. A change nobody asked for is a bug to fix, not to approve.
3131
3. Leave approving to a person, in `bun run selfie ui`, unless they've said to approve.
3232

33+
In CI, `.github/workflows/selfie.yml` renders every pushed commit and uploads its batch to [hackathon.selfie.dev](https://hackathon.selfie.dev/diffplug/pridm), which gives the commit a `selfie` status: green if every story matches what's approved, yellow if a change is waiting for approval, and red if a story failed or a change was rejected. Approve there, then `SELFIE_REMOTE=https://hackathon.selfie.dev bun run selfie pull` to bring the approvals here.
34+
3335
A person's loop is the same in `bun run selfie ui`, which renders when asked. Notes written there on an image reach an agent through `bun run selfie agent-await-feedback`.
3436

3537
Every story must render the same image every time. If a review shows a change with no change to the code, or `bun run selfie flakes --build --times 5` lists anything, follow `bun run selfie skill fix-flakes`. Anything Monaco draws is marked `data-diff-pending` until it's done, and each story file's `play: waitForDiffs` waits for that, since Selfie screenshots once a story's play function finishes.

0 commit comments

Comments
 (0)