Skip to content

docs(examples): add reproducible screenshots of the sample KBs#290

Merged
plind-junior merged 1 commit into
vouchdev:testfrom
dripsmvcp:docs/286-example-screenshots
Jun 30, 2026
Merged

docs(examples): add reproducible screenshots of the sample KBs#290
plind-junior merged 1 commit into
vouchdev:testfrom
dripsmvcp:docs/286-example-screenshots

Conversation

@dripsmvcp

Copy link
Copy Markdown
Contributor

Summary

  • the examples/ KBs were text-only — the READMEs told a reader to copy a
    fixture and run vouch status / search / show / audit without ever
    showing what those commands return. this adds screenshots rendered straight
    from the shipped fixtures so the examples carry their own weight.

What's here

  • docs/img/examples/render.py — a stdlib-only generator. copies a fixture
    to a throwaway .vouch, runs each documented command with colour disabled,
    normalises the one volatile token (the absolute KB path), and renders the
    output into a self-contained terminal-style SVG.
  • docs/img/examples/*.svgtiny/: status, search auth,
    show prop-001, audit. decision-log/: search free-tier and a
    supersession diff.
  • READMEs (examples/README.md, examples/tiny/, examples/decision-log/)
    embed the images next to the commands they show.
  • make examples-screenshots regenerates them.
  • tests/test_example_screenshots.py asserts the renderer is pure, escapes
    XML, and the committed SVGs are byte-identical to a fresh render.

Decisions / deviations from the issue

  • SVG instead of vhs/.tape. the issue suggested a .tape re-rendered
    with vhs, but vhs needs ttyd + ffmpeg. SVG needs only python + the
    vouch CLI, is text (so it diffs in PRs and re-renders byte-for-byte), and
    the test enforces that the committed images stay current — the same
    determinism goal, lighter deps.
  • audit-trail shot uses tiny/. the decision-log/ fixture on test
    ships claims only (no audit log), so the audit-trail capture uses tiny/
    (which has a full audit log) and the supersession capture uses
    decision-log/. no fixture is modified, per the issue's compatibility note.
  • web review-ui / desktop GUI captures are left as a follow-up — they need
    a browser/Electron runtime to capture deterministically, which is out of
    reach for a text-renderable, CI-checked generator.

Test Plan

  • Regression test added: tests/test_example_screenshots.py
  • pytest tests/ --ignore=tests/embeddings — green (rc=0)
  • ruff check src tests — clean
  • mypy src — clean
  • images re-render byte-for-byte (make examples-screenshots is idempotent)

Closes #286

the example KBs under examples/ were text-only: the READMEs told a reader
to copy a fixture and run vouch status / search / show / audit without
showing what those commands return. someone evaluating vouch on github
had to install it and load a fixture before seeing anything.

adds terminal screenshots rendered straight from the shipped fixtures:

* docs/img/examples/render.py — a stdlib-only generator. copies a fixture
  to a throwaway .vouch, runs each documented command with colour off,
  normalises the one volatile token (the absolute kb path), and renders
  the output to a self-contained terminal-style svg. svg is text, so it
  diffs cleanly in prs and re-renders byte-for-byte.
* docs/img/examples/*.svg — tiny/: status, search auth, show prop-001,
  audit. decision-log/: search free-tier and a supersession diff.
* examples/README.md, examples/tiny/README.md,
  examples/decision-log/README.md embed the images.
* make examples-screenshots regenerates them.
* tests/test_example_screenshots.py asserts the renderer is pure, escapes
  xml, and the committed svgs match a fresh render.

chose deterministic svg over the vhs/.tape path the issue suggested:
vhs needs ttyd + ffmpeg, while this needs only python + the vouch cli and
produces text-diffable output. the audit-trail shot uses tiny/ (the
fixture that ships an audit log) and the supersession shot uses
decision-log/; no fixture is modified. web review-ui and desktop gui
captures are left as a follow-up since they need a browser/electron
runtime to capture deterministically.

closes vouchdev#286
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d73dc976-514d-4061-b4c2-ab025e5f1b5b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added docs documentation, specs, examples, and repo guidance packaging packaging, build metadata, and make targets tests tests and fixtures size: S 50-199 changed non-doc lines labels Jun 30, 2026
@plind-junior plind-junior merged commit b2c9eeb into vouchdev:test Jun 30, 2026
15 checks passed
claytonlin1110 pushed a commit to claytonlin1110/vouch that referenced this pull request Jun 30, 2026
the examples/ fixtures gained rendered screenshots in vouchdev#290 but the
top-level readme never pointed at them. add a one-line nudge from the
30-second tour so a reader can see what the cli returns before installing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs documentation, specs, examples, and repo guidance packaging packaging, build metadata, and make targets size: S 50-199 changed non-doc lines tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants