ci: post screenshots on each merge request #509

Merged
project_1_bot_05dcee5cd59f879ab35191d664847a9d merged 1 commit from claude/issue-392-31957b into main 2026-10-13 14:24:03 +00:00
project_1_bot_05dcee5cd59f879ab35191d664847a9d commented 2026-10-13 12:00:11 +00:00 (Migrated from gitlab.core-project.space)

Summary

Brings back the screenshots review aid GitHub's preview.yml gave every pull request, as one merge request note. Lighthouse, also asked for in #392, was ported and then dropped: about 8 minutes of the single runner per merge request, and scores that swung on the shared CI box.

 review                      # deploys pr-<iid>
   review-e2e
+  review-screenshots        # e2e screenshots suite, production then review app → artifacts
+    review-notes            # only job with MR_NOTES_TOKEN (env scope mr-notes)
+      upsert <!-- chess-screenshots -->   images linked from job artifacts
  • Capture and posting are apart: the capture job runs the merge request's code and dependencies, so the token lives in a job that only reads the artifacts (expected names, PNG signatures, symlinks dropped).
  • MR_NOTES_TOKEN is scoped to the mr-notes environment, which only review-notes names (action: access, no deployment). Set up already: token mr-notes (Reporter, api), variable masked and unprotected.
  • A docs-only merge request starts both jobs and they exit at once, like the other preview jobs.
  • Rationale in infra/gitlab/DECISIONS.md, "Screenshots"; owner setup in infra/gitlab/vps/README.md.

Closes #392

Evidence

  • Before: no screenshots note on a GitLab merge request.
    After: this merge request's first pipeline posted the note with all 12 images (before and after, desktop and mobile, three pages); the links serve PNGs to a signed-in viewer.
  • Locally: mr-notes.sh --dry-run in the notes job's Alpine image; a non-PNG file and a symlink in the artifacts came out as n/a or were dropped. glab ci lint on the merged pipeline: valid. The five gate commands: green.

Merge Danger

Door: two-way

Revert the commits; the token and variable can stay or be deleted under Settings.

Blast Radius: pipeline-time

About 2.5 more minutes of the single runner per app merge request (capture 1 min 21 s, notes 1 min on the first pipeline). Both jobs allow_failure, so a broken capture, an expired token or an API error shows a warning, never blocks a merge.

## Summary Brings back the screenshots review aid GitHub's `preview.yml` gave every pull request, as one merge request note. Lighthouse, also asked for in #392, was ported and then dropped: about 8 minutes of the single runner per merge request, and scores that swung on the shared CI box. ```diff review # deploys pr-<iid> review-e2e + review-screenshots # e2e screenshots suite, production then review app → artifacts + review-notes # only job with MR_NOTES_TOKEN (env scope mr-notes) + upsert <!-- chess-screenshots --> images linked from job artifacts ``` - Capture and posting are apart: the capture job runs the merge request's code and dependencies, so the token lives in a job that only reads the artifacts (expected names, PNG signatures, symlinks dropped). - `MR_NOTES_TOKEN` is scoped to the `mr-notes` environment, which only `review-notes` names (`action: access`, no deployment). Set up already: token `mr-notes` (Reporter, `api`), variable masked and unprotected. - A docs-only merge request starts both jobs and they exit at once, like the other preview jobs. - Rationale in `infra/gitlab/DECISIONS.md`, "Screenshots"; owner setup in `infra/gitlab/vps/README.md`. Closes #392 ## Evidence - **Before:** no screenshots note on a GitLab merge request. **After:** this merge request's first pipeline posted the note with all 12 images (before and after, desktop and mobile, three pages); the links serve PNGs to a signed-in viewer. - Locally: `mr-notes.sh --dry-run` in the notes job's Alpine image; a non-PNG file and a symlink in the artifacts came out as `n/a` or were dropped. `glab ci lint` on the merged pipeline: valid. The five gate commands: green. ## Merge Danger **Door:** two-way Revert the commits; the token and variable can stay or be deleted under Settings. **Blast Radius:** pipeline-time About 2.5 more minutes of the single runner per app merge request (capture 1 min 21 s, notes 1 min on the first pipeline). Both jobs `allow_failure`, so a broken capture, an expired token or an API error shows a warning, never blocks a merge.
project_1_bot_a8dd9262857d850eef8dca5206e61de5 commented 2026-10-13 12:24:57 +00:00 (Migrated from gitlab.core-project.space)

Screenshots

Before is production, after is this merge request's review app at 0244467.

Desktop

Page Before After
Home
Local game
Room

Mobile

