docs(screenshots): add a reusable toolkit to seed data and capture UI shots#6524
docs(screenshots): add a reusable toolkit to seed data and capture UI shots#6524otavio wants to merge 1 commit into
Conversation
|
Claude finished @otavio's task in 10m 11s —— View job Code Review CompleteReviewed 11 files across code quality, security, testing, language patterns, and architecture. 2 inline comments posted (1 medium, 1 low). Security review confirmed no hardcoded secrets, proper use of environment variables for credentials, and safe subprocess invocation ( To request another review round, comment |
Use fs.readFileSync/fs.rmSync instead of shelling out to cat/rm in the public-key seed, and log a warning when a shot's waitForText never appears instead of silently swallowing the timeout.
|
/review |
|
Claude finished @otavio's task in 5m 57s —— View job Code Review CompleteReviewed 11 files across code quality, security, testing, language patterns, and architecture — no issues found. Security review confirmed no hardcoded secrets, proper use of environment variables for credentials, and safe subprocess invocation ( To request another review round, comment |
df43c3e to
08e405c
Compare
… shots Adds ui/apps/docs/screenshots/, automation that seeds demo data and re-captures the dashboard screenshots used throughout the documentation. It drives a headless Chromium (playwright-core) against a local dev environment through the branded host shellhub.example.com so the UI rebrands itself with no backend change. seed.mjs does idempotent API seeding (devices, a public key, firewall rules, a web endpoint/tunnel); manifest.mjs and capture.mjs are the declarative shot list and runner. Enterprise screens are enabled entirely through .env.override environment variables consumed by the existing enterprise and cloud compose files, with no docker-compose.override.yml: the license is a single SHELLHUB_LICENSE_FILE var and GeoIP is disabled with an empty SHELLHUB_MAXMIND_MIRROR. Gated steps degrade gracefully on plain CE.
08e405c to
c7f95bc
Compare
|
/review |
|
Claude finished @otavio's task in 11m 53s —— View job Code Review CompleteReviewed 11 files across code quality, security, testing, language patterns, and architecture — no issues found. Security review confirmed no hardcoded secrets, proper use of environment variables for credentials, and safe subprocess invocation ( To request another review round, comment |
What
Adds
ui/apps/docs/screenshots/— a reusable toolkit that seeds demo dataand re-captures the dashboard screenshots used throughout the documentation.
Re-run it whenever the UI changes instead of hand-rebuilding shots.
It drives a headless Chromium (
playwright-core) against a local ShellHub devenvironment, browsing through the branded host
shellhub.example.comso theUI rebrands itself (SSHIDs, agent install command, etc.) with no backend change.
config.mjs/lib.mjs/auth.mjsseed.mjsmanifest.mjs/capture.mjs--ce-only,--only=)env.override.example/README.mdEnterprise setup is pure env-vars
Everything an enterprise capture needs is driven by
shellhub/.env.override(gitignored) and consumed by the existing enterprise/cloud compose files —
no
docker-compose.override.yml:SHELLHUB_ENTERPRISE/SHELLHUB_WEB_ENDPOINTS/SHELLHUB_DOMAIN— flags + brandingSHELLHUB_LICENSE_FILE— the license path, mounted via the env-driven mount added in shellhub-io/cloud#2409SHELLHUB_MAXMIND_MIRROR=(empty) — disables GeoIP (the cloud default mirror 404s for local dev and would otherwise FATAL the api at boot); geo data is unused by the screenshotsGated steps degrade gracefully on plain CE — a
402/404/405is logged as a skip,so
seed.mjsalso works against a Community Edition install.Security
The enterprise license is private. Nothing here references a real license path
— only the placeholder in
env.override.example..env.overrideand thelicense file are gitignored and never committed.
Verification
seed.mjsruns end-to-end against the consolidated env; the enterprisesteps succeed (firewall rules + web endpoint/tunnel created, not
402-skipped), confirming the license loads through.env.overridealone.disabled, license evaluator initialized, license persisted to Postgres.