Skip to content

Retake docs screenshots automatically and add 20 more - #321

Merged
wasimxyz merged 3 commits into
stagingfrom
docs/automated-screenshots
Oct 16, 2026
Merged

wasimxyz merged 3 commits into
stagingfrom
docs/automated-screenshots

Conversation

@wasimxyz

Copy link
Copy Markdown
Member

What this does

The docs site screenshots were taken by hand months ago. This replaces them with a script that retakes them, and adds 20 more.

  • make docs-screenshots seeds a separate local database, starts the web app on its own port, and saves each screen as a light and a dark WebP file in docs/site/public/images/.
  • A new workflow, .github/workflows/docs-screenshots.yml, runs it on the 1st of every month and opens or updates one pull request into staging. It can also be started from the Actions tab with Run workflow.
  • The list of screens is web/scripts/docs-screenshots/shots.ts. Each entry names the page, the clicks needed, and whether it is a full window or a close-up.

Screenshots

  • The 13 existing screenshots are retaken automatically.
  • 20 new ones are placed on 11 docs pages: tokens (list, create window, one-time reveal), instruments (Pending tab, edit window, retire window), watchers (list, detail), manual uploads, qPCR and Aunty run pages, integrations, feedback (send window, admin review, changelog), the MCP sign-in approval screen, the Comments page, the CSV preview, a deleted run, and the notification bell.
  • mcp.png (the Claude desktop app) cannot be captured by a script. It stays as it is and is listed under MANUAL_SHOTS with the date it was taken. The monthly pull request lists how old it is.
  • The token shown after creating a token is replaced with a placeholder before the screenshot is taken.

Docs site and README

  • The docs site draws a browser frame around full-window screenshots, with datahub.example.com/<page> in the address bar. Close-ups have no frame.
  • Each screenshot has a light and a dark image, and the site shows the one that matches the reader's theme. docs/site/src/lib/screenshots.generated.ts is written by the script and tells the site which images exist.
  • The README uses the docs images through <picture> tags, so GitHub shows the dark version to dark-mode readers. .github/images/ is removed.
  • The 13 old PNGs are removed and every page now points at .webp files.

Things to know

  • The script runs next dev, not a production build. The local file mirror that serves the gel images, PDFs, and plate maps is turned off in production builds, so a production run would show no reports.
  • It uses its own database (data_hub_screenshots) and its own file mirror under web/.docs-screenshots/, so it does not touch local data or a running make dev. It restores web/tsconfig.json, web/AGENTS.md, and web/next-env.d.ts, which next dev edits, and stops a leftover server from a crashed run.
  • The seed steps moved into web/scripts/seed-workspace.ts so db:seed and the screenshot run share them. db:seed behaves as before.
  • Dates in the images are the real dates, so every refresh rewrites every image. All 66 files are 6.4 MB together, so each merged refresh adds about that much to the repo.
  • If a screen fails, its old images stay. The pull request description lists the failures.
  • Pull requests opened with the built-in token do not start other workflows. That is fine here, because staging requires one review and no checks.
  • No changelog entry, because this only changes docs and CI.

Testing

  • Ran the whole script from a fresh database with a cold dev server cache. It exited cleanly and retook all 33 screens in both themes.
  • Looked at every light image and a spread of dark ones. Rendered the docs site and checked the frame, the light/dark switching, and the home page.
  • make check passes. Web unit tests pass (683).
  • Checked that a normal run and a run after a simulated crash both leave web/tsconfig.json and web/AGENTS.md unchanged.

After merging

The workflow has not run yet, because it only runs from the default branch. After this merges, start it once with Run workflow to confirm it opens a pull request.

wasimxyz and others added 2 commits October 15, 2026 12:05
Adds `make docs-screenshots`, which seeds a separate local database, starts the
web app on its own port, and saves each screen as a light and a dark WebP file
for the docs site. A monthly GitHub Actions job runs it and opens a pull request
into staging, and can also be started by hand.

- The script lives in `web/scripts/docs-screenshots/`. Its list of screens is
  `shots.ts`, and the Claude desktop app screenshot stays manual and is listed
  there with its date.
- The seed steps moved into `web/scripts/seed-workspace.ts` so `db:seed` and the
  screenshot run share them.
- The docs site draws a browser frame around full-window screenshots and shows
  the light or dark image to match the reader's theme.
- 20 new screenshots are placed on the pages for tokens, instruments, watchers,
  manual uploads, qPCR and Aunty runs, integrations, feedback, and MCP sign-in.
- The README now uses the docs images.

The image files themselves are not in this commit.

Co-authored-by: Cursor <cursoragent@cursor.com>
Adds the 33 screenshots as light and dark WebP files, and removes the hand-taken PNGs and the README copies they replace. The mcp.png screenshot stays.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
data-hub Ready Ready Preview Oct 16, 2026 5:00pm UTC
data-hub-docs Ready Ready Preview Oct 16, 2026 5:00pm UTC

Request Review

@wasimxyz wasimxyz self-assigned this Oct 16, 2026
Window shots are 800px tall instead of 900px, with the run pages, qPCR, Aunty, integrations, and sign-in screens each trimmed too. Close-ups keep their size. The title bar is about 6px shorter. All screenshots are retaken.

Co-authored-by: Cursor <cursoragent@cursor.com>
@wasimxyz
wasimxyz merged commit 8370aae into staging Oct 16, 2026
9 checks passed
@wasimxyz
wasimxyz deleted the docs/automated-screenshots branch October 16, 2026 17:02

This branch was successfully deployed

2 active deployments
Preview – data-hub-docs — a46f721f Deployed Oct 16, 2026 by vercel[bot]
Preview – data-hub — a46f721f Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant