Commit 6c3dade
fix(context): respect
* 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>
* fix(context): respect `-C` flag in CommandEnv worktree path
CommandEnv was using `std::env::current_dir()` instead of the path from
the Repository, which meant it ignored the `-C` flag. This caused hooks
to fail when running `wt -C /path/to/worktree hook ...` because
CommandContext received the wrong worktree path.
Changes:
- Add `path()` accessor to WorkingTree for getting the stored path
- Use `repo.current_worktree().path()` in for_action/for_action_branchless
- Canonicalize paths in compute_hooks_display_path() for comparison
(handles "." vs "/absolute/path" after the fix)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>-C flag in CommandEnv worktree path (#899)1 parent c153164 commit 6c3dade
File tree
3 files changed
+24
-5
lines changed- src
- commands
- git/repository
- output
3 files changed
+24
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
51 | 52 | | |
52 | | - | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
60 | 68 | | |
61 | 69 | | |
62 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
255 | 266 | | |
256 | 267 | | |
257 | 268 | | |
| |||
0 commit comments