Repository navigation
feat: automate landing page demo screenshots - #651
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
1 similar comment
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
083e4a9 to
e6c6b98
Compare
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
4807ae9 to
380af1e
Compare
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What & why
The landing-page hero (
components/home/Hero.tsx) shows four hand-made screenshots of the app (demo_light,demo_dark,demo_mobile_light,demo_mobile_dark). Keeping them current across desktop/mobile and light/dark on every UI change is a manual chore we keep falling behind on.This adds an automated pipeline that re-captures those four images from the live demo and opens a PR with the new ones, so the hero stays current without anyone shooting screenshots by hand.
Hero.tsxis untouched: the script overwrites the same four files in place.How it works
scripts/screenshots/config.ts— the variant matrix (desktop/mobile x light/dark), output-path resolver, and theme helper. Pure and unit-tested (config.test.ts, 6 tests).scripts/screenshots/capture.ts— a standalone Playwright script (run vianpx tsx, mirroringscripts/translate.ts). Logs into a dedicated demo account once, reuses the session, and captures each variant at 2x with a slight zoom, deterministic theme forcing, animations/caret disabled, and selector-based waits. It hard-fails on any error (including a failed login) so a broken capture never ships, and writes only the four target PNGs..github/workflows/update-screenshots.yml— runs weekly (and on manual dispatch), then opens a PR viapeter-evans/create-pull-requestscoped to exactly the four images for human review of the diff.No new dependencies (Playwright and
npx tsxare already used). Design and implementation notes live indocs/superpowers/.Maintainer setup required before the first real run
The capture machinery is complete and reviewed, but it has not been run against the live demo yet, so this PR changes no images. To activate it:
scripts/screenshots/README.md.capture.tsand the themelocalStoragekey inconfig.tsagainst the live demo (they are best-known defaults).DEMO_EMAIL/DEMO_PASSWORD/DEMO_CONVERSATION_ID, and the variableDEMO_BASE_URL(non-sensitive, defaults tohttps://chat.librechat.ai).pnpm screenshotslocally (or dispatch the workflow) to generate the first set.Testing
pnpm exec vitest run scripts/screenshots/config.test.ts— 6/6 passing.