Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Fix: Update "preview modes" to "preview tabs" and refresh snapshot
Maximilian Roos7d7a01559eed
diff --git a/README.md b/README.mdindex c80d60148..c646ee491 100644--- a/README.md+++ b/README.md@@ -983,10 +983,10 @@ Experimental commands under `wt beta`. Interface may change.Interactive worktree selector with fuzzy search and diff preview. Unix only.-Preview modes (toggle with `1`/`2`/`3`):-- **Mode 1**: Working tree changes (uncommitted)-- **Mode 2**: History (commits not on main highlighted)-- **Mode 3**: Branch diff (changes ahead of main)+Preview tabs (toggle with `1`/`2`/`3`):+- **Tab 1**: Working tree changes (uncommitted)+- **Tab 2**: History (commits not on main highlighted)+- **Tab 3**: Branch diff (changes ahead of main)### `wt beta statusline`diff --git a/src/cli.rs b/src/cli.rsindex 8c2f4c3e4..d0b8bc1e6 100644--- a/src/cli.rs+++ b/src/cli.rs@@ -476,14 +476,9 @@ pub enum StepCommand {/// Experimental commands#[derive(Subcommand)]pub enum BetaCommand {- /// Interactive worktree selector+ /// Interactive worktree selector with diff preview///- /// Preview modes (toggle with 1/2/3):- /// - Mode 1: Working tree changes- /// - Mode 2: History (commits not on main shown bright, commits on main dimmed)- /// - Mode 3: Branch diff (line changes ahead of main)- ///- /// Note: When viewing main itself, all commits shown without dimming+ /// Toggle preview tabs with 1/2/3 keys.#[cfg(unix)]Select,diff --git a/src/commands/select.rs b/src/commands/select.rsindex 181841deb..14798d647 100644--- a/src/commands/select.rs+++ b/src/commands/select.rs@@ -174,11 +174,11 @@ fn shell_escape(s: &str) -> String {/// 3. BranchDiff: Line diffs in commits ahead of main (git diff --stat main…)////// Loosely aligned with `wt list` columns, though not a perfect match:-/// - Mode 1 corresponds to "HEAD±" column-/// - Mode 2 shows commits (related to "main↕" counts)-/// - Mode 3 corresponds to "main…± (--full)" column+/// - Tab 1 corresponds to "HEAD±" column+/// - Tab 2 shows commits (related to "main↕" counts)+/// - Tab 3 corresponds to "main…± (--full)" column///-/// TODO: Consider adding mode 4 "remote±" showing diff vs upstream tracking branch+/// TODO: Consider adding tab 4 "remote±" showing diff vs upstream tracking branch/// (unpushed commits). Would align with "Remote⇅" column in `wt list`.#[derive(Debug, Clone, Copy, PartialEq, Eq)]enum PreviewMode {@@ -354,7 +354,7 @@ impl WorktreeSkimItem {output}- /// Render Mode 1: Working tree preview (uncommitted changes vs HEAD)+ /// Render Tab 1: Working tree preview (uncommitted changes vs HEAD)/// Matches `wt list` "HEAD±" columnfn render_working_tree_preview(&self, width: usize) -> String {let Some(wt_info) = self.item.worktree_data() else {@@ -371,7 +371,7 @@ impl WorktreeSkimItem {)}- /// Render Mode 3: Branch diff preview (line diffs in commits ahead of main)+ /// Render Tab 3: Branch diff preview (line diffs in commits ahead of main)/// Matches `wt list` "main…± (--full)" columnfn render_branch_diff_preview(&self, width: usize) -> String {if self.item.counts().ahead == 0 {@@ -382,7 +382,7 @@ impl WorktreeSkimItem {self.render_diff_preview(&["diff", &merge_base], "No changes vs main", width)}- /// Render Mode 2: History preview+ /// Render Tab 2: History previewfn render_history_preview(&self, _width: usize) -> String {const HISTORY_LIMIT: &str = "10";diff --git a/tests/snapshots/integration__integration_tests__help__help_beta.snap b/tests/snapshots/integration__integration_tests__help__help_beta.snapindex 101b582b0..571b90acf 100644--- a/tests/snapshots/integration__integration_tests__help__help_beta.snap+++ b/tests/snapshots/integration__integration_tests__help__help_beta.snap@@ -21,7 +21,7 @@ wt beta - Experimental commandsUsage: wt beta [OPTIONS] <COMMAND>Commands:- select Interactive worktree selector+ select Interactive worktree selector with diff previewstatusline Single-line status for shell promptsOptions: