Skip to main content

Help Center screenshots

Every image in the Help Center (frontend/public/help) is produced by one job, scripts/help-screenshots. Run it whenever a change alters a screen an article shows, and commit the new PNGs with the change.

./scripts/help-screenshots/run.sh # every shot
./scripts/help-screenshots/run.sh views- tags- # only shots whose name contains one of these
./scripts/help-screenshots/run.sh --list # list shots and personas

The first run creates a Playwright virtualenv in scripts/help-screenshots/.venv and downloads Chromium. It needs the backend virtualenv (backend/venv) and the frontend dependencies (frontend/node_modules) already installed.

What it does​

  1. Seeds a scratch database. seed.py builds a fresh SQLite database and media folders under scripts/help-screenshots/.scratch/ (git-ignored). It never touches a real database. The demo team is fictional: Northwind Adjusting, with Dana Reyes (team admin), three adjusters, a new user, and claim NW-20481, whose Living Room holds a real walkthrough video that was processed once. Its frames, item crops, transcript and 31 items are checked in under fixtures/living-room, so no AI runs.
  2. Boots the app locally. The backend runs with APP_ENV=local and the local auth bypass, signed in as the shot's persona. The frontend runs with next dev. Ports default to 8093 and 3093 (SHOTS_API_PORT, SHOTS_WEB_PORT). No API keys are passed through, so nothing reaches OpenRouter, Deepgram, Adjust Square or ContentsEstimation.
  3. Captures each shot with Playwright at 1440x900 and 2x scale, cropping to elements on the page, and writes the PNG straight into frontend/public/help.

Adding or changing a shot​

  • One function per image in shots/<topic>.py, registered with @shot("file-name.png"). The name must match the article's src exactly.
  • Crop with c.box(...) / c.capture(selector) around elements (prefer data-guide attributes) rather than fixed pixel boxes, so layout changes move the crop with them.
  • Pick a persona with @shot(..., persona="ned"):
    • dana is the default.
    • ava, ben and cara are adjusters.
    • ned is a new user.
    • ops is the only internal admin, used only for Logs and Admin pages, so customer-facing shots never show admin menu items.
    • switch_all, switch_some, switch_only and switch_off are four people with a pushed product access record, one per state of the product menu (seeds/product_access.py). They are not on the demo team and have no seeded user: a seed module may export PERSONAS = {key: email} for people like that, and the local sign-in creates them when a shot first runs as them. Their keys sort after ops on purpose, so the admin shots are taken before they exist.
  • Extra demo data for a topic goes in seeds/<topic>.py as async def seed(db, s). Give a topic a claim of its own where you can, so its data cannot shift another topic's shots. seeds/room_photos.py (claim NW-20547) is the model for ContentsCapture data: scoping photos as staged_photos, the uploads rows that say who captured them and when, and an import batch naming the specialist. It seeds no storage connection, which would change the Integrations shots.
  • A shot that changes data sets reseed=True.
  • Never seed a job in a processing status (pending, extracting, analyzing and so on): the backend's startup recovery requeues those and runs a real pipeline. Seed it paused (for example awaiting_confirmation), flip it in the scratch database inside the shot, then flip it back. job_state() in shots/uploads.py does this.
  • Photos used as illustrations (the filming tips) are listed in STATIC in shots/__init__.py and left alone.

backend/tests/test_help_screenshots.py keeps the job and the articles in step: it fails when an article references an image no shot produces, when a shot is unused, when a referenced image is missing, or when public/help holds an image no article uses.