The interactive picker had no demo, and the two things that sell it
don't survive a still image: rows painting from local git before any
network call, and a preview pane you page through without leaving the
list. Making that recordable meant giving the demo environment a forge
that answers on a schedule, which is what most of this diff is.
## The mocked forge
`docs/demos/shared/fixtures/gh-mock.sh` answers every `gh` call from a
file that `write_gh_mock_data` writes once the branches exist — first
line a delay, the rest a JSON body. The per-branch delays are the point:
wt runs one `gh pr list` per branch concurrently, so staggered replies
land the CI cells one at a time behind a frame that already painted.
`fixtures/llm-mock.sh` does the same for the Summary column, picking a
sentence from the paths in each branch's diff.
Three things have to hold or the CI column silently empties rather than
failing, and `docs/demos/CLAUDE.md` now records all three: a parseable
origin (set via `url.<bare>.pushInsteadOf`, so `git remote get-url`
still hands wt the URL while pushes go to the local bare repo), `gh
--version` and `gh auth status` both exiting 0, and `DEMO_PROJECT_ID`
matching the URL.
## The recordings
`wt-switch-picker` is the full tour, and it is the one demo that records
at its own size — `SIZE_DOCS_PICKER`, the same 1600x900 canvas in
smaller text, giving 139x34 instead of 102x25. At the usual size the CI
and Summary columns fall off the right edge and the preview is too short
to page a diff. It runs against sixteen worktrees with varied CI, a
ten-comment PR thread, and a working tree dirty in several different
ways.
`wt-zellij-omnibus` opens on the picker rather than passing through it:
`alt-p` widens the rows, the CI cells land behind them, `ctrl-d` pages a
diff, then Enter selects. That beat is the picker's showing on the
homepage, which stays at two demos.
## Bugs this turned up
**`wt merge` on a dirty worktree described the wrong changes.**
`build_squash_prompt` diffed `merge_base..HEAD`, but the squash commits
the index — `handle_squash` stages the working tree before generating
the message and soft-resets afterwards. So the generated message covered
the branch's older commits and said nothing about the work just staged
into the same commit, which on a dirty `wt merge` is the whole reason it
ran. It now diffs `merge_base` against the index, matching the stats
`handle_squash` prints for that same commit. With nothing staged the two
spans are identical, so there is no second path.
**`wt step squash --dry-run` previewed a different prompt than it would
send.** `wt step commit --dry-run` stages into a temp index so its
preview spans what a real run would commit, while `--show-prompt`
deliberately shows only what is already staged. Making the squash prompt
read the index broke that parity for squash — its `--dry-run` showed
neither. It now mirrors `--stage` the same way, with the flag plumbed
through from the CLI. The task line in the default squash template moved
with it: "the combined effect of these commits" pointed at the one block
that doesn't carry the staged work, and now names `<diff>` as what the
squash records and `<commits>` as what it folds in.
**The picker preview dropped a character.** The pane rendered one column
wider than skim paints, so a wrapped line breaking flush against the
right edge lost its last character — "when" as "whe", mid-sentence, with
nothing that reads as clipping. Reproduced outside VHS in a pyte PTY at
139 columns before the fix and again after; `PREVIEW_RESERVED_COLS`
documents where the column goes.
## VHS fork
Three commits on `max-sixty/vhs` `keypress-overlay`, all pushed: pass
`macOptionIsMeta` so `Alt+<key>` reaches the program at all rather than
typing a bare letter into the query; time the keystroke overlay by
recorded frames instead of the wall clock, which removed a 640ms lag and
the fixed fudge that was hiding it; and record a modified key as one
keystroke, so `Alt+"8"` draws a highlighted `⌥8` rather than a greyed
`⌥` and an unrelated `8`. `_VHS_FORK_MARKER` names the newest of them,
because a clone that predates one records a wrong GIF and reports
nothing.
## Checks
All five affected recordings re-recorded and OCR-validated, and
published to `worktrunk-assets`. New tests:
`test_squash_prompt_covers_what_its_run_would_commit` covers both
preview paths — `--show-prompt` on the real index, `--dry-run` on the
mirrored one.
`test_preview_width_stops_short_of_the_column_skim_leaves_unpainted`
covers 80/120/139/200.
> _This was written by Claude Code on behalf of max-sixty_
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The demo recorder kept its own copies of the docs site's colors, and
they had drifted from `docs/src/styles/custom.css`:
- The VHS terminal's ANSI colors were still the Zola site's palette,
which #3866 deleted and #3936 replaced with `--wt-terminal-*`. Light
yellow had 2.65:1 contrast against the page background; the site's
browser test requires 4.5:1 for its own dim terminal text.
- `brightWhite`, the background of Worktrunk's gutter, used the ink
color, so dark GIFs drew the gutter as a near-white bar.
- Zellij, the starship prompt, and Claude Code were configured for light
in both themes, so dark GIFs showed a light Zellij tab bar and Claude
Code's light theme.
`docs/demos/shared/themes.py` now reads the hex `--wt-*` properties from
`custom.css` when the build runs. The VHS theme maps ANSI colors the way
the site renders snapshot output (`terminal_color_class` and
`terminal_background_class` in
`tests/integration_tests/readme_sync.rs`). `DemoEnv` carries the
recording's theme, so Zellij, the starship palette, and Claude Code
follow it. This replaces the `(pre-Starlight; site is #…)` comments the
PR first added.
Recording from inside a Claude Code session also leaked into the Claude
demos. The demo's Claude Code inherited that session's `CLAUDE*`
variables and warned that transcript saving was off, and it started
Remote Control, which printed a live claude.ai session URL into the GIF.
The recorder now drops inherited `CLAUDE*` variables except
`CLAUDE_CODE_OAUTH_TOKEN`, and the demo's `settings.json` sets
`remoteControlAtStartup` to false.
The GIFs are re-recorded locally (`./docs/demos/build docs` and
`./docs/demos/build social`) and published in
max-sixty/worktrunk-assets@bb3bfba.
## Verification
- `pytest docs/demos/tests`: 4 passed.
- OCR of every 20th frame of the Claude demos (354 frames) finds no
`remote-control`, `claude.ai/code`, `rc active`, or `Transcript saving`.
The same check matches on frames from the leaking recording.
- Frames checked by eye in both themes for the ANSI colors, the gutter,
and the Zellij chrome.
- TUI validation passes for all nine Claude demo GIFs. The `wt-switch`
and `wt-statusline` checkpoints named absolute frames past the end of
these faster recordings (274–318 frames, against 344–465 in the
previously published GIFs), so a negative checkpoint frame now counts
back from the last frame; the omnibus checkpoint on its closing `wt
list` uses the same anchoring. The previously published GIFs pass the
new checkpoints too. Those checkpoints also forbid `claude.ai/code` and
`Transcript saving`, and a GIF made from a leaking frame fails on them.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01TQPDxs2csvGFGBr2j4MtrA
> _This was written by Claude Code on behalf of max-sixty_
---------
Co-authored-by: worktrunk-bot <254187624+worktrunk-bot@users.noreply.github.com>
Co-authored-by: Maximilian Roos <m@maxroos.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The demo recorder inherited `NO_COLOR` from its caller, which made
generated `wt list` tables monochrome. GIF recording now clears
`NO_COLOR` and sets `CLICOLOR_FORCE=1` at the shared VHS boundary.
OCR validation now adds a theme-aware high-contrast fallback for dim
terminal text, preserving the stable `Opus` and worktree assertions
without relying on task text that can reflow. Enhanced OCR is also
checked for forbidden error text.
Testing: `cargo run -- hook pre-merge --yes`; re-recorded `wt-list`,
`wt-core`, `wt-merge`, and `wt-zellij-omnibus` in both docs themes plus
all three narrower social Claude demos; all nine TUI validation
combinations passed; visually reviewed every dark table scene and the
social recordings.
> _This was written by Codex on behalf of max-sixty_
Each demo theme now records from a fresh repository and home, so the
light pass cannot change the dark pass's starting state. Claude demos
can reuse the current macOS Keychain login without copying credentials,
while every recorder mode keeps Claude configuration under the
disposable home.
The recorder validates each generated theme and checks Claude scenes for
login failures, promotions, temporary paths, and mismatched merge
output. The tapes also avoid the marketplace setup race and hide
disposable demo output.
Testing: `cargo run -- hook pre-merge --yes`; regenerated and visually
reviewed all eight dark documentation GIFs and the three Claude light
variants.
> _This was written by Codex on behalf of max-sixty_
Single ffmpeg call per checkpoint instead of ~20 separate calls. Builds
a `select` filter expression for the full frame range and extracts all
sampled frames in one pass with `-vsync vfr`. OCR still short-circuits
on first match.
> _This was written by Claude Code on behalf of maximilian_
Co-authored-by: Claude <noreply@anthropic.com>
OCR validation checked a single exact frame number, which broke whenever
Claude Code's UI shifted timing slightly. Now uses a `Checkpoint`
dataclass with frame ranges — scans every 10th frame across a ~200-frame
window and passes if any frame matches. Resilient to normal timing
shifts without losing validation rigor.
Build script now automatically runs TUI demos sequentially (Zellij
conflicts when parallel were the root cause of previous failures), while
non-TUI demos continue running in parallel. Adds per-demo and per-target
timing summaries.
> _This was written by Claude Code on behalf of maximilian_
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
- Replace `Ctrl+t`/`Ctrl+n` with Zellij session manager sequences
(`Ctrl+Space` → `tn`/`on`) to avoid Claude Code TUI intercepting
keystrokes
- Remove initial `wt list` — demo now starts directly with the
interactive picker
- Increase marketplace install sleep (5s → 10s) for reliability
- Suppress LSP plugin recommendation dialog via
`lspRecommendationDisabled`
- Update OCR validation checkpoints for new frame timing
## Test plan
- [x] Demo builds successfully (`./docs/demos/build docs --only
wt-zellij-omnibus`)
- [x] OCR validation passes (both frame checkpoints)
- [x] Visual review of key frames confirms no errors
> _This was written by Claude Code on behalf of @max-sixty_
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
- Add interactive picker and copy build caches to home page "Workflow
automation" section
- Update omnibus demo to showcase the picker (TAB 4 uses `wt switch`
with no args, filters to "au", selects auth)
- Fix demo infrastructure: `CLAUDECODE=""` for nested sessions, model →
Opus 4.6, approvals.toml migration, comprehensive tip suppression
## Test plan
- [x] Demo builds and validates (`./docs/demos/build docs --only
wt-zellij-omnibus`)
- [x] Assets published to worktrunk-assets repo
- [x] Doc sync test passes
- [ ] CI green
> _This was written by Claude Code on behalf of @max-sixty_
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Add OCR-based validation for TUI demos
TUI demos (Zellij, interactive UIs) can't be validated via text snapshots because
VHS only captures the outer terminal, not content inside multiplexers. Instead,
extract key frames from GIFs and use OCR (tesseract) to verify expected patterns.
Add `docs/demos/shared/validation.py` with checkpoint definitions and validation
logic. Update build script to validate TUI demos with defined checkpoints during
snapshot mode, skipping those without checkpoints. Document validation approach
in CLAUDE.md with requirements and checkpoint definitions for wt-zellij-omnibus.
* fix(demos): pre-populate Zellij permissions cache to avoid dialog
The zellij-tab-name plugin shows a permission dialog on first run,
which was appearing in recorded demos. Fix by pre-populating the
permissions.kdl cache file before Zellij starts.
Also simplifies the tape by removing the "y" keypress and clear
that were working around the permission dialog.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(demos): re-enable OCR validation checkpoints, handle permission dialog race
The permission dialog timing is non-deterministic (depends on macOS cache state).
Handle both cases:
- If dialog appears: "y" dismisses it
- If no dialog (cache hit): "y" + Enter + clear cleans up the shell
Re-enables validation checkpoints with calibrated frame numbers:
- Frame 100: wt list output with branch table
- Frame 500: Claude UI with Opus indicator
- Frame 2000: Final wt list --full output
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>