Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Recolor picker legend dim-cyan and reorder controls (#3237)

Maximilian Roos14795fdf9dd9
diff --git a/src/commands/picker/items.rs b/src/commands/picker/items.rs
index 123abd9a8..5eec6f247 100644
--- a/src/commands/picker/items.rs
+++ b/src/commands/picker/items.rs
@@ -584,22 +584,26 @@ pub(super) fn render_preview_tabs(
render_tab_row_compact(&tabs, reset)
};
- // Controls use dim yellow to distinguish from dimmed (white) tabs.
+ // Controls use dim cyan to distinguish from the dimmed (white) tabs above.
// The tab numbers above are the alt-N accelerators (bare digits type
// into the query); Tab/shift-tab cycle the same tabs.
//
+ // Order: primary action (Enter), preview navigation (ctrl-u/d scroll, then
+ // the Tab/alt-1…7 accelerators), then row actions, with Esc last.
+ //
// The controls line is intentionally NOT width-managed: skim clips it on the
- // right on a narrow pane, but it's only a reminder — the accelerators it
- // names live in the tab bar above, which IS width-managed, so nothing
- // navigable is lost when the tail clips. Row actions lead so they survive a
- // narrow-pane clip; the preview controls and Esc trail.
+ // right on a narrow pane, but it's only a reminder. Note the trade-off of
+ // this order: the row actions (alt-c/x/y/o/r/p) now trail and clip first, and
+ // unlike the preview accelerators they are not duplicated in the (width-
+ // managed) tab bar above — so on a narrow pane the only on-screen reminder of
+ // them can clip away.
let controls = cformat!(
- "<dim,yellow>Enter: switch | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Tab/alt-1…7: preview | ctrl-u/d: scroll | Esc: cancel</>"
+ "<dim,cyan>Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Esc: cancel</>"
);
// Each tab/segment already ends with a full reset (so styling never bleeds
// into the dividers or preview content); `{reset}` here only closes the
- // controls line's dim-yellow span.
+ // controls line's dim-cyan span.
format!("{bar}\n{controls}{reset}\n\n")
}
diff --git a/src/commands/picker/snapshots/wt__commands__picker__items__tests__branch_diff.snap b/src/commands/picker/snapshots/wt__commands__picker__items__tests__branch_diff.snap
index 3f807732d..c0488710c 100644
--- a/src/commands/picker/snapshots/wt__commands__picker__items__tests__branch_diff.snap
+++ b/src/commands/picker/snapshots/wt__commands__picker__items__tests__branch_diff.snap
@@ -3,4 +3,4 @@ source: src/commands/picker/items.rs
expression: "render_preview_tabs(mode, wt, WIDE)"
---
1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary | 6: pr | 7: comments
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Tab/alt-1…7: preview | ctrl-u/d: scroll | Esc: cancel
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Esc: cancel
diff --git a/src/commands/picker/snapshots/wt__commands__picker__items__tests__empty_all_local_diffs.snap b/src/commands/picker/snapshots/wt__commands__picker__items__tests__empty_all_local_diffs.snap
index ab9e7d8c9..2414ee0e0 100644
--- a/src/commands/picker/snapshots/wt__commands__picker__items__tests__empty_all_local_diffs.snap
+++ b/src/commands/picker/snapshots/wt__commands__picker__items__tests__empty_all_local_diffs.snap
@@ -3,4 +3,4 @@ source: src/commands/picker/items.rs
expression: "render_preview_tabs(PreviewMode::WorkingTree,\nTabAvailability::worktree(CONTENT_EMPTY, true, false, false), WIDE,)"
---
1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary | 6: pr | 7: comments
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Tab/alt-1…7: preview | ctrl-u/d: scroll | Esc: cancel
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Esc: cancel
diff --git a/src/commands/picker/snapshots/wt__commands__picker__items__tests__empty_upstream_and_summary.snap b/src/commands/picker/snapshots/wt__commands__picker__items__tests__empty_upstream_and_summary.snap
index 775d11449..f3387fbe9 100644
--- a/src/commands/picker/snapshots/wt__commands__picker__items__tests__empty_upstream_and_summary.snap
+++ b/src/commands/picker/snapshots/wt__commands__picker__items__tests__empty_upstream_and_summary.snap
@@ -1,6 +1,6 @@
---
source: src/commands/picker/items.rs
-expression: "render_preview_tabs(PreviewMode::WorkingTree,\nTabAvailability::worktree(false, false, false), WIDE,)"
+expression: "render_preview_tabs(PreviewMode::WorkingTree,\nTabAvailability::worktree(LocalContent::default(), false, false, false),\nWIDE,)"
---
1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary | 6: pr | 7: comments
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Tab/alt-1…7: preview | ctrl-u/d: scroll | Esc: cancel
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Esc: cancel
diff --git a/src/commands/picker/snapshots/wt__commands__picker__items__tests__log.snap b/src/commands/picker/snapshots/wt__commands__picker__items__tests__log.snap
index 58d71bd2a..da038fde6 100644
--- a/src/commands/picker/snapshots/wt__commands__picker__items__tests__log.snap
+++ b/src/commands/picker/snapshots/wt__commands__picker__items__tests__log.snap
@@ -3,4 +3,4 @@ source: src/commands/picker/items.rs
expression: "render_preview_tabs(mode, wt, WIDE)"
---
1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary | 6: pr | 7: comments
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Tab/alt-1…7: preview | ctrl-u/d: scroll | Esc: cancel
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Esc: cancel
diff --git a/src/commands/picker/snapshots/wt__commands__picker__items__tests__pr.snap b/src/commands/picker/snapshots/wt__commands__picker__items__tests__pr.snap
index 2db1120ff..4cee80307 100644
--- a/src/commands/picker/snapshots/wt__commands__picker__items__tests__pr.snap
+++ b/src/commands/picker/snapshots/wt__commands__picker__items__tests__pr.snap
@@ -3,4 +3,4 @@ source: src/commands/picker/items.rs
expression: "render_preview_tabs(mode, wt, WIDE)"
---
1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary | 6: pr | 7: comments
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Tab/alt-1…7: preview | ctrl-u/d: scroll | Esc: cancel
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Esc: cancel
diff --git a/src/commands/picker/snapshots/wt__commands__picker__items__tests__pr_row.snap b/src/commands/picker/snapshots/wt__commands__picker__items__tests__pr_row.snap
index b36ad6a60..078c7d54f 100644
--- a/src/commands/picker/snapshots/wt__commands__picker__items__tests__pr_row.snap
+++ b/src/commands/picker/snapshots/wt__commands__picker__items__tests__pr_row.snap
@@ -3,4 +3,4 @@ source: src/commands/picker/items.rs
expression: "render_preview_tabs(PreviewMode::Pr, TabAvailability::listed_pr(), WIDE)"
---
1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary | 6: pr | 7: comments
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Tab/alt-1…7: preview | ctrl-u/d: scroll | Esc: cancel
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Esc: cancel
diff --git a/src/commands/picker/snapshots/wt__commands__picker__items__tests__summary.snap b/src/commands/picker/snapshots/wt__commands__picker__items__tests__summary.snap
index 6f85ccbb8..ec06e5597 100644
--- a/src/commands/picker/snapshots/wt__commands__picker__items__tests__summary.snap
+++ b/src/commands/picker/snapshots/wt__commands__picker__items__tests__summary.snap
@@ -3,4 +3,4 @@ source: src/commands/picker/items.rs
expression: "render_preview_tabs(mode, wt, WIDE)"
---
1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary | 6: pr | 7: comments
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Tab/alt-1…7: preview | ctrl-u/d: scroll | Esc: cancel
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Esc: cancel
diff --git a/src/commands/picker/snapshots/wt__commands__picker__items__tests__upstream_diff.snap b/src/commands/picker/snapshots/wt__commands__picker__items__tests__upstream_diff.snap
index 86a096d75..29453e7d3 100644
--- a/src/commands/picker/snapshots/wt__commands__picker__items__tests__upstream_diff.snap
+++ b/src/commands/picker/snapshots/wt__commands__picker__items__tests__upstream_diff.snap
@@ -3,4 +3,4 @@ source: src/commands/picker/items.rs
expression: "render_preview_tabs(mode, wt, WIDE)"
---
1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary | 6: pr | 7: comments
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Tab/alt-1…7: preview | ctrl-u/d: scroll | Esc: cancel
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Esc: cancel
diff --git a/src/commands/picker/snapshots/wt__commands__picker__items__tests__working_tree.snap b/src/commands/picker/snapshots/wt__commands__picker__items__tests__working_tree.snap
index 9577281bd..a2f2004d4 100644
--- a/src/commands/picker/snapshots/wt__commands__picker__items__tests__working_tree.snap
+++ b/src/commands/picker/snapshots/wt__commands__picker__items__tests__working_tree.snap
@@ -3,4 +3,4 @@ source: src/commands/picker/items.rs
expression: "render_preview_tabs(mode, wt, WIDE)"
---
1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary | 6: pr | 7: comments
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Tab/alt-1…7: preview | ctrl-u/d: scroll | Esc: cancel
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | alt-c: create | alt-x: remove | alt-y: copy | alt-o: open | alt-r: refresh | alt-p: toggle | Esc: cancel
diff --git a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_abort_escape_preview.snap b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_abort_escape_preview.snap
index 292d2a4a4..d3cfb2703 100644
--- a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_abort_escape_preview.snap
+++ b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_abort_escape_preview.snap
@@ -3,6 +3,6 @@ source: tests/integration_tests/switch_picker.rs
expression: preview
---
1: HEAD± 2 3 4 5 6 7
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | a
○ main has no uncommitted changes
diff --git a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_multiple_worktrees_preview.snap b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_multiple_worktrees_preview.snap
index 292d2a4a4..d3cfb2703 100644
--- a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_multiple_worktrees_preview.snap
+++ b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_multiple_worktrees_preview.snap
@@ -3,6 +3,6 @@ source: tests/integration_tests/switch_picker.rs
expression: preview
---
1: HEAD± 2 3 4 5 6 7
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | a
○ main has no uncommitted changes
diff --git a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_log_preview.snap b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_log_preview.snap
index 8f889b7bb..be7ff3524 100644
--- a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_log_preview.snap
+++ b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_log_preview.snap
@@ -3,7 +3,7 @@ source: tests/integration_tests/switch_picker.rs
expression: preview
---
1 2: log 3 4 5 6 7
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | a
* [HASH] +1 [TIME] (feature) Add file 5 with content
* [HASH] +1 [TIME] Add file 4 with content
diff --git a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_main_diff_preview.snap b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_main_diff_preview.snap
index 426fc77d4..147ed3efa 100644
--- a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_main_diff_preview.snap
+++ b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_main_diff_preview.snap
@@ -3,7 +3,7 @@ source: tests/integration_tests/switch_picker.rs
expression: preview
---
1 2 3: main…± 4 5 6 7
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | a
feature_code.rs | 6 ++++++
tests.rs | 4 ++++
diff --git a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_summary_preview.snap b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_summary_preview.snap
index 64e0bb550..193698061 100644
--- a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_summary_preview.snap
+++ b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_summary_preview.snap
@@ -3,7 +3,7 @@ source: tests/integration_tests/switch_picker.rs
expression: preview
---
1 2 3 4 5: summary 6 7
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | a
Configure [commit.generation] command to enable LLM summari
diff --git a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_uncommitted_preview.snap b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_uncommitted_preview.snap
index 898a75410..67b52dc9a 100644
--- a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_uncommitted_preview.snap
+++ b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_uncommitted_preview.snap
@@ -3,7 +3,7 @@ source: tests/integration_tests/switch_picker.rs
expression: preview
---
1: HEAD± 2 3 4 5 6 7
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | a
tracked.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_with_branches_preview.snap b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_with_branches_preview.snap
index 292d2a4a4..d3cfb2703 100644
--- a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_with_branches_preview.snap
+++ b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_with_branches_preview.snap
@@ -3,6 +3,6 @@ source: tests/integration_tests/switch_picker.rs
expression: preview
---
1: HEAD± 2 3 4 5 6 7
-Enter: switch | alt-c: create | alt-x: remove | alt-y: copy
+Enter: switch | ctrl-u/d: scroll | Tab/alt-1…7: preview | a
○ main has no uncommitted changes