mirror of
https://github.com/max-sixty/worktrunk.git
synced 2026-09-14 20:00:38 +08:00
c153164ba7
* 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>
892 B
892 B
$ wt switch hooks
○ Switched to worktree for hooks @ <DEMO_DIR>/.demo-wt-commit/w/acme.hooks
$ git diff --staged --stat
src/lib.rs | 1 +
src/validation.rs | 23 +++++++++++++++++++++++
2 files changed, 24 insertions(+)
$ wt step commit
◎ Generating commit message and committing changes... (2 files, +25)
feat(validation): add input validation utilities
Add validation module with is_positive and is_non_empty helpers
for validating user input. Includes comprehensive test coverage.
✓ Committed changes @ 08d6aa2
$ git log -1
commit 08d6aa281ae15980b1dc485df79834735f9afaeb
Author: Worktrunk Demo <demo@example.com>
Date: Tue Jan 27 19:36:26 2026 -0800
feat(validation): add input validation utilities
Add validation module with is_positive and is_non_empty helpers
for validating user input. Includes comprehensive test coverage.
○ Switched to worktree for hooks @ <DEMO_DIR>/.demo-wt-commit/w/acme.hooks
$ git diff --staged --stat
src/lib.rs | 1 +
src/validation.rs | 23 +++++++++++++++++++++++
2 files changed, 24 insertions(+)
$ wt step commit
◎ Generating commit message and committing changes... (2 files, +25)
feat(validation): add input validation utilities
Add validation module with is_positive and is_non_empty helpers
for validating user input. Includes comprehensive test coverage.
✓ Committed changes @ 08d6aa2
$ git log -1
commit 08d6aa281ae15980b1dc485df79834735f9afaeb
Author: Worktrunk Demo <demo@example.com>
Date: Tue Jan 27 19:36:26 2026 -0800
feat(validation): add input validation utilities
Add validation module with is_positive and is_non_empty helpers
for validating user input. Includes comprehensive test coverage.