Repository navigation
Conversation
Adds a nextcloud-pr-screenshots agent skill with scripts that check the environment, seed a test user with neutral data, capture the shots a PR needs in parallel, combine them into one labeled image and post it to the PR description or a comment. The scripts are not tied to this app and work for any Nextcloud app or the server repo. The folder is excluded from the app package via .nextcloudignore. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Grigory V <scratchx@gmx.com>
| import { CACHE_DIR, importPlaywright, loadEnv, parseArgs, saveEnv } from './lib/env.mjs' | ||
| import { adminAuth, ocs } from './lib/http.mjs' | ||
|
|
||
| const PLAYWRIGHT_VERSION = '1.56.1' |
There was a problem hiding this comment.
I think we should either use a more up-to-date version or simply use the latest one when running the skill? 🤔 Don't know how this is typically being handled in skills
|
Claude Code review — 10 findings on commit 8144e86 🔴 Normal —
|
…ipts - Before/after shots no longer overwrite each other, and a run replaces all shots of its tag, so renamed or removed scenes don't linger - seed.mjs only uses an account it created and never resets passwords - post.mjs resolves the repo itself and no longer crashes after posting; comments are always new so reviewers are notified - Failing scenes and failing theme/language changes are reported without aborting the run - Shots scroll their target into view before cropping - Login problems fail fast with a clear message - Install the latest Playwright and its browser instead of pinning - Drop build-swap.mjs, the browser host mapping and --only - Make navigation and settings selectors independent of the UI language and keep library-dependent selectors in one place - Refresh Playwright monthly instead of keeping the first install forever - Require Node 22 for the scripts - Disable the first-run wizard through its API - Point coding agents to the skill in AGENTS.md Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Grigory V <scratchx@gmx.com>
fe868f5 to
4d6a7cb
Compare
|
@coderabbitai are all those scripts actually useful? can this be cleaned up? |
|
Tip For best results, initiate chat on the files or code changes. Analysis chain
I suggest:
Check seeding safety before use on an instance with real data. In The earlier review covered an older revision: You are interacting with an AI system. |

Adds an agent skill in
.skills/nextcloud-pr-screenshots/for taking screenshots of UI changes and putting them on a PR. It decides which shots a change needs (viewports, themes, loading/error states, long strings, before/after), takes them, combines them into one labeled image and posts it in a collapsible block in the PR description or a comment.Until now, the skill was only instructions, so every run rebuilt the same tooling: login, test data, waiting for the page, image layout. This version ships scripts for that:
preflight.mjschecks the instance, URLs, Node version, build and browser, and explains how to fix problemsseed.mjscreates a test user with neutral data (fixtures for contacts, files and calendar), using only the Nextcloud APIs, so it works on any instance and not only nextcloud-docker-devrun.mjsruns a short per-PR shot list: one login, scenes in parallel, light/dark without reloading, 2x close-ups, held or failing requests for loading and error states, and--tag before|afterfor before/after pairscompose.mjscombines the shots into one image, andpost.mjsadds or replaces it in the PR description or a commentNothing in it is specific to Contacts; it works for any app and for the server repo. I tested it on #5889 (8 shots in about 40 s, from preflight to finished image) and on the Files app using only the example template.
.skillsis excluded from the app package through.nextcloudignore.🤖 AI (if applicable)
Assisted by ClaudeCode:claude-opus-5-5