From c321b7e9946a1e422f6ed011816b5e9b1b75f9e3 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 15 Mar 2026 14:24:33 +0000 Subject: [PATCH 1/3] feat: integrate git-glimpse for automated PR demo generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds GitGlimpse GitHub Action to automatically record and post visual demo GIFs of UI changes on pull requests. Includes: - .github/workflows/git-glimpse.yml: main pipeline triggered on PR push or /glimpse comment; installs deps, records demo, posts to PR - .github/workflows/git-glimpse-ack.yml: fast acknowledgment workflow that reacts with 👀 emoji when /glimpse is triggered - git-glimpse.config.ts: project config pointing to Vite dev server at http://localhost:5173/epp-demo/ Requires ANTHROPIC_API_KEY secret set in repository settings. https://claude.ai/code/session_01L74tc3msNfg2KcEuUef4Wf --- .github/workflows/git-glimpse-ack.yml | 21 ++++++++++ .github/workflows/git-glimpse.yml | 59 +++++++++++++++++++++++++++ git-glimpse.config.ts | 13 ++++++ 3 files changed, 93 insertions(+) create mode 100644 .github/workflows/git-glimpse-ack.yml create mode 100644 .github/workflows/git-glimpse.yml create mode 100644 git-glimpse.config.ts diff --git a/.github/workflows/git-glimpse-ack.yml b/.github/workflows/git-glimpse-ack.yml new file mode 100644 index 0000000..3ce7495 --- /dev/null +++ b/.github/workflows/git-glimpse-ack.yml @@ -0,0 +1,21 @@ +name: GitGlimpse Acknowledge + +on: + issue_comment: + types: [created] + +jobs: + ack: + if: >- + github.event.issue.pull_request != null && + contains(github.event.comment.body, '/glimpse') + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: React with eyes + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh api repos/$GITHUB_REPOSITORY/issues/comments/${{ github.event.comment.id }}/reactions \ + --method POST --field content=eyes || true diff --git a/.github/workflows/git-glimpse.yml b/.github/workflows/git-glimpse.yml new file mode 100644 index 0000000..1e9e457 --- /dev/null +++ b/.github/workflows/git-glimpse.yml @@ -0,0 +1,59 @@ +name: GitGlimpse + +on: + pull_request: + types: [opened, synchronize] + issue_comment: + types: [created] + +jobs: + demo: + runs-on: ubuntu-latest + if: >- + github.event_name == 'pull_request' || + (github.event_name == 'issue_comment' && + github.event.issue.pull_request != null && + contains(github.event.comment.body, '/glimpse')) + permissions: + pull-requests: write + contents: write + issues: write + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || '' }} + + - uses: actions/setup-node@v4 + with: + node-version: '20' + + - run: npm ci + + - name: Install FFmpeg + run: sudo apt-get install -y ffmpeg + + - name: Install Playwright Chromium + run: npx playwright install chromium --with-deps + + - uses: DeDuckProject/git-glimpse@v1 + env: + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: React with hooray on success + if: github.event_name == 'issue_comment' && success() + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh api repos/$GITHUB_REPOSITORY/issues/comments/${{ github.event.comment.id }}/reactions \ + --method POST --field content=hooray || true + + - name: React with confused on failure + if: github.event_name == 'issue_comment' && failure() + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh api repos/$GITHUB_REPOSITORY/issues/comments/${{ github.event.comment.id }}/reactions \ + --method POST --field content=confused || true diff --git a/git-glimpse.config.ts b/git-glimpse.config.ts new file mode 100644 index 0000000..eb78040 --- /dev/null +++ b/git-glimpse.config.ts @@ -0,0 +1,13 @@ +import type { GitGlimpseConfig } from '@git-glimpse/core'; + +export default { + app: { + startCommand: 'npm run dev', + readyWhen: { url: 'http://localhost:5173/epp-demo/' }, + }, + recording: { + format: 'gif', + maxDuration: 30, + viewport: { width: 1280, height: 720 }, + }, +} satisfies GitGlimpseConfig; From afacd24dd83accdcb34854b5030ee8141e24ba24 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 15 Mar 2026 14:39:27 +0000 Subject: [PATCH 2/3] chore: explicitly set git-glimpse trigger mode to auto https://claude.ai/code/session_01L74tc3msNfg2KcEuUef4Wf --- git-glimpse.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-glimpse.config.ts b/git-glimpse.config.ts index eb78040..1f6922f 100644 --- a/git-glimpse.config.ts +++ b/git-glimpse.config.ts @@ -5,6 +5,9 @@ export default { startCommand: 'npm run dev', readyWhen: { url: 'http://localhost:5173/epp-demo/' }, }, + trigger: { + mode: 'auto', + }, recording: { format: 'gif', maxDuration: 30, From ddfc04e525c81dfe4ae2e1917504298e4e3557aa Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 15 Mar 2026 14:44:42 +0000 Subject: [PATCH 3/3] Revert "chore: explicitly set git-glimpse trigger mode to auto" This reverts commit afacd24dd83accdcb34854b5030ee8141e24ba24. --- git-glimpse.config.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/git-glimpse.config.ts b/git-glimpse.config.ts index 1f6922f..eb78040 100644 --- a/git-glimpse.config.ts +++ b/git-glimpse.config.ts @@ -5,9 +5,6 @@ export default { startCommand: 'npm run dev', readyWhen: { url: 'http://localhost:5173/epp-demo/' }, }, - trigger: { - mode: 'auto', - }, recording: { format: 'gif', maxDuration: 30,