relay: app-shot-light playbook (two light-mode screenshots of the installed app, GETs and headless Edge only, for the site's showcase card)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-06 22:21:05 +00:00
parent f7e2e2e43c
commit c60c012f8b

View file

@ -0,0 +1,17 @@
# Igneum playbook: two light-mode screenshots of the installed app (Overview, Cards) for the site's showcase card.
# Read-only: GETs the app's own URL and runs Edge headless, which renders prefers-color-scheme light by default.
# Never pauses, resumes or quits anything (the standing rule of 5 October 2026); the miners never notice.
# Queue: packaging/ota/publish-jobs.sh add --kind run --target 1ccfe586 --script relay/playbooks/app-shot-light.ps1 --title "app light-mode shots"
$ErrorActionPreference = 'Continue'
$urlFile = Join-Path $env:LOCALAPPDATA 'igneum\app\app.url'
if (-not (Test-Path $urlFile)) { Write-Host "ERROR: $urlFile missing (is the app running?)"; exit 2 }
$url = (Get-Content $urlFile -Raw).Trim()
$edge = @("$env:ProgramFiles (x86)\Microsoft\Edge\Application\msedge.exe", "$env:ProgramFiles\Microsoft\Edge\Application\msedge.exe") | Where-Object { Test-Path $_ } | Select-Object -First 1
if (-not $edge) { Write-Host "ERROR: Edge not found"; exit 2 }
$out = Join-Path $env:TEMP 'igneum-shots'; New-Item -ItemType Directory -Force -Path $out | Out-Null
foreach ($page in @('overview', 'cards')) {
$png = Join-Path $out "igneum-$page-light-1440.png"
& $edge --headless=new --disable-gpu --hide-scrollbars --window-size=1440,1000 --virtual-time-budget=6000 "--screenshot=$png" "$url?page=$page&visible=1" 2>$null | Out-Null
if (Test-Path $png) { Write-Host "RESULT shot=$page bytes=$((Get-Item $png).Length)"; & $env:RELAY_SEND -TaskId ([long]$env:RELAY_TASK_ID) -Title "app $page light" $png } else { Write-Host "RESULT shot=$page missing" }
}
exit 0