Skip to content

Demo that looks like a real array, and the README pictures from it - #29

Merged
firsttris merged 1 commit into
masterfrom
demo-showcase
Oct 9, 2026
Merged

firsttris merged 1 commit into
masterfrom
demo-showcase

Conversation

@firsttris

Copy link
Copy Markdown
Owner

So far the README and documentation pictures came from a hand-made state: 4 disks of 2–16 TB, last sync 10 hours ago, scrub at 64 %, schedules. The demo (./start.sh --demo) showed tiny KiB disks, the host's free space and no history.

Demo mode (SNAPRAID_DEMO=1, backend/src/demo.ts)

  • status: the real log of the sandbox, with the sizes, file counts and fragmentation of the demo disks and a scrub that keeps up (64 %, oldest block 17 days). Paths and content files stay as SnapRAID reports them, so the disk check works as before.
  • Disk usage (df) and the parity file's size: the same demo disks instead of the host's filesystem.
  • Disk profiles: the data disks get the profiles they already had for SMART. Parity gets its own 18 TB profile, so it is the largest disk.
  • Docker: three demo containers (immich, jellyfin, nextcloud) that can be paused and resumed, so the Automation page works without Docker.

Sandbox (dev/setup.sh, dev/seed-demo.ts)

  • "Media Array" with disk1–disk4 and parity1.
  • Real runs of sync, scrub, touch, sync, diff and status, with logs. seed-demo.ts moves the logs back in time: last sync 10 hours ago, scrub yesterday.
  • Two months of usage-history.json with disk3 filling up ("full in about 153 days").
  • Three schedules: nightly sync with touch and scrub, weekly scrub, SMART check.
  • maintenance.json with Docker pause and spindown.
  • DISKS_DIR=/mnt puts the disks at /mnt/disk1, as in the pictures. Safety: every sandbox disk carries a marker file. setup.sh refuses to touch a directory that is neither empty nor marked, so a real /mnt/disk1 is never removed or filled. I tested this with a directory holding foreign data.

Pictures

  • e2e/screenshots/readme.spec.ts with playwright.screenshots.config.ts and harness/demo-setup.ts: builds a fresh sandbox, the frontend, and the backend in demo mode behind the e2e proxy.
  • It takes 10 pictures: dashboard light, dark and phone, command palette, SMART, logs, schedules, notifications, automation, social preview.
  • Run it with npm run screenshots in e2e/.
  • Update screenshots (.github/workflows/screenshots.yml, started by hand) runs it in the Playwright image via firsttris/workflows (playwright-image, commit-changes) and commits what changed.
  • docs/screenshots/daemon.png stays hand-made: it needs two reachable snapraid-daemon instances.

Checked locally

  • deno check passes and all 125 backend tests pass, including new tests for the demo status, disk usage and Docker.
  • npm run typecheck in e2e/ passes, actionlint and shellcheck pass.
  • A full run from a fresh sandbox at /mnt: all 10 pictures, which match the current ones in structure. They are not part of this PR; the workflow takes them in the fixed image after the merge.
  • Docs: development (demo sandbox, new "Screenshots" section), configuration and architecture.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HPLSH4GpJHjeKdjRBDuN9s


Generated by Claude Code

The demo sandbox (./start.sh --demo) is now the array of the README pictures:
"Media Array" with four data disks and a parity disk, a few weeks of history
(dev/seed-demo.ts: job logs moved back in time, disk usage with one disk
filling up, three schedules, Docker pause and spindown). In demo mode the
backend also answers status, disk usage and the parity file's size with the
sizes of the demo disks, and Docker with three demo containers.

e2e/screenshots/readme.spec.ts takes the pictures from it (npm run screenshots
in e2e/), the workflow Update screenshots does that in the Playwright image and
commits what changed. dev/setup.sh only removes or fills disk directories that
carry its marker file, so DISKS_DIR=/mnt never touches a real disk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HPLSH4GpJHjeKdjRBDuN9s
@firsttris
firsttris merged commit 1b47ca3 into master Oct 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants