This guide explains how to generate REAL screenshots from the actual Clauderon application for documentation.
- Build Clauderon:
cargo build --release - Install dependencies:
cd web/frontend && bun install - Install Playwright browsers:
cd web/frontend && bunx playwright install chromium
Generate SVG screenshots from the real clauderon binary:
# Make sure clauderon is built first
cargo build --release
# Generate CLI screenshots
./scripts/generate-cli-screenshots.shThis will create:
screenshots/cli/clauderon-help.svg- Main help outputscreenshots/cli/clauderon-version.svg- Version infoscreenshots/cli/clauderon-list.svg- Session listscreenshots/cli/clauderon-list-archived.svg- List with archived sessionsscreenshots/cli/clauderon-create-help.svg- Create command helpscreenshots/cli/clauderon-attach-help.svg- Attach command helpscreenshots/cli/clauderon-archive-help.svg- Archive command helpscreenshots/cli/clauderon-delete-help.svg- Delete command helpscreenshots/cli/clauderon-daemon-help.svg- Daemon command helpscreenshots/cli/clauderon-tui-help.svg- TUI command helpscreenshots/cli/clauderon-config.svg- Configuration outputscreenshots/cli/clauderon-reconcile-help.svg- Reconcile command helpscreenshots/cli/clauderon-clean-cache-help.svg- Clean cache command help
Note: These use the REAL clauderon binary output, not mock data.
Generate PNG screenshots from the real TUI using ratatui TestBackend:
# Run TUI screenshot tests (marked as ignored)
cargo test --test screenshot_tests -- --ignored --nocaptureThis will create:
screenshots/tui/session-list.png- Session list viewscreenshots/tui/create-dialog.png- Create dialogscreenshots/tui/help-screen.png- Help screenscreenshots/tui/empty-session-list.png- Empty statescreenshots/tui/delete-confirmation.png- Delete dialogscreenshots/tui/archive-confirmation.png- Archive confirmationscreenshots/tui/health-modal.png- Health status modalscreenshots/tui/session-list-filtered.png- Filtered session list
Note: These render the REAL TUI components using the actual App state.
Generate PNG screenshots from the real web application using Playwright:
Prerequisites:
-
Start Clauderon daemon (in terminal 1):
cargo run -- daemon
-
Start dev server (in terminal 2):
cd web/frontend export PATH="$HOME/.bun/bin:$PATH" bun run dev
Wait for it to say "ready" at http://localhost:5173
-
(Optional) Create some sessions for better screenshots:
# In terminal 3 cargo run -- create --repo ~/some-project --prompt "Example task"
-
Run screenshot tests (in terminal 3):
cd web/frontend export PATH="$HOME/.bun/bin:$PATH" bun run screenshots
This will create:
screenshots/web/login.png- Login page (1920x1080)screenshots/web/dashboard.png- Session dashboard (1920x1080)screenshots/web/create-dialog.png- Create session dialog (1920x1080)screenshots/web/session-detail.png- Session detail view (1920x1080)screenshots/web/session-filters.png- Session filters (1920x1080)screenshots/web/empty-state.png- Empty state (1920x1080)
Note: These screenshot the REAL React application, not mock HTML.
After generating all screenshots:
./scripts/update-docs-screenshots.shThis copies screenshots from screenshots/ to docs/src/assets/screenshots/.
Master script (requires manual server setup first):
# Terminal 1: Start daemon
cargo run -- daemon
# Terminal 2: Start web dev server
cd web/frontend && bun run dev
# Terminal 3: Generate all screenshots
./scripts/generate-all-screenshots.shCheck generated screenshots:
ls -lh screenshots/cli/
ls -lh screenshots/tui/
ls -lh screenshots/web/
ls -lh docs/src/assets/screenshots/Build docs to verify they render correctly:
cd docs
bun run build
bun run preview- ✅ All screenshots use REAL application data
- ✅ CLI screenshots: Real
clauderonbinary output - ✅ TUI screenshots: Real ratatui components via TestBackend
- ✅ Web screenshots: Real React app via Playwright
- ❌ No mock data or fake HTML pages
"clauderon binary not found":
- Run
cargo build --releasefirst
"Could not find create button":
- Make sure the dev server is actually running at http://localhost:5173
- Check that you're logged in (if WebAuthn is enabled)
TUI tests fail to compile:
- Make sure dev dependencies are installed:
cargo fetch - Check that
image,ab_glyph, andimageproccrates are in Cargo.toml
Web screenshots timeout:
- Ensure daemon is running:
cargo run -- daemon - Ensure dev server is running:
cd web/frontend && bun run dev - Check http://localhost:5173 loads in your browser