24 Commits
Author SHA1 Message Date
adamf 9d2b007e68 Merge pull request 'Improve usability and efficiency' (#1) from usability-efficiency into main
Reviewed-on: https://www.adam-french.co.uk/gitea/adamf/tour/pulls/1
2026-07-07 13:41:36 +01:00
adamfandClaude Fable 5 fc10c28d52 Improve usability and efficiency
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]>
2026-07-07 13:28:16 +01:00
adamf aced95a845 bug fixes 2026-03-07 14:50:09 +00:00
adamf e648b86c93 Make path not show with debug quotes 2026-03-07 14:49:28 +00:00
adamf aafc847d02 input paths normalised before comparison 2026-03-07 14:49:02 +00:00
adamf 1eda5a9642 Missing message fix 2026-03-07 14:48:18 +00:00
adamfandClaude Opus 4.6 507c61fe5f Fix bugs and improve robustness across the codebase
- 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]>
2026-03-05 21:23:39 +00:00
adamf 399a72f380 Add staged files (so random files don't get removed) 2026-03-03 11:16:22 +00:00
adamf c0a71bc285 adding important subcommands 2026-03-02 21:55:37 +00:00
adamf 1dea592fb2 adding commit info 2026-03-02 21:55:27 +00:00
adamf 4139733c5c adding new errors 2026-03-02 21:55:15 +00:00
adamf c11782564c replaced with single step function to work forwards and backwards 2026-03-02 21:55:06 +00:00
adamf 2ffce0347e add utils for copying files and retrieving session info 2026-03-02 21:54:37 +00:00
adamf 5093303e8d adding future functions 2026-02-23 15:12:43 +00:00
adamf 32dcb47e3c remove unused imports 2026-02-23 15:12:37 +00:00
adamf 8b3dc3c327 unwrapping presents 2026-02-23 15:12:16 +00:00
adamf 26eccecc7c Adding all commands and boilerplate 2026-02-23 14:46:19 +00:00
adamf 593ad42d3b Non optional message & commit command 2026-02-23 14:30:36 +00:00
adamf 7aa3ca651e Copy files with tour init 2026-02-18 17:37:01 +00:00
adamf efa297a07a Create file directorys in init 2026-02-18 17:10:13 +00:00
adamf 39f47ef716 Add commands and options 2026-02-18 13:44:30 +00:00
adamf b50ac7065c adding more detail to readme 2026-02-18 12:56:27 +00:00
adamf 203a88c7a2 adding readme 2026-02-18 12:46:43 +00:00
adamf 3c63332a90 Initial commit 2026-02-18 12:32:54 +00:00