Page Before After
Home
Local game
Room
<!-- chess-screenshots --> ### Screenshots Before is production, after is this merge request's review app at 0244467. #### Desktop | Page | Before | After | | --- | --- | --- | | Home | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/387/artifacts/raw/review-screenshots/before/home-desktop.png" width="400"> | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/387/artifacts/raw/review-screenshots/after/home-desktop.png" width="400"> | | Local game | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/387/artifacts/raw/review-screenshots/before/local-desktop.png" width="400"> | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/387/artifacts/raw/review-screenshots/after/local-desktop.png" width="400"> | | Room | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/387/artifacts/raw/review-screenshots/before/room-desktop.png" width="400"> | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/387/artifacts/raw/review-screenshots/after/room-desktop.png" width="400"> | #### Mobile | Page | Before | After | | --- | --- | --- | | Home | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/387/artifacts/raw/review-screenshots/before/home-mobile.png" width="200"> | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/387/artifacts/raw/review-screenshots/after/home-mobile.png" width="200"> | | Local game | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/387/artifacts/raw/review-screenshots/before/local-mobile.png" width="200"> | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/387/artifacts/raw/review-screenshots/after/local-mobile.png" width="200"> | | Room | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/387/artifacts/raw/review-screenshots/before/room-mobile.png" width="200"> | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/387/artifacts/raw/review-screenshots/after/room-mobile.png" width="200"> |
project_1_bot_a8dd9262857d850eef8dca5206e61de5 commented 2026-10-13 12:24:59 +00:00 (Migrated from gitlab.core-project.space)

Lighthouse

Before is production, after is this merge request's review app at 948e96c, each the median of 3 runs. Full reports are in the job's artifacts.

Mobile

Page Performance Accessibility Best practices SEO
Home 97 → 96 (-1) 100 100 100
Local game 91 → 93 (+2) 100 100 100

Desktop

Page Performance Accessibility Best practices SEO
Home 100 100 100 100
Local game 100 → 71 (-29) 100 100 100
<!-- chess-lighthouse --> ### Lighthouse Before is production, after is this merge request's review app at 948e96c, each the median of 3 runs. Full reports are in the [job's artifacts](https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/119/artifacts/browse/review-lighthouse). #### Mobile | Page | Performance | Accessibility | Best practices | SEO | | --- | --- | --- | --- | --- | | Home | 97 → **96** (-1) | 100 | 100 | 100 | | Local game | 91 → **93** (+2) | 100 | 100 | 100 | #### Desktop | Page | Performance | Accessibility | Best practices | SEO | | --- | --- | --- | --- | --- | | Home | 100 | 100 | 100 | 100 | | Local game | 100 → **71** (-29) | 100 | 100 | 100 |
project_1_bot_05dcee5cd59f879ab35191d664847a9d commented 2026-10-13 12:26:09 +00:00 (Migrated from gitlab.core-project.space)

added 1 commit

  • 1eadc8d3 - docs(ci): record how long the Lighthouse job takes on the CI VPS

Compare with previous version

added 1 commit <ul><li>1eadc8d3 - docs(ci): record how long the Lighthouse job takes on the CI VPS</li></ul> [Compare with previous version](/amaurycoudr/chess-project/-/merge_requests/9/diffs?diff_id=41&start_sha=948e96c09d0efa87d0a579867c8a42359c2370b1)
project_1_bot_05dcee5cd59f879ab35191d664847a9d commented 2026-10-13 12:26:16 +00:00 (Migrated from gitlab.core-project.space)

changed the description

changed the description
project_1_bot_05dcee5cd59f879ab35191d664847a9d commented 2026-10-13 12:49:51 +00:00 (Migrated from gitlab.core-project.space)

changed title from ci: post screenshots and Lighthouse scores on each merge request to ci: post screenshots on each merge request

<p>changed title from <code class="idiff">ci: post screenshots <span class="idiff left right deletion">and Lighthouse scores </span>on each merge request</code> to <code class="idiff">ci: post screenshots on each merge request</code></p>
project_1_bot_05dcee5cd59f879ab35191d664847a9d commented 2026-10-13 12:49:52 +00:00 (Migrated from gitlab.core-project.space)

changed the description

changed the description
project_1_bot_05dcee5cd59f879ab35191d664847a9d commented 2026-10-13 12:50:12 +00:00 (Migrated from gitlab.core-project.space)

added 1 commit

  • 1a41a2cc - ci: drop the Lighthouse job from merge request pipelines

Compare with previous version

added 1 commit <ul><li>1a41a2cc - ci: drop the Lighthouse job from merge request pipelines</li></ul> [Compare with previous version](/amaurycoudr/chess-project/-/merge_requests/9/diffs?diff_id=62&start_sha=1eadc8d31737a9bf0e770a45382ee016e3fd9304)
root commented 2026-10-13 14:13:08 +00:00 (Migrated from gitlab.core-project.space)

added 52 commits

  • 1a41a2cc...fc5f6597 - 51 commits from branch main
  • 02444676 - ci: post screenshots on each merge request

Compare with previous version

added 52 commits <ul><li>1a41a2cc...fc5f6597 - 51 commits from branch <code>main</code></li><li>02444676 - ci: post screenshots on each merge request</li></ul> [Compare with previous version](/amaurycoudr/chess-project/-/merge_requests/9/diffs?diff_id=73&start_sha=1a41a2ccadeb88a31d2c8f45c280952d07f9a2c2)
root (Migrated from gitlab.core-project.space) merged commit into main 2026-10-13 14:24:03 +00:00
Sign in to join this conversation.
No description provided.