Skip to content

docs(demos) Record every CLI command - #560

Open
tony wants to merge 13 commits into
masterfrom
screen-recording-2026-07-12
Open

tony wants to merge 13 commits into
masterfrom
screen-recording-2026-07-12

Conversation

@tony

@tony tony commented Jul 12, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Record all twelve top-level commands plus list --tree and fmt --style as VHS GIF/MP4/WebM tapes and asciinema casts with agg GIFs.
  • Show each command being typed before its real output, union-crop each embedded agg GIF to its content with a 10px sampled-background margin, and stamp Sphinx demo images with intrinsic width and aspect-ratio.
  • Embed the sync demo in the README and all fourteen in their matching CLI documentation sections, while excluding raw demo sources from Sphinx's static copy.
  • Remove the legacy homepage GIF and rebuild published docs when agg GIFs change.

Verification

  • uv run ruff format --check . — clean
  • uv run ruff check . --fix --show-fixes — clean
  • uv run ty check --error-on-warning . — clean
  • just build-docs — clean from-scratch build; all fourteen GIFs copied
  • Media validation — all casts exit successfully, commands are present, final margins are preserved, VHS dimensions match their tapes, and the privacy scan is empty

@codecov

codecov Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.25%. Comparing base (8419df6) to head (08d45b4).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #560   +/-   ##
=======================================
  Coverage   85.25%   85.25%           
=======================================
  Files          38       38           
  Lines        7663     7663           
  Branches     1567     1567           
=======================================
  Hits         6533     6533           
  Misses        751      751           
  Partials      379      379           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tony
tony force-pushed the screen-recording-2026-07-12 branch from d0032dc to ca50fc2 Compare July 12, 2026 15:47
@tony
tony force-pushed the screen-recording-2026-07-12 branch from 02cfe13 to b88dc06 Compare July 15, 2026 00:39
@tony
tony force-pushed the screen-recording-2026-07-12 branch from b88dc06 to 5881194 Compare July 15, 2026 00:56
@tony
tony force-pushed the screen-recording-2026-07-12 branch from 5881194 to 78ba652 Compare July 17, 2026 23:33
@tony tony mentioned this pull request Nov 28, 2026
24 of 37 tasks
@tony
tony force-pushed the screen-recording-2026-07-12 branch from 78ba652 to b09d48a Compare November 29, 2026 00:39
@tony
tony force-pushed the screen-recording-2026-07-12 branch from b09d48a to 22037f2 Compare November 29, 2026 21:41
@tony tony added the do not merge Do not merge into trunk label Nov 29, 2026
@tony
tony force-pushed the screen-recording-2026-07-12 branch from 22037f2 to 4cac72a Compare December 5, 2026 15:04
tony added 5 commits December 5, 2026 20:00
why: Every demo must record against a stable ~/code layout rather than a
developer's real home, so the paths captured on screen are reproducible
and free of personal directories.

what:
- Add setup-sandbox.sh, which builds the config and repositories each
  recording drives against, so any cast or tape can be re-rendered from
  a clean machine
why: Nine of the ten subcommands had no recorded session at all; the
casts are the text-based source that the animated GIFs render from, so
they belong under version control on their own.

what:
- Add asciinema .cast recordings for every subcommand, plus list --tree,
  each captured against the sandbox so recorded paths read as ~/code/...
why: The tapes are the declarative source that renders the GIF/MP4/WebM
trio; sizing each to the rows its command actually occupies keeps demos
from clipping output or trailing dead space.

what:
- Add a .tape per subcommand, each sized to its command's output and
  pointed at the sandbox, so the renders regenerate deterministically
why: GIF is the format embedded inline in the README and docs index — it
needs no player and animates in any Markdown viewer, so it is the render
every page links first. The shipped asciinema GIFs are cropped to their
content so no page carries a wide band of dead terminal space.

what:
- Add the rendered GIFs: agg output for the asciinema casts, union-trim
  cropped to the content box with 10px of the terminal's own background,
  and VHS output for the tapes
why: MP4 gives a compressed, seekable playback option for the longer
demos, where an inline GIF would balloon in size for the same frames.

what:
- Add the VHS-rendered MP4 for each tape
tony added 8 commits December 5, 2026 20:00
why: WebM is the smallest of the three render formats and is preferred
wherever the browser can play it, keeping the docs payload light.

what:
- Add the VHS-rendered WebM for each tape
why: The README's only visual was a single GIF, tucked above the donations
footer, that predates most of the current CLI. Readers had to infer what
add, discover, list, search, and status actually print.

what:
- Lead with a sync demo, so the core loop is visible before the install steps
- Illustrate add, discover, list, search, and status beside their sections
- Drop the stale demo GIF, which no longer resembled any command's output
why: Give readers a concrete view of each command beside its reference.

what:
- Embed the agg-rendered GIF for each top-level command
- Show list tree mode in its existing reference section
- Replace and remove the legacy homepage recording
- Rebuild published docs when rendered GIFs change
why: The recorded demos live under docs/_static/demos/, and the shared
Sphinx config sets html_static_path to _static, so the build copied all
67 demo files — tapes, casts, mp4/webm, and a second copy of each gif —
into the published site. None of it is referenced there: pages embed the
gifs from Sphinx's _images/ collection, and the README points at the
committed repo files by raw URL.

what:
- Add "demos/**" to exclude_patterns so html_static_path skips the payload
- Rendered gifs still reach the build via _images/; README URLs unaffected
why: Temporary — force the docs workflow to build and deploy THIS branch
to the S3/CloudFront docs site so the migrated demos render on the live
site for review. The published site should track master, so this MUST be
reverted before merge.

what:
- Add screen-recording-2026-07-12 to the docs push trigger
- Force PUBLISH on this ref so the deploy runs regardless of changed paths

[DO NOT MERGE] — revert after previewing.
why: The demo GIFs render as width:100% with no intrinsic size, so the
browser reserves no height until each GIF decodes and the page jumps as
you move through the sidebar. Sphinx only emits dimensions for :scale:,
and those come out as fixed pixels that distort the image on narrow
viewports.

what:
- Add an html-page-context hook stamping each demo <img> with
  width:100%; aspect-ratio:W/H, computed from the source GIF
- Reserves the correct box before load (no layout shift) while staying
  fluid and keeping lazy loading
why: The aspect-ratio hook forced width:100%, so a narrow demo (a 299px
gif) was blown up to the ~750px column and went soft. The real pixels
should show at their real size.

what:
- Inject width:<W>px; max-width:100% (was width:100%) so each demo renders
  at its true size, shrinks on a narrow screen, and never upscales — still
  aspect-ratio-reserved, so there is no layout shift
why: The crop that tightens the shipped demos lived only in a spike's
scratch comparison pages; with those removed, nothing recorded which
cropper actually works, so the next recording run would re-derive it and
risk shipping demos with wide dead space again.

what:
- Add a "Demo recordings" section pointing at the /screen-record skill and
  setup-sandbox.sh, with the ImageMagick union-trim recipe — content trim
  plus a 10px pad sampled from the terminal's own background — and why
  cropdetect/TrimBounds/mvedges fail on a full-frame terminal capture
@tony
tony force-pushed the screen-recording-2026-07-12 branch from 4cac72a to 08d45b4 Compare December 6, 2026 02:02

This branch was successfully deployed

1 active deployment
docs — 08d45b46 Deployed Dec 6, 2026 by tony via build (3.14) #1319
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Do not merge into trunk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant