get_current_step swallowed a bad STEP= value into None, which callers read
as "tour not started". It now returns Result<Option<u32>>: Ok(None) means no
session, a malformed STEP= means CorruptedTour.
Co-Authored-By: Claude Code <[email protected]>
Usability:
- Command aliases (n, p, s, ls, st) and positional step counts for next/prev
- next/prev clamp at the tour ends instead of erroring
- Color only when stdout is a TTY and NO_COLOR is unset (new style.rs)
- reset asks for confirmation; --force required when non-interactive
- IO errors carry operation context; friendlier not-started/no-steps errors
- list marks the current step; consistent lowercase verb output
- Handle SIGPIPE like other CLI tools instead of panicking when piped
Efficiency:
- Carry-forward hardlinks unchanged files between steps (copy fallback),
so a step only costs disk for its changes; copy_path unlinks before
overwriting so overlays can't write through a link
- Navigation installs only files that differ (inode/size/byte compare)
instead of two full-tree copies through a temp dir
- Change report reads only changed files; LCS diff trims common
prefix/suffix; path validation canonicalizes anchors once
Adds 10 integration tests (rm carry-forward, reset --force, clamping,
aliases, binary files, piped output, inode sharing, old-format compat,
unchanged-file mtimes). Old tours need no migration.
Co-Authored-By: Claude Fable 5 <[email protected]>
- Fix staged files being silently cleared when commit uses inline files
- Refactor step navigation to use direct go_to_step instead of fragile delta math
- Change step numbers from i32 to u32 (reject negative values at parse time)
- Add tour rm command to mark files for removal during carry-forward
- Add tour reset command to clear session and remove tracked files
- Consolidate duplicate recursive copy functions into shared copy_tree in utils
- Validate step directories are sequential (detect corruption)
- Detect binary files in diffs instead of showing garbage
- Use /// doc comments on enum variants so clap generates proper help text
- Remove custom Help subcommand in favor of clap's built-in --help
- Add CorruptedTour error variant for integrity checks
Co-Authored-By: Claude Opus 4.6 <[email protected]>