Skip to content

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

test: simplify the integration suite (#3657)

Maximilian Roos1b35950a9c77
diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml
index 5b8022ac4..2bdf7d63a 100644
--- a/.github/workflows/coverage.yaml
+++ b/.github/workflows/coverage.yaml
@@ -37,6 +37,11 @@ jobs:
crate: cargo-llvm-cov
version: "=0.8.7"
+ - uses: baptiste0928/cargo-install@v3
+ with:
+ crate: cargo-nextest
+ version: "=0.9.140"
+
- name: 💰 Cache
uses: Swatinem/rust-cache@v2
with:
@@ -57,7 +62,9 @@ jobs:
- run: cargo llvm-cov clean --workspace
- name: 📊 Generate coverage report
- run: cargo llvm-cov --features shell-integration-tests --cobertura --output-path=cobertura.xml
+ # Match the regular suite's process isolation. Cargo's in-process runner
+ # lets one busy PTY test delay another before it can paint its prompt.
+ run: cargo llvm-cov nextest --features shell-integration-tests --cobertura --output-path=cobertura.xml
- name: Upload code coverage results
uses: actions/upload-artifact@v7
diff --git a/CLAUDE.md b/CLAUDE.md
index 3faf744da..f8ccdb4f2 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -43,7 +43,7 @@ Load relevant skills before starting; reload when scope changes mid-session. Pro
## Documentation
-Behavior changes require doc updates. `src/cli/mod.rs` (`after_long_help` plus clap attributes) is the PRIMARY SOURCE for command pages; their rendered mirrors in `docs/content/` and `skills/worktrunk/reference/` are generated, as is all of `plugins/worktrunk/skills/` — but both directories also hold hand-edited primaries (non-command docs in `docs/content/`, skill-only pages like `shell-integration.md` in the reference dir), so check which file is primary in the sync taxonomy before editing. Ask: "does `--help` still describe what the code does?" `cargo test --test integration test_docs_are_in_sync` checks doc sync; editing help text (`after_long_help`, `about`, arg docs) also changes the rendered `--help` snapshots, which that test leaves untouched — `cargo insta test --accept -- --test integration "test_help"` regenerates them (the pre-merge hook runs both). Sync taxonomy, help-text authoring (three render contexts, link text, config-TOML blocks): `docs/CLAUDE.md`.
+Behavior changes require doc updates. `src/cli/mod.rs` (`after_long_help` plus clap attributes) is the PRIMARY SOURCE for command pages; their rendered mirrors in `docs/content/` and `skills/worktrunk/reference/` are generated, as is all of `plugins/worktrunk/skills/` — but both directories also hold hand-edited primaries (non-command docs in `docs/content/`, skill-only pages like `shell-integration.md` in the reference dir), so check which file is primary in the sync taxonomy before editing. Ask: "does `--help` still describe what the code does?" `cargo test --test integration test_docs_are_in_sync` checks doc sync; editing help text (`after_long_help`, `about`, arg docs) also changes the rendered `--help` snapshots, which that test leaves untouched — `cargo insta test --accept --test integration -- test_help` regenerates them (the pre-merge hook runs both). Sync taxonomy, help-text authoring (three render contexts, link text, config-TOML blocks): `docs/CLAUDE.md`.
## Plugin Layout
diff --git a/Taskfile.yaml b/Taskfile.yaml
index 9c78ecf40..412af5015 100644
--- a/Taskfile.yaml
+++ b/Taskfile.yaml
@@ -11,7 +11,7 @@ tasks:
# Development
coverage:
desc: Run tests with coverage report
- cmd: cargo llvm-cov --html --features shell-integration-tests {{.CLI_ARGS}}
+ cmd: cargo llvm-cov nextest --html --features shell-integration-tests {{.CLI_ARGS}}
setup-web:
desc: Setup Claude Code web environment for development
diff --git a/docs/CLAUDE.md b/docs/CLAUDE.md
index a7b950eb1..dcf2ffb4f 100644
--- a/docs/CLAUDE.md
+++ b/docs/CLAUDE.md
@@ -104,7 +104,7 @@ Help text renders in three contexts; check all three when editing:
Because web docs concatenate everything, the `after_long_help` opener must not restate `about`/`subtitle` — start with new information (see "Command documentation structure" below for opener patterns). Link text must stand alone when the URL is stripped (terminal help drops the URL, keeping only the text): use `` [`wt foo`](...) `` for commands (the backticks signal a `--help` lookup) or a descriptive phrase for doc sections; avoid bare labels that match the destination's heading.
-After editing `after_long_help`, also refresh the help snapshots: `cargo insta test --accept -- --test integration "test_help"`.
+After editing `after_long_help`, also refresh the help snapshots: `cargo insta test --accept --test integration -- test_help`.
### Config doc TOML blocks
diff --git a/src/commands/CLAUDE.md b/src/commands/CLAUDE.md
index 1d311aa6b..550b29cc6 100644
--- a/src/commands/CLAUDE.md
+++ b/src/commands/CLAUDE.md
@@ -82,7 +82,7 @@ wt --source -C /path/to/repo switch
1. Add the subcommand to the `Cli` enum in `src/cli/mod.rs`.
2. Implement it in `src/commands/` (e.g. `src/commands/mycommand.rs`).
3. Add an `after_long_help` attribute — it is the source of truth for `docs/content/{command}.md`.
-4. Run `cargo test --test integration test_docs_are_in_sync`. Editing help text also changes the rendered `--help` snapshots, which that test leaves untouched — regenerate them with `cargo insta test --accept -- --test integration "test_help"` (or run the pre-merge hook, which does both).
+4. Run `cargo test --test integration test_docs_are_in_sync`. Editing help text also changes the rendered `--help` snapshots, which that test leaves untouched — regenerate them with `cargo insta test --accept --test integration -- test_help` (or run the pre-merge hook, which does both).
## Branch Argument Conventions
diff --git a/tests/CLAUDE.md b/tests/CLAUDE.md
index 22112b61d..82c5273b2 100644
--- a/tests/CLAUDE.md
+++ b/tests/CLAUDE.md
@@ -5,6 +5,8 @@
```bash
cargo run -- hook pre-merge --yes # all tests + lints
pre-commit run --all-files # lints only
+cargo nextest run --all-features # full suite, fastest runner
+cargo nextest run --all-features -E 'test(/^integration_tests::list_layout::/)' # one module
cargo test --lib --bins # unit tests
cargo test --test integration # integration (no shell tests)
cargo test --test integration --features shell-integration-tests # + shell tests
@@ -20,7 +22,7 @@ A target-filtered run (`--lib`, `--test integration`, …) on a fresh `target/`
## Coverage Investigation
-`task coverage` runs the suite and writes an HTML report to `target/llvm-cov/html/index.html`. Both CI (the `coverage` workflow) and local `task coverage` pass `--features shell-integration-tests`, so code behind that flag is compiled and measured.
+`task coverage` runs the suite through nextest and writes an HTML report to `target/llvm-cov/html/index.html`. Coverage uses the same process isolation as the regular suite: PTY tests must not share one crowded test process. Both CI (the `coverage` workflow) and local `task coverage` pass `--features shell-integration-tests`, so code behind that flag is compiled and measured.
When `codecov/patch` fails, investigate before declaring ready (the merge gate itself is in the root `CLAUDE.md` → Coverage):
@@ -360,105 +362,25 @@ fn test_fish_integration() {
**Existing feature flags:**
- `shell-integration-tests` — Tests requiring bash/zsh/fish shells and PTY
-## README Examples and Snapshot Testing
+## PTY Tests and README Examples
-### Problem: Separated stdout/stderr in Standard Snapshots
+Use `insta_cmd` by default. It is faster and lets a test assert stdout, stderr,
+and exit status separately. Use a PTY only when the contract actually depends
+on a terminal: interactive prompts, shell functions and directives, pager
+selection, or the temporal interleaving of stdout and stderr. A README label by
+itself is not a reason to use a PTY.
-README examples need to show output as users see it in their terminal - with stdout and stderr interleaved in the order they appear. However, the standard `insta_cmd` snapshot testing (used in most integration tests) separates stdout and stderr into different sections:
+For README output where interleaving matters, use `build_pty_command` with
+`exec_cmd_in_pty` (or `exec_cmd_in_pty_prompted` for prompt-driven input) from
+`tests/common/pty.rs`. These return the combined stream in terminal order. The
+shell-wrapper-specific equivalent is `exec_in_pty_interactive` in
+`shell_wrapper.rs`.
-```yaml
------ stdout -----
-🔄 Running pre-merge test:
- uv run pytest
-
------ stderr -----
-============================= test session starts ==============================
-collected 18 items
-...
-```
-
-This makes snapshots **not directly copyable** into README.md because:
-1. The output is split into two sections
-2. We lose the temporal ordering (which output appeared first)
-3. Users never see this separation - their terminal shows combined output
-
-### Solution: Use PTY-based Testing for README Examples
-
-For tests that generate README examples, use the PTY-based execution pattern from `tests/integration_tests/shell_wrapper.rs`:
-
-**Key functions** in `tests/common/pty.rs`:
-- `build_pty_command()` — builds a `CommandBuilder` with standard PTY isolation
-- `exec_cmd_in_pty()` — executes in a PTY, writing all input immediately (non-interactive)
-- `exec_cmd_in_pty_prompted()` — executes in a PTY, waiting for prompts before sending input
-
-These use `portable_pty` to execute commands in a pseudo-terminal, returning
-combined stdout+stderr as a single `String` with ANSI color codes and proper
-temporal ordering.
-
-**Pattern to use:**
-
-```rust
-use crate::common::pty::{build_pty_command, exec_cmd_in_pty};
-
-let cmd = build_pty_command("wt", &["merge"], &repo_path, &env_vars, None);
-let (combined_output, exit_code) = exec_cmd_in_pty(cmd, "");
-assert_snapshot!("readme_example_name", combined_output);
-```
-
-**Benefits:**
-- Output is directly copyable to README.md
-- Shows actual user experience (interleaved stdout/stderr)
-- Preserves temporal ordering of output
-- No manual merging of stdout/stderr needed
-
-**Example:** See `tests/integration_tests/shell_wrapper.rs`:
-- `ShellOutput` struct with `combined: String`
-- `exec_in_pty_interactive()` — shell-wrapper-specific PTY helper
-
-### When to Use Each Approach
-
-**Use `insta_cmd` (standard snapshots):**
-- Unit and integration tests focused on correctness
-- Tests that need to verify stdout/stderr separately
-- Tests checking exit codes and specific error messages
-- Most tests in the codebase
-
-**Use PTY-based execution (PTY-based snapshots):**
-- Tests generating output for README.md examples
-- Tests verifying shell integration (`wt` function, directives)
-- Tests needing to verify complete user experience
-- Any test where temporal ordering of stdout/stderr matters
-
-### Current Status
-
-**README examples using PTY-based approach:**
-- Shell wrapper tests (all of `tests/integration_tests/shell_wrapper.rs`)
-
-**README examples using standard snapshots (working, but require manual editing):**
-- `test_readme_example_simple()` - Quick start merge example
-- `test_readme_example_complex()` - LLM commit example
-- `test_readme_example_hooks_pre_create()` - Pre-create hooks
-- `test_readme_example_hooks_pre_merge()` - Pre-merge hooks
-
-**Current workflow:** These tests work correctly and generate accurate snapshots. However, the snapshots separate stdout and stderr into different sections, which means they cannot be directly copied into README.md. Instead, the README examples are manually edited versions that merge stdout/stderr in the correct temporal order and remove ANSI codes.
-
-**Future improvement:** Migrate README example tests to use PTY execution so snapshots are directly copyable into README.md without manual editing. This is an enhancement for developer convenience, not a bug fix.
-
-### Migration Checklist
-
-When converting a README example test from `insta_cmd` to PTY-based:
-
-1. ✅ Import `portable_pty` dependencies
-2. ✅ Use `build_pty_command()` + `exec_cmd_in_pty()` from `tests/common/pty.rs`
-3. ✅ Replace `make_snapshot_cmd()` + `assert_cmd_snapshot!()` with PTY execution + `assert_snapshot!()`
-4. ✅ Ensure environment variables include `CLICOLOR_FORCE=1` for ANSI codes
-5. ✅ Update snapshot file format (file snapshot, not inline)
-6. ✅ Verify output matches expected README format
-7. ✅ Update README.md to reference new snapshot location
-
-### Implementation Note
-
-The PTY approach is specifically for **user-facing output documentation**. It's not a replacement for standard integration tests - both approaches serve different purposes and should coexist in the test suite.
+PTY tests are conformance tests for the shell boundary, not another place to
+retest every command. Keep one representative workflow per distinct shell
+implementation, then test command semantics through ordinary integration
+tests. Add a command × shell case only when that interaction is itself the
+contract.
## Coverage in PTY Tests
@@ -529,6 +451,31 @@ Setup-side path-redaction placeholders in the strip list (`add_placeholder_ansi_
## Test Style
+### Choose the cheapest boundary
+
+Put a belief at the lowest layer that can prove it:
+
+| Belief | Test boundary |
+|--------|---------------|
+| Parsing, formatting, allocation, state transitions | Direct unit/module test |
+| Git/filesystem/process wiring | Integration test with the smallest fitting fixture |
+| TTY behavior, shell syntax, stream interleaving | PTY or real-shell test |
+
+Exercise boundary values and input matrices exhaustively at the direct layer.
+Keep one representative integration case to prove the pieces are wired
+together. Do not repeat the same matrix end-to-end: a command × shell × width
+cross-product usually measures fixture and process setup, not another product
+behavior.
+
+Equivalent coverage or identical snapshots are useful duplication signals, not
+automatic deletion rules. Before removing a test, identify the belief it owns
+and make sure another test proves that belief at an equal or better boundary.
+
+Assert semantics through state, structured values, and exit status; snapshot
+the pragmatic user experience when the complete rendering is the contract. A
+custom verifier must fail for every violation it claims to check—diagnostic
+`println!` output is not an oracle.
+
### Snapshot env drift: cosmetic vs. a leak
`insta_cmd` snapshots record the test's environment variables in an `env:`
@@ -611,7 +558,7 @@ To update existing file-based snapshots (e.g., after editing CLI help text),
use `cargo insta test --accept`:
```bash
-cargo insta test --accept -- --test integration "test_help"
+cargo insta test --accept --test integration -- test_help
```
Do not manually edit `.snap` files — they contain ANSI escape sequences that
@@ -624,6 +571,11 @@ the code. A test named `test_wrap_text_at_width` that exercises short text, long
text, single words, and edge cases is better than five separate test functions
testing each input individually.
+Use the minimum sufficient contrasts: one anchor case, then one case that
+changes only the factor needed for each additional claim. A new test earns a
+separate function when it has a distinct setup, oracle, or failure diagnosis—
+not merely another input label or production branch.
+
```rust
// ✅ GOOD: One test for the belief "wrapping respects word boundaries"
#[test]
diff --git a/tests/integration_tests/column_alignment_verification.rs b/tests/integration_tests/column_alignment_verification.rs
deleted file mode 100644
index f3a47f4ee..000000000
--- a/tests/integration_tests/column_alignment_verification.rs
+++ /dev/null
@@ -1,447 +0,0 @@
-//! Column Alignment Verification Tests
-//!
-//! NOTE: These tests may appear duplicative with snapshot tests, but they serve a critical purpose.
-//! LLMs are poor at assessing precise positional/alignment values in text snapshots. When reviewing
-//! snapshot changes, an LLM might approve misaligned columns that look "close enough" visually.
-//!
-//! These imperative tests explicitly verify that:
-//! - Column headers and data align at exact character positions
-//! - Unicode width calculations are correct (not just byte lengths)
-//! - Sparse columns (empty cells) don't break alignment
-//!
-//! The detailed verification logic here catches alignment bugs that would slip through snapshot review.
-
-use crate::common::{TestRepo, repo, wt_command};
-use ansi_str::AnsiStr;
-use rstest::rstest;
-use unicode_width::UnicodeWidthStr;
-
-/// Represents the start position of each column in a table row
-#[derive(Debug, Clone)]
-struct ColumnPositions {
- age: Option<usize>,
- cmt_diff: Option<usize>,
- wt_diff: Option<usize>,
- remote: Option<usize>,
- commit: Option<usize>,
- message: Option<usize>,
- path: Option<usize>,
-}
-
-impl ColumnPositions {
- /// Parse column positions from a header line (without ANSI codes)
- /// Returns positions as display column indices, not byte indices
- fn from_header(header: &str) -> Self {
- let mut positions = ColumnPositions {
- age: None,
- cmt_diff: None,
- wt_diff: None,
- remote: None,
- commit: None,
- message: None,
- path: None,
- };
-
- // Helper to convert byte position to display position
- let byte_to_display_pos = |byte_pos: usize| -> usize { header[..byte_pos].width() };
-
- // Find column headers by their known names
- // Note: str.find() returns byte positions, we need display positions
- if let Some(byte_pos) = header.find("Age") {
- positions.age = Some(byte_to_display_pos(byte_pos));
- }
- if let Some(byte_pos) = header.find("main↕") {
- positions.cmt_diff = Some(byte_to_display_pos(byte_pos));
- }
- if let Some(byte_pos) = header.find("HEAD±") {
- positions.wt_diff = Some(byte_to_display_pos(byte_pos));
- }
- if let Some(byte_pos) = header.find("Remote") {
- positions.remote = Some(byte_to_display_pos(byte_pos));
- }
- if let Some(byte_pos) = header.find("Commit") {
- positions.commit = Some(byte_to_display_pos(byte_pos));
- }
- if let Some(byte_pos) = header.find("Message") {
- positions.message = Some(byte_to_display_pos(byte_pos));
- }
- if let Some(byte_pos) = header.find("Path") {
- positions.path = Some(byte_to_display_pos(byte_pos));
- }
-
- positions
- }
-}
-
-/// Extract column boundaries by finding transitions from content to spaces
-/// This is a more sophisticated approach that handles sparse columns
-/// Positions are in display columns, not character or byte indices
-#[derive(Debug, Clone)]
-struct ColumnBoundary {
- start: usize, // Display column position
- end: usize, // Display column position
- content: String,
-}
-
-fn find_column_boundaries(line: &str) -> Vec<ColumnBoundary> {
- let mut boundaries = Vec::new();
- let chars: Vec<char> = line.chars().collect();
- let mut char_idx = 0;
- let mut display_pos = 0;
-
- while char_idx < chars.len() {
- // Skip leading spaces
- while char_idx < chars.len() && chars[char_idx] == ' ' {
- char_idx += 1;
- display_pos += 1;
- }
-
- if char_idx >= chars.len() {
- break;
- }
-
- // Found start of content
- let start_display_pos = display_pos;
- let mut content = String::new();
-
- // Collect content until we hit 2+ consecutive spaces or end
- while char_idx < chars.len() {
- if chars[char_idx] == ' ' {
- // Check if this is a column separator (2+ spaces)
- let mut space_count = 0;
- let mut j = char_idx;
- while j < chars.len() && chars[j] == ' ' {
- space_count += 1;
- j += 1;
- }
-
- if space_count >= 2 {
- // This is a separator
- break;
- } else {
- // Single space within content
- content.push(chars[char_idx]);
- char_idx += 1;
- display_pos += 1;
- }
- } else {
- let ch = chars[char_idx];
- content.push(ch);
- char_idx += 1;
- // Add display width of this character
- display_pos += UnicodeWidthStr::width(ch.to_string().as_str());
- }
- }
-
- boundaries.push(ColumnBoundary {
- start: start_display_pos,
- end: display_pos,
- content: content.trim_end().to_string(),
- });
- }
-
- boundaries
-}
-
-/// Verify that all data rows have columns starting at the same positions as the header
-fn verify_table_alignment(output: &str) -> Result<(), String> {
- let lines: Vec<&str> = output.lines().collect();
-
- if lines.is_empty() {
- return Err("No output to verify".to_string());
- }
-
- // Strip ANSI codes from all lines
- let stripped_lines: Vec<String> = lines.iter().map(|l| l.ansi_strip().into_owned()).collect();
-
- if stripped_lines.is_empty() {
- return Err("No lines after stripping ANSI codes".to_string());
- }
-
- // First line is the header
- let header = &stripped_lines[0];
- let header_positions = ColumnPositions::from_header(header);
-
- println!("\n=== Table Alignment Verification ===");
- println!("Header: {}", header);
- println!("Header length: {}", header.width());
- println!("Header positions: {:?}", header_positions);
- println!();
-
- // Verify each data row
- let mut errors = Vec::new();
- for (idx, row) in stripped_lines.iter().skip(1).enumerate() {
- if row.trim().is_empty() {
- continue;
- }
-
- let row_num = idx + 1;
- println!("Row {}: {}", row_num, row);
- println!(" Length: {}", row.width());
-
- // Find column boundaries in this row
- let boundaries = find_column_boundaries(row);
- println!(" Boundaries: {:?}", boundaries);
-
- // CRITICAL CHECK: Verify that each column starts at the EXACT same position as in the header
- // This is the key test for the alignment bug
-
- // Check all defined columns
- let positions = [
- ("Branch", Some(0usize)), // Branch always starts at 0
- ("Age", header_positions.age),
- ("main↕", header_positions.cmt_diff),
- ("HEAD±", header_positions.wt_diff),
- ("Remote", header_positions.remote),
- ("Commit", header_positions.commit),
- ("Message", header_positions.message),
- ("Path", header_positions.path),
- ];
-
- for (col_name, maybe_pos) in positions.iter() {
- if let Some(expected_pos) = maybe_pos {
- // Find if content or padding starts at this position
- // A column should either:
- // 1. Have content starting exactly at expected_pos
- // 2. Have padding (spaces) at expected_pos if the cell is empty
-
- let actual_content_pos = boundaries
- .iter()
- .find(|b| b.start <= *expected_pos && b.end > *expected_pos)
- .map(|b| b.start);
-
- // For the Path column specifically, verify it starts exactly where the header says
- if *col_name == "Path" {
- // Find where the actual path content starts (typically "./")
- // We need to convert from display position to check the content
- if let Some(path_boundary) = boundaries.iter().find(|b| {
- b.start <= *expected_pos
- && b.end > *expected_pos
- && b.content.starts_with("./")
- }) && path_boundary.start != *expected_pos
- {
- errors.push(format!(
- "Row {}: Path column content starts at display position {} but header says it should be at {}. Misalignment: {} characters.\n Row text: '{}'\n Path content: '{}'",
- row_num,
- path_boundary.start,
- expected_pos,
- path_boundary.start.abs_diff(*expected_pos),
- row,
- path_boundary.content
- ));
- }
- }
-
- // For all columns, check that content starts at a consistent position
- if let Some(actual_start) = actual_content_pos
- && actual_start != *expected_pos
- {
- // Only report if this is actual content, not just padding
- let content_at_pos = boundaries
- .iter()
- .find(|b| b.start == actual_start)
- .map(|b| &b.content);
-
- if let Some(content) = content_at_pos
- && !content.is_empty()
- && content.trim() != ""
- {
- println!(
- " ⚠️ Column '{}': content starts at {} instead of {} (content: '{}')",
- col_name, actual_start, expected_pos, content
- );
- }
- }
- }
- }
-
- println!();
- }
-
- if !errors.is_empty() {
- Err(format!(
- "\n=== ALIGNMENT ERRORS ===\n{}\n",
- errors.join("\n\n")
- ))
- } else {
- println!("✓ All rows properly aligned");
- Ok(())
- }
-}
-
-#[rstest]
-fn test_alignment_verification_with_varying_content(mut repo: TestRepo) {
- // Create diverse worktrees to test alignment
- repo.add_worktree("main-feature");
- repo.add_worktree("short");
- repo.add_worktree("very-long");
-
- // Add files to create working tree diffs
- let feature_path = repo.worktrees.get("main-feature").unwrap();
- for i in 0..10 {
- std::fs::write(feature_path.join(format!("file{}.txt", i)), "content").unwrap();
- }
-
- let short_path = repo.worktrees.get("short").unwrap();
- std::fs::write(short_path.join("single.txt"), "x").unwrap();
-
- // Run wt list and capture output
- let mut cmd = wt_command();
- repo.configure_wt_cmd(&mut cmd);
- cmd.arg("list").current_dir(repo.root_path());
-
- let output = cmd.output().unwrap();
- let stdout = String::from_utf8_lossy(&output.stdout);
-
- println!("=== RAW OUTPUT ===");
- println!("{}", stdout);
- println!("==================");
-
- // Verify alignment
- match verify_table_alignment(&stdout) {
- Ok(()) => println!("\n✓ Alignment verification passed"),
- Err(e) => panic!("\n{}", e),
- }
-}
-
-#[rstest]
-fn test_alignment_with_unicode_content(mut repo: TestRepo) {
- repo.commit("Initial commit with émoji 🎉");
-
- // Create worktrees with unicode in names
- repo.add_worktree("cafe");
- repo.add_worktree("naive");
- repo.add_worktree("resume");
-
- // Run wt list
- let mut cmd = wt_command();
- repo.configure_wt_cmd(&mut cmd);
- cmd.arg("list").current_dir(repo.root_path());
-
- let output = cmd.output().unwrap();
- let stdout = String::from_utf8_lossy(&output.stdout);
-
- println!("=== RAW OUTPUT WITH UNICODE ===");
- println!("{}", stdout);
- println!("================================");
-
- // Verify alignment
- match verify_table_alignment(&stdout) {
- Ok(()) => println!("\n✓ Unicode alignment verification passed"),
- Err(e) => panic!("\n{}", e),
- }
-}
-
-#[rstest]
-fn test_alignment_with_sparse_columns(mut repo: TestRepo) {
- // Create mix of worktrees - some with diffs, some without
- repo.add_worktree("no-changes-1");
-
- repo.add_worktree("with-changes");
- let changes_path = repo.worktrees.get("with-changes").unwrap();
- for i in 0..100 {
- std::fs::write(changes_path.join(format!("file{}.txt", i)), "content").unwrap();
- }
-
- repo.add_worktree("no-changes-2");
-
- repo.add_worktree("small-change");
- let small_path = repo.worktrees.get("small-change").unwrap();
- std::fs::write(small_path.join("one.txt"), "x").unwrap();
-
- // Run wt list
- let mut cmd = wt_command();
- repo.configure_wt_cmd(&mut cmd);
- cmd.arg("list").current_dir(repo.root_path());
-
- let output = cmd.output().unwrap();
- let stdout = String::from_utf8_lossy(&output.stdout);
-
- println!("=== RAW OUTPUT WITH SPARSE COLUMNS ===");
- println!("{}", stdout);
- println!("=======================================");
-
- // Verify alignment - this is where the bug should show up
- match verify_table_alignment(&stdout) {
- Ok(()) => println!("\n✓ Sparse column alignment verification passed"),
- Err(e) => panic!("\n{}", e),
- }
-}
-
-#[rstest]
-fn test_alignment_real_world_scenario(mut repo: TestRepo) {
- // Create feature branches with varying amounts of working tree changes
- // This simulates a real-world scenario with different diff sizes
- repo.add_worktree("feature-tiny");
- let tiny_path = repo.worktrees.get("feature-tiny").unwrap();
- std::fs::write(tiny_path.join("file.txt"), "x").unwrap();
-
- repo.add_worktree("feature-small");
- let small_path = repo.worktrees.get("feature-small").unwrap();
- for i in 0..10 {
- std::fs::write(small_path.join(format!("file{}.txt", i)), "content").unwrap();
- }
-
- repo.add_worktree("feature-medium");
- let medium_path = repo.worktrees.get("feature-medium").unwrap();
- for i in 0..100 {
- std::fs::write(medium_path.join(format!("file{}.txt", i)), "content").unwrap();
- }
-
- repo.add_worktree("feature-large");
- let large_path = repo.worktrees.get("feature-large").unwrap();
- for i in 0..1000 {
- std::fs::write(large_path.join(format!("file{}.txt", i)), "content").unwrap();
- }
-
- repo.add_worktree("no-changes");
- // No changes on this one
-
- // Run wt list at a width where Dirty column is visible
- let mut cmd = wt_command();
- repo.configure_wt_cmd(&mut cmd);
- cmd.arg("list").current_dir(repo.root_path());
-
- let output = cmd.output().unwrap();
- let stdout = String::from_utf8_lossy(&output.stdout);
-
- println!("=== RAW OUTPUT: Real World Scenario ===");
- println!("{}", stdout);
- println!("========================================");
-
- // Verify alignment - this should catch the Path column misalignment bug
- match verify_table_alignment(&stdout) {
- Ok(()) => println!("\n✓ Real world scenario alignment verification passed"),
- Err(e) => panic!("\n{}", e),
- }
-}
-
-#[rstest]
-fn test_alignment_at_different_terminal_widths(mut repo: TestRepo) {
- repo.add_worktree("feature-a");
- repo.add_worktree("feature-b");
-
- let path_a = repo.worktrees.get("feature-a").unwrap();
- std::fs::write(path_a.join("file.txt"), "content").unwrap();
-
- // Test at multiple terminal widths
- for width in [80, 120, 150, 200] {
- println!("\n### Testing at width {} ###", width);
-
- let mut cmd = wt_command();
- repo.configure_wt_cmd(&mut cmd);
- cmd.arg("list")
- .current_dir(repo.root_path())
- .env("COLUMNS", width.to_string());
-
- let output = cmd.output().unwrap();
- let stdout = String::from_utf8_lossy(&output.stdout);
-
- println!("{}", stdout);
-
- match verify_table_alignment(&stdout) {
- Ok(()) => println!("✓ Width {} aligned correctly", width),
- Err(e) => panic!("\nWidth {} failed:\n{}", width, e),
- }
- }
-}
diff --git a/tests/integration_tests/git_error_display.rs b/tests/integration_tests/git_error_display.rs
index 89ef7c539..42b4b42e2 100644
--- a/tests/integration_tests/git_error_display.rs
+++ b/tests/integration_tests/git_error_display.rs
@@ -1,579 +1,442 @@
use insta::assert_snapshot;
use std::path::PathBuf;
use worktrunk::git::{
- Diagnostic, FailedCommand, GitError, HookErrorWithHint, HookType, WorktrunkError,
+ Diagnostic, FailedCommand, GitError, HookErrorWithHint, HookType, RefType, WorktrunkError,
add_hook_skip_hint,
};
-// ============================================================================
-// Worktree errors
-// ============================================================================
-
-#[test]
-fn display_worktree_removal_failed() {
- let err = GitError::WorktreeRemovalFailed {
- branch: "feature-x".into(),
- path: PathBuf::from("/tmp/repo.feature-x"),
- error: "fatal: worktree is dirty\nerror: could not remove worktree".into(),
- remaining_entries: None,
- };
-
- assert_snapshot!("worktree_removal_failed", err.render());
-}
-
-#[test]
-fn display_worktree_removal_failed_directory_not_empty() {
- let err = GitError::WorktreeRemovalFailed {
- branch: "feature-x".into(),
- path: PathBuf::from("/tmp/repo.feature-x"),
- error: "error: failed to delete '/tmp/repo.feature-x': Directory not empty".into(),
- remaining_entries: Some(vec![
- ".vite/".into(),
- "node_modules/".into(),
- "target/".into(),
- ]),
- };
-
- assert_snapshot!("worktree_removal_failed_directory_not_empty", err.render());
-}
-
-#[test]
-fn display_worktree_removal_failed_with_remaining_entries() {
- let err = GitError::WorktreeRemovalFailed {
- branch: "feature-x".into(),
- path: PathBuf::from("/tmp/repo.feature-x"),
- error: "error: failed to remove '/tmp/repo.feature-x/target': Permission denied".into(),
- remaining_entries: Some(vec!["target/".into()]),
- };
-
- assert_snapshot!(
- "worktree_removal_failed_with_remaining_entries",
- err.render()
- );
-}
-
-#[test]
-fn display_worktree_removal_failed_many_remaining_entries() {
- let err = GitError::WorktreeRemovalFailed {
- branch: "feature-x".into(),
- path: PathBuf::from("/tmp/repo.feature-x"),
- error: "error: failed to delete '/tmp/repo.feature-x': Directory not empty".into(),
- remaining_entries: Some((0..15).map(|i| format!("dir-{i:02}/")).collect()),
- };
-
- assert_snapshot!(
- "worktree_removal_failed_many_remaining_entries",
- err.render()
- );
-}
-
-#[test]
-fn display_worktree_creation_failed() {
- let err = GitError::WorktreeCreationFailed {
- branch: "feature-y".into(),
- base_branch: Some("main".into()),
- error: "fatal: '/tmp/repo.feature-y' already exists".into(),
- command: None,
- };
-
- assert_snapshot!("worktree_creation_failed", err.render());
-}
-
-#[test]
-fn display_worktree_creation_failed_with_command() {
- let err = GitError::WorktreeCreationFailed {
- branch: "fix".into(),
- base_branch: Some("main".into()),
- error: "Preparing worktree (new branch 'fix')\nfatal: cannot lock ref 'refs/heads/fix'"
- .into(),
- command: Some(FailedCommand {
- command: "git worktree add /tmp/repo.fix -b fix main".into(),
- exit_info: "exit code 128".into(),
- }),
- };
-
- assert_snapshot!("worktree_creation_failed_with_command", err.render());
-}
-
-#[test]
-fn display_worktree_missing() {
- let err = GitError::WorktreeMissing {
- branch: "stale-branch".into(),
- };
-
- assert_snapshot!("worktree_missing", err.render());
-}
-
-#[test]
-fn branch_not_found() {
- let err = GitError::BranchNotFound {
- branch: "nonexistent".into(),
- show_create_hint: true,
- last_fetch_ago: None,
- pr_mr_platform: None,
- };
-
- assert_snapshot!("branch_not_found", err.render());
-}
-
-#[test]
-fn branch_not_found_with_fetch_time() {
- let err = GitError::BranchNotFound {
- branch: "nonexistent".into(),
- show_create_hint: true,
- last_fetch_ago: Some("last fetched 3h ago".into()),
- pr_mr_platform: None,
- };
-
- assert_snapshot!("branch_not_found_with_fetch_time", err.render());
-}
-
-#[test]
-fn branch_not_found_no_create_hint() {
- let err = GitError::BranchNotFound {
- branch: "nonexistent".into(),
- show_create_hint: false,
- last_fetch_ago: None,
- pr_mr_platform: None,
- };
-
- assert_snapshot!("branch_not_found_no_create_hint", err.render());
-}
-
-#[test]
-fn branch_not_found_numeric_unknown_platform() {
- // Purely numeric name with unknown platform: hint suggests both `pr:N` and `mr:N`.
- let err = GitError::BranchNotFound {
- branch: "2474".into(),
- show_create_hint: true,
- last_fetch_ago: None,
- pr_mr_platform: None,
- };
-
- assert_snapshot!("branch_not_found_numeric_unknown_platform", err.render());
-}
-
-#[test]
-fn branch_not_found_numeric_github() {
- use worktrunk::git::RefType;
- let err = GitError::BranchNotFound {
- branch: "2474".into(),
- show_create_hint: true,
- last_fetch_ago: Some("last fetched 9h ago".into()),
- pr_mr_platform: Some(RefType::Pr),
- };
-
- assert_snapshot!("branch_not_found_numeric_github", err.render());
-}
-
-#[test]
-fn branch_not_found_numeric_gitlab() {
- use worktrunk::git::RefType;
- let err = GitError::BranchNotFound {
- branch: "2474".into(),
- show_create_hint: true,
- last_fetch_ago: None,
- pr_mr_platform: Some(RefType::Mr),
- };
-
- assert_snapshot!("branch_not_found_numeric_gitlab", err.render());
-}
-
-#[test]
-fn display_worktree_path_occupied() {
- let err = GitError::WorktreePathOccupied {
- branch: "feature-z".into(),
- path: PathBuf::from("/tmp/repo.feature-z"),
- occupant: Some("other-branch".into()),
- };
-
- assert_snapshot!("worktree_path_occupied", err.render());
-}
-
-#[test]
-fn display_worktree_path_exists() {
- let err = GitError::WorktreePathExists {
- branch: "feature".to_string(),
- path: PathBuf::from("/tmp/repo.feature"),
- create: false,
- };
-
- assert_snapshot!("worktree_path_exists", err.render());
-}
-
-#[test]
-fn display_cannot_remove_main_worktree() {
- let err = GitError::CannotRemoveMainWorktree;
-
- assert_snapshot!("cannot_remove_main_worktree", err.render());
-}
-
-// ============================================================================
-// Git state errors
-// ============================================================================
-
-#[test]
-fn display_detached_head() {
- let err = GitError::DetachedHead {
- action: Some("merge".into()),
- };
-
- assert_snapshot!("detached_head", err.render());
+fn render_cases(cases: impl IntoIterator<Item = (&'static str, String)>) -> String {
+ cases
+ .into_iter()
+ .map(|(name, output)| format!("## {name}\n\n{output}"))
+ .collect::<Vec<_>>()
+ .join("\n\n")
}
#[test]
-fn display_detached_head_no_action() {
- let err = GitError::DetachedHead { action: None };
+fn worktree_errors_render() {
+ let cases = [
+ (
+ "removal failed",
+ GitError::WorktreeRemovalFailed {
+ branch: "feature-x".into(),
+ path: PathBuf::from("/tmp/repo.feature-x"),
+ error: "fatal: worktree is dirty\nerror: could not remove worktree".into(),
+ remaining_entries: None,
+ }
+ .render(),
+ ),
+ (
+ "removal left directories",
+ GitError::WorktreeRemovalFailed {
+ branch: "feature-x".into(),
+ path: PathBuf::from("/tmp/repo.feature-x"),
+ error: "error: failed to delete '/tmp/repo.feature-x': Directory not empty".into(),
+ remaining_entries: Some(vec![
+ ".vite/".into(),
+ "node_modules/".into(),
+ "target/".into(),
+ ]),
+ }
+ .render(),
+ ),
+ (
+ "removal left one entry",
+ GitError::WorktreeRemovalFailed {
+ branch: "feature-x".into(),
+ path: PathBuf::from("/tmp/repo.feature-x"),
+ error: "error: failed to remove '/tmp/repo.feature-x/target': Permission denied"
+ .into(),
+ remaining_entries: Some(vec!["target/".into()]),
+ }
+ .render(),
+ ),
+ (
+ "removal truncates a long entry list",
+ GitError::WorktreeRemovalFailed {
+ branch: "feature-x".into(),
+ path: PathBuf::from("/tmp/repo.feature-x"),
+ error: "error: failed to delete '/tmp/repo.feature-x': Directory not empty".into(),
+ remaining_entries: Some((0..15).map(|i| format!("dir-{i:02}/")).collect()),
+ }
+ .render(),
+ ),
+ (
+ "creation failed",
+ GitError::WorktreeCreationFailed {
+ branch: "feature-y".into(),
+ base_branch: Some("main".into()),
+ error: "fatal: '/tmp/repo.feature-y' already exists".into(),
+ command: None,
+ }
+ .render(),
+ ),
+ (
+ "creation failed with command",
+ GitError::WorktreeCreationFailed {
+ branch: "fix".into(),
+ base_branch: Some("main".into()),
+ error:
+ "Preparing worktree (new branch 'fix')\nfatal: cannot lock ref 'refs/heads/fix'"
+ .into(),
+ command: Some(FailedCommand {
+ command: "git worktree add /tmp/repo.fix -b fix main".into(),
+ exit_info: "exit code 128".into(),
+ }),
+ }
+ .render(),
+ ),
+ (
+ "worktree missing",
+ GitError::WorktreeMissing {
+ branch: "stale-branch".into(),
+ }
+ .render(),
+ ),
+ (
+ "branch not found",
+ GitError::BranchNotFound {
+ branch: "nonexistent".into(),
+ show_create_hint: true,
+ last_fetch_ago: None,
+ pr_mr_platform: None,
+ }
+ .render(),
+ ),
+ (
+ "branch not found after stale fetch",
+ GitError::BranchNotFound {
+ branch: "nonexistent".into(),
+ show_create_hint: true,
+ last_fetch_ago: Some("last fetched 3h ago".into()),
+ pr_mr_platform: None,
+ }
+ .render(),
+ ),
+ (
+ "branch not found without create hint",
+ GitError::BranchNotFound {
+ branch: "nonexistent".into(),
+ show_create_hint: false,
+ last_fetch_ago: None,
+ pr_mr_platform: None,
+ }
+ .render(),
+ ),
+ (
+ "numeric branch on unknown forge",
+ GitError::BranchNotFound {
+ branch: "2474".into(),
+ show_create_hint: true,
+ last_fetch_ago: None,
+ pr_mr_platform: None,
+ }
+ .render(),
+ ),
+ (
+ "numeric branch on GitHub",
+ GitError::BranchNotFound {
+ branch: "2474".into(),
+ show_create_hint: true,
+ last_fetch_ago: Some("last fetched 9h ago".into()),
+ pr_mr_platform: Some(RefType::Pr),
+ }
+ .render(),
+ ),
+ (
+ "numeric branch on GitLab",
+ GitError::BranchNotFound {
+ branch: "2474".into(),
+ show_create_hint: true,
+ last_fetch_ago: None,
+ pr_mr_platform: Some(RefType::Mr),
+ }
+ .render(),
+ ),
+ (
+ "worktree path occupied",
+ GitError::WorktreePathOccupied {
+ branch: "feature-z".into(),
+ path: PathBuf::from("/tmp/repo.feature-z"),
+ occupant: Some("other-branch".into()),
+ }
+ .render(),
+ ),
+ (
+ "worktree path exists",
+ GitError::WorktreePathExists {
+ branch: "feature".into(),
+ path: PathBuf::from("/tmp/repo.feature"),
+ create: false,
+ }
+ .render(),
+ ),
+ (
+ "cannot remove main worktree",
+ GitError::CannotRemoveMainWorktree.render(),
+ ),
+ ];
- assert_snapshot!("detached_head_no_action", err.render());
+ assert_snapshot!("worktree_errors", render_cases(cases));
}
-/// The refusal names the blocked action and defers to `git status` for what is
-/// open and how to leave it, so no operation appears in the message at all.
#[test]
-fn display_operation_in_progress() {
- let rendered: Vec<String> = ["rebase", "merge"]
- .into_iter()
- .map(|action| {
+fn git_state_errors_render() {
+ let cases = [
+ (
+ "detached HEAD while merging",
+ GitError::DetachedHead {
+ action: Some("merge".into()),
+ }
+ .render(),
+ ),
+ (
+ "detached HEAD without action",
+ GitError::DetachedHead { action: None }.render(),
+ ),
+ (
+ "rebase in progress",
GitError::OperationInProgress {
- action: action.into(),
+ action: "rebase".into(),
}
- .render()
- })
- .collect();
-
- assert_snapshot!("operation_in_progress", rendered.join("\n\n"));
-}
-
-#[test]
-fn display_uncommitted_changes() {
- let err = GitError::UncommittedChanges {
- action: Some("remove worktree".into()),
- branch: None,
- force_hint: false,
- dirty_files: Vec::new(),
- };
-
- assert_snapshot!("uncommitted_changes", err.render());
-}
-
-#[test]
-fn display_uncommitted_changes_with_branch() {
- let err = GitError::UncommittedChanges {
- action: Some("remove worktree".into()),
- branch: Some("feature-branch".into()),
- force_hint: false,
- dirty_files: Vec::new(),
- };
-
- assert_snapshot!("uncommitted_changes_with_branch", err.render());
-}
-
-#[test]
-fn display_uncommitted_changes_with_force_hint() {
- let err = GitError::UncommittedChanges {
- action: Some("remove worktree".into()),
- branch: Some("feature-branch".into()),
- force_hint: true,
- dirty_files: Vec::new(),
- };
-
- assert_snapshot!("uncommitted_changes_with_force_hint", err.render());
-}
-
-#[test]
-fn display_uncommitted_changes_with_dirty_files() {
- let err = GitError::UncommittedChanges {
- action: Some("remove worktree after merge".into()),
- branch: Some("feature-auth".into()),
- force_hint: false,
- dirty_files: vec![" M auth.rs".into(), "?? .DS_Store".into()],
- };
-
- assert_snapshot!("uncommitted_changes_with_dirty_files", err.render());
-}
-
-#[test]
-fn display_branch_already_exists() {
- let err = GitError::BranchAlreadyExists {
- branch: "feature".into(),
- };
-
- assert_snapshot!("branch_already_exists", err.render());
-}
-
-// ============================================================================
-// Merge/push errors
-// ============================================================================
-
-#[test]
-fn display_push_failed() {
- let err = GitError::PushFailed {
- target_branch: "main".into(),
- error: "To /Users/user/workspace/repo/.git\n ! [remote rejected] HEAD -> main (Up-to-date check failed)\nerror: failed to push some refs to '/Users/user/workspace/repo/.git'".into(),
- };
-
- assert_snapshot!("push_failed", err.render());
-}
-
-#[test]
-fn display_conflicting_changes() {
- let err = GitError::ConflictingChanges {
- target_branch: "main".into(),
- files: vec!["src/main.rs".into(), "src/lib.rs".into()],
- worktree_path: PathBuf::from("/tmp/repo.main"),
- };
-
- assert_snapshot!("conflicting_changes", err.render());
-}
-
-#[test]
-fn display_not_fast_forward() {
- let err = GitError::NotFastForward {
- target_branch: "main".into(),
- commits_formatted: "abc1234 Fix bug\ndef5678 Add feature".into(),
- in_merge_context: false,
- };
-
- assert_snapshot!("not_fast_forward", err.render());
-}
-
-#[test]
-fn display_not_fast_forward_merge_context() {
- let err = GitError::NotFastForward {
- target_branch: "main".into(),
- commits_formatted: "abc1234 New commit on main".into(),
- in_merge_context: true,
- };
-
- assert_snapshot!("not_fast_forward_merge_context", err.render());
-}
-
-#[test]
-fn display_rebase_conflict() {
- let err = GitError::RebaseConflict {
- target_branch: "main".into(),
- git_output: "CONFLICT (content): Merge conflict in src/main.rs".into(),
- };
-
- assert_snapshot!("rebase_conflict", err.render());
-}
-
-// ============================================================================
-// Validation/other errors
-// ============================================================================
-
-#[test]
-fn display_not_interactive() {
- let err = GitError::NotInteractive;
-
- assert_snapshot!("not_interactive", err.render());
-}
-
-#[test]
-fn display_llm_command_failed() {
- let err = GitError::LlmCommandFailed {
- command: "llm --model claude".into(),
- error: "Error: API key not found".into(),
- reproduction_command: None,
- };
-
- assert_snapshot!("llm_command_failed", err.render());
-}
-
-#[test]
-fn display_llm_command_failed_with_reproduction() {
- let err = GitError::LlmCommandFailed {
- command: "llm --model claude".into(),
- error: "Error: API key not found".into(),
- reproduction_command: Some("wt step commit --show-prompt | llm --model claude".into()),
- };
-
- assert_snapshot!("llm_command_failed_with_reproduction", err.render());
-}
-
-#[test]
-fn display_project_config_not_found() {
- let err = GitError::ProjectConfigNotFound {
- config_path: PathBuf::from("/tmp/repo/.config/wt.toml"),
- };
-
- assert_snapshot!("project_config_not_found", err.render());
-}
-
-#[test]
-fn display_parse_error() {
- let err = GitError::ParseError {
- message: "Invalid branch name format".into(),
- };
-
- assert_snapshot!("parse_error", err.render());
-}
-
-#[test]
-fn display_remote_only_branch() {
- let err = GitError::RemoteOnlyBranch {
- branch: "feature".into(),
- remote: "origin".into(),
- };
+ .render(),
+ ),
+ (
+ "merge in progress",
+ GitError::OperationInProgress {
+ action: "merge".into(),
+ }
+ .render(),
+ ),
+ (
+ "uncommitted changes",
+ GitError::UncommittedChanges {
+ action: Some("remove worktree".into()),
+ branch: None,
+ force_hint: false,
+ dirty_files: Vec::new(),
+ }
+ .render(),
+ ),
+ (
+ "uncommitted changes on named branch",
+ GitError::UncommittedChanges {
+ action: Some("remove worktree".into()),
+ branch: Some("feature-branch".into()),
+ force_hint: false,
+ dirty_files: Vec::new(),
+ }
+ .render(),
+ ),
+ (
+ "uncommitted changes with force hint",
+ GitError::UncommittedChanges {
+ action: Some("remove worktree".into()),
+ branch: Some("feature-branch".into()),
+ force_hint: true,
+ dirty_files: Vec::new(),
+ }
+ .render(),
+ ),
+ (
+ "uncommitted changes with dirty files",
+ GitError::UncommittedChanges {
+ action: Some("remove worktree after merge".into()),
+ branch: Some("feature-auth".into()),
+ force_hint: false,
+ dirty_files: vec![" M auth.rs".into(), "?? .DS_Store".into()],
+ }
+ .render(),
+ ),
+ (
+ "branch already exists",
+ GitError::BranchAlreadyExists {
+ branch: "feature".into(),
+ }
+ .render(),
+ ),
+ ];
- assert_snapshot!("remote_only_branch", err.render());
+ assert_snapshot!("git_state_errors", render_cases(cases));
}
#[test]
-fn display_other() {
- let err = GitError::Other {
- message: "Unexpected git error".into(),
- };
+fn integration_errors_render() {
+ let cases = [
+ (
+ "push failed",
+ GitError::PushFailed {
+ target_branch: "main".into(),
+ error: "To /Users/user/workspace/repo/.git\n ! [remote rejected] HEAD -> main (Up-to-date check failed)\nerror: failed to push some refs to '/Users/user/workspace/repo/.git'".into(),
+ }
+ .render(),
+ ),
+ (
+ "conflicting changes",
+ GitError::ConflictingChanges {
+ target_branch: "main".into(),
+ files: vec!["src/main.rs".into(), "src/lib.rs".into()],
+ worktree_path: PathBuf::from("/tmp/repo.main"),
+ }
+ .render(),
+ ),
+ (
+ "not fast-forward",
+ GitError::NotFastForward {
+ target_branch: "main".into(),
+ commits_formatted: "abc1234 Fix bug\ndef5678 Add feature".into(),
+ in_merge_context: false,
+ }
+ .render(),
+ ),
+ (
+ "not fast-forward during merge",
+ GitError::NotFastForward {
+ target_branch: "main".into(),
+ commits_formatted: "abc1234 New commit on main".into(),
+ in_merge_context: true,
+ }
+ .render(),
+ ),
+ (
+ "rebase conflict",
+ GitError::RebaseConflict {
+ target_branch: "main".into(),
+ git_output: "CONFLICT (content): Merge conflict in src/main.rs".into(),
+ }
+ .render(),
+ ),
+ ];
- assert_snapshot!("other", err.render());
+ assert_snapshot!("integration_errors", render_cases(cases));
}
-// ============================================================================
-// WorktrunkError display tests
-// ============================================================================
-
#[test]
-fn display_hook_command_failed_with_name() {
- let err = WorktrunkError::HookCommandFailed {
+fn command_errors_render() {
+ let hook_with_name = WorktrunkError::HookCommandFailed {
hook_type: HookType::PreMerge,
command_name: Some("test".into()),
error: "exit code 1".into(),
exit_code: Some(1),
};
-
- assert_snapshot!("hook_command_failed_with_name", err.render());
-}
-
-#[test]
-fn display_hook_command_failed_without_name() {
- let err = WorktrunkError::HookCommandFailed {
+ let hook_without_name = WorktrunkError::HookCommandFailed {
hook_type: HookType::PreCreate,
command_name: None,
error: "command not found".into(),
exit_code: Some(127),
};
+ let hook_with_hint = add_hook_skip_hint(
+ WorktrunkError::HookCommandFailed {
+ hook_type: HookType::PreMerge,
+ command_name: Some("test".into()),
+ error: "exit code 1".into(),
+ exit_code: Some(1),
+ }
+ .into(),
+ );
- assert_snapshot!("hook_command_failed_without_name", err.render());
-}
-
-/// Shows the complete error with hint, as users would see it.
-#[test]
-fn display_hook_command_failed_with_skip_hint() {
- let err: anyhow::Error = WorktrunkError::HookCommandFailed {
- hook_type: HookType::PreMerge,
- command_name: Some("test".into()),
- error: "exit code 1".into(),
- exit_code: Some(1),
- }
- .into();
-
- // Wrap with hint (as done by commands supporting --no-hooks)
- let err_with_hint = add_hook_skip_hint(err);
+ let cases = [
+ ("non-interactive", GitError::NotInteractive.render()),
+ (
+ "LLM command failed",
+ GitError::LlmCommandFailed {
+ command: "llm --model claude".into(),
+ error: "Error: API key not found".into(),
+ reproduction_command: None,
+ }
+ .render(),
+ ),
+ (
+ "LLM command failed with reproduction",
+ GitError::LlmCommandFailed {
+ command: "llm --model claude".into(),
+ error: "Error: API key not found".into(),
+ reproduction_command: Some(
+ "wt step commit --show-prompt | llm --model claude".into(),
+ ),
+ }
+ .render(),
+ ),
+ (
+ "project config missing",
+ GitError::ProjectConfigNotFound {
+ config_path: PathBuf::from("/tmp/repo/.config/wt.toml"),
+ }
+ .render(),
+ ),
+ (
+ "parse error",
+ GitError::ParseError {
+ message: "Invalid branch name format".into(),
+ }
+ .render(),
+ ),
+ (
+ "remote-only branch",
+ GitError::RemoteOnlyBranch {
+ branch: "feature".into(),
+ remote: "origin".into(),
+ }
+ .render(),
+ ),
+ (
+ "other git error",
+ GitError::Other {
+ message: "Unexpected git error".into(),
+ }
+ .render(),
+ ),
+ ("named hook failed", hook_with_name.render()),
+ ("unnamed hook failed", hook_without_name.render()),
+ (
+ "hook failed with skip hint",
+ hook_with_hint
+ .downcast_ref::<HookErrorWithHint>()
+ .expect("wrapped to HookErrorWithHint")
+ .render(),
+ ),
+ ];
- assert_snapshot!(
- "hook_command_failed_with_skip_hint",
- err_with_hint
- .downcast_ref::<HookErrorWithHint>()
- .expect("wrapped to HookErrorWithHint")
- .render()
- );
+ assert_snapshot!("command_errors", render_cases(cases));
}
-// ============================================================================
-// Multiline error formatting (tests the pattern used in main.rs catchall)
-// ============================================================================
-
-/// Test that multiline errors without context are formatted with header + gutter.
-/// This is the pattern used in main.rs for untyped anyhow errors.
#[test]
-fn multiline_error_formatting() {
+fn multiline_error_helpers_normalize_line_endings() {
use worktrunk::styling::{error_message, format_with_gutter};
- // Simulate what main.rs does for multiline errors without context:
- // 1. Show "Command failed" header
- // 2. Show the error content in a gutter
-
- let multiline_error =
- "fatal: Unable to read current working directory\nerror: Could not determine cwd";
-
- let header = error_message("Command failed").to_string();
- let gutter = format_with_gutter(multiline_error, None);
-
- // Verify header has error symbol
- assert!(
- header.contains("Command failed"),
- "Header should contain 'Command failed'"
+ let message = "fatal: Unable to read current working directory\nerror: Could not determine cwd";
+ let rendered = format!(
+ "{}\n{}",
+ error_message("Command failed"),
+ format_with_gutter(message, None)
);
+ assert_snapshot!("multiline_error_formatting", rendered);
- // Verify gutter contains both lines
- assert!(
- gutter.contains("fatal: Unable to read"),
- "Gutter should contain first line"
- );
- assert!(
- gutter.contains("Could not determine cwd"),
- "Gutter should contain second line"
+ let normalize = |message: &str| message.replace("\r\n", "\n").replace('\r', "\n");
+ let expected = format_with_gutter("line1\nline2\nline3", None);
+ assert_eq!(
+ format_with_gutter(&normalize("line1\r\nline2\r\nline3"), None),
+ expected
);
-
- // Snapshot the combined output
- assert_snapshot!(
- "multiline_error_formatting",
- format!("{}\n{}", header, gutter)
+ assert_eq!(
+ format_with_gutter(&normalize("line1\rline2\rline3"), None),
+ expected
);
}
-/// Test that CRLF and CR line endings are normalized before formatting.
-/// main.rs normalizes: msg.replace("\r\n", "\n").replace('\r', "\n")
-#[test]
-fn multiline_error_crlf_normalization() {
- use worktrunk::styling::format_with_gutter;
-
- // Test CRLF (Windows line endings)
- let crlf_error = "line1\r\nline2\r\nline3";
- let normalized = crlf_error.replace("\r\n", "\n").replace('\r', "\n");
- let gutter = format_with_gutter(&normalized, None);
-
- // All three lines should appear
- assert!(gutter.contains("line1"), "Should contain line1");
- assert!(gutter.contains("line2"), "Should contain line2");
- assert!(gutter.contains("line3"), "Should contain line3");
-
- // Test CR only (old Mac line endings)
- let cr_error = "line1\rline2\rline3";
- let normalized = cr_error.replace("\r\n", "\n").replace('\r', "\n");
- let gutter = format_with_gutter(&normalized, None);
-
- assert!(gutter.contains("line1"), "CR: Should contain line1");
- assert!(gutter.contains("line2"), "CR: Should contain line2");
- assert!(gutter.contains("line3"), "CR: Should contain line3");
-}
-
-// ============================================================================
-// Integration test: verify error message includes command when git unavailable
-// ============================================================================
-
-/// This is an integration test because it requires running the actual binary.
#[test]
#[cfg(unix)]
fn git_unavailable_error_includes_command() {
- use crate::common::wt_bin;
- use std::process::Command;
-
- let mut cmd = Command::new(wt_bin());
+ let mut cmd = crate::common::wt_command();
cmd.arg("list")
- // Set PATH to empty so git isn't found
.env("PATH", "/nonexistent")
- // Prevent any fallback mechanisms
.env_remove("GIT_EXEC_PATH");
- let output = cmd.output().expect("Failed to run wt");
- let stderr = String::from_utf8_lossy(&output.stderr);
-
- // The error should include the git command that failed
+ let output = cmd.output().expect("run wt without git");
+ assert!(!output.status.success());
assert!(
- stderr.contains("Failed to execute: git"),
- "Error should include 'Failed to execute: git', got: {}",
- stderr
+ String::from_utf8_lossy(&output.stderr).contains("Failed to execute: git"),
+ "stderr was:\n{}",
+ String::from_utf8_lossy(&output.stderr)
);
}
diff --git a/tests/integration_tests/list.rs b/tests/integration_tests/list.rs
index 313b95116..161b76aa4 100644
--- a/tests/integration_tests/list.rs
+++ b/tests/integration_tests/list.rs
@@ -245,8 +245,6 @@ fn test_list_locked_no_reason(mut repo: TestRepo) {
assert_cmd_snapshot!(list_snapshots::command(&repo, repo.root_path()));
}
-// Removed: test_list_long_branch_name - covered by spacing_edge_cases.rs
-
#[rstest]
fn test_list_long_commit_message(mut repo: TestRepo) {
// Create commit with very long message
@@ -258,8 +256,6 @@ fn test_list_long_commit_message(mut repo: TestRepo) {
assert_cmd_snapshot!(list_snapshots::command(&repo, repo.root_path()));
}
-// Removed: test_list_unicode_branch_name - covered by spacing_edge_cases.rs
-
#[rstest]
fn test_list_unicode_commit_message(mut repo: TestRepo) {
// Create commit with Unicode message
diff --git a/tests/integration_tests/list_column_alignment.rs b/tests/integration_tests/list_column_alignment.rs
deleted file mode 100644
index c54047496..000000000
--- a/tests/integration_tests/list_column_alignment.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-//! Tests for verifying column alignment in list output
-//!
-//! These tests ensure that column headers align with their data,
-//! and that progressive rendering maintains consistent alignment.
-
-use crate::common::{TestRepo, make_snapshot_cmd, repo};
-use insta_cmd::assert_cmd_snapshot;
-use rstest::rstest;
-
-#[rstest]
-fn test_status_column_alignment_with_header(mut repo: TestRepo) {
- // Create worktree with status symbols
- let wt = repo.add_worktree_with_commit("test", "file.txt", "content", "Test");
-
- // Add working tree changes for Status symbols
- std::fs::write(wt.join("untracked.txt"), "new").unwrap();
- std::fs::write(wt.join("file.txt"), "modified").unwrap();
-
- assert_cmd_snapshot!(make_snapshot_cmd(&repo, "list", &[], None));
-}
-
-#[rstest]
-fn test_status_column_width_consistency(mut repo: TestRepo) {
- // Create multiple worktrees with different status symbol combinations
- let wt1 = repo.add_worktree_with_commit("simple", "file.txt", "content", "Simple");
- let wt2 = repo.add_worktree_with_commit("complex", "file.txt", "content", "Complex");
-
- // Add different working tree changes
- std::fs::write(wt1.join("new.txt"), "new").unwrap(); // Just untracked (?)
- std::fs::write(wt2.join("new1.txt"), "new").unwrap(); // Multiple: ?, !, +
- std::fs::write(wt2.join("file.txt"), "modified").unwrap();
- repo.run_git_in(&wt2, &["add", "file.txt"]);
-
- assert_cmd_snapshot!(make_snapshot_cmd(&repo, "list", &[], None));
-}
diff --git a/tests/integration_tests/list_layout.rs b/tests/integration_tests/list_layout.rs
new file mode 100644
index 000000000..0ef43b7e0
--- /dev/null
+++ b/tests/integration_tests/list_layout.rs
@@ -0,0 +1,43 @@
+use crate::common::{TestRepo, list_snapshots, repo, setup_snapshot_settings};
+use insta_cmd::assert_cmd_snapshot;
+use rstest::rstest;
+
+fn snapshot_list(repo: &TestRepo, name: &str, width: usize) {
+ let settings = setup_snapshot_settings(repo);
+ let mut cmd = list_snapshots::command_with_width(repo, width);
+ settings.bind(|| assert_cmd_snapshot!(name, cmd));
+}
+
+/// One deliberately heterogeneous table exercises the integration between git
+/// state collection and the renderer. Exhaustive column geometry belongs in
+/// the direct layout tests in `src/commands/list/layout.rs`.
+#[rstest]
+fn diverse_rows_stay_aligned(mut repo: TestRepo) {
+ let feature_a = repo.worktrees["feature-a"].clone();
+ let many_lines = (0..120)
+ .map(|line| format!("line {line}\n"))
+ .collect::<String>();
+ std::fs::write(feature_a.join("feature-a.txt"), many_lines).unwrap();
+ repo.run_git_in(&feature_a, &["add", "feature-a.txt"]);
+ std::fs::write(feature_a.join("untracked.txt"), "new\n").unwrap();
+
+ let feature_b = repo.worktrees["feature-b"].clone();
+ std::fs::remove_file(feature_b.join("feature-b.txt")).unwrap();
+
+ repo.add_worktree("日本語");
+
+ snapshot_list(&repo, "diverse_rows", 180);
+}
+
+/// These widths represent the three distinct user-facing regimes: the minimum
+/// useful table, a compact status table, and the usual rich table. Exact
+/// allocation boundaries are covered by the direct layout tests.
+#[rstest]
+fn representative_widths_render_useful_tables(mut repo: TestRepo) {
+ let long_branch = repo.add_worktree("feature/implement-oauth2-social-login");
+ std::fs::write(long_branch.join("oauth.rs"), "changed\n").unwrap();
+
+ for width in [30, 60, 120] {
+ snapshot_list(&repo, &format!("width_{width}"), width);
+ }
+}
diff --git a/tests/integration_tests/mod.rs b/tests/integration_tests/mod.rs
index 36b7341a7..af43060cc 100644
--- a/tests/integration_tests/mod.rs
+++ b/tests/integration_tests/mod.rs
@@ -12,7 +12,6 @@ pub mod approvals;
pub mod bare_repository;
pub mod cache_sharing;
pub mod ci_status;
-pub mod column_alignment_verification;
pub mod completion;
pub mod completion_validation;
pub mod config_init;
@@ -35,8 +34,8 @@ pub mod help;
pub mod hook_show;
pub mod init;
pub mod list;
-pub mod list_column_alignment;
pub mod list_config;
+pub mod list_layout;
pub mod list_progressive;
pub mod merge;
pub mod nushell_default_config_dir;
@@ -54,7 +53,6 @@ pub mod shell_integration_windows;
pub mod shell_powershell;
pub mod shell_wrapper;
pub mod snapshot_formatting_guard;
-pub mod spacing_edge_cases;
pub mod statusline;
pub mod step_alias;
pub mod step_copy_ignored;
diff --git a/tests/integration_tests/shell_wrapper.rs b/tests/integration_tests/shell_wrapper.rs
index 065815d11..161a3cc11 100644
--- a/tests/integration_tests/shell_wrapper.rs
+++ b/tests/integration_tests/shell_wrapper.rs
@@ -817,7 +817,8 @@ mod unix_tests {
#[case("fish")]
#[case("nu")]
fn test_wrapper_switch_create(#[case] shell: &str, repo: TestRepo) {
- let output = exec_through_wrapper(shell, &repo, "switch", &["--create", "feature"]);
+ let branch = "feature/with-dashes_and_underscores";
+ let output = exec_through_wrapper(shell, &repo, "switch", &["--create", branch]);
// Shell-agnostic assertions
assert_eq!(output.exit_code, 0, "{}: Command should succeed", shell);
@@ -825,9 +826,10 @@ mod unix_tests {
output.assert_no_job_control_messages();
assert!(
- output.combined.contains("Created branch") && output.combined.contains("and worktree"),
- "{}: Should show success message",
- shell
+ output.combined.contains("Created branch")
+ && output.combined.contains(branch)
+ && output.combined.contains("and worktree"),
+ "{shell}: Should create the exact branch passed through the wrapper"
);
// Consolidated snapshot - output should be identical across all shells
@@ -838,119 +840,6 @@ mod unix_tests {
});
}
- #[rstest]
- #[case("bash")]
- #[case("zsh")]
- #[case("fish")]
- #[case("nu")]
- fn test_wrapper_remove(#[case] shell: &str, mut repo: TestRepo) {
- // Create a worktree to remove
- repo.add_worktree("to-remove");
-
- let output = exec_through_wrapper(shell, &repo, "remove", &["to-remove"]);
-
- // Shell-agnostic assertions
- assert_eq!(output.exit_code, 0, "{}: Command should succeed", shell);
- output.assert_no_directive_leaks();
-
- // Consolidated snapshot - output should be identical across all shells
- shell_wrapper_settings().bind(|| {
- insta::allow_duplicates! {
- assert_snapshot!("remove", &output.combined);
- }
- });
- }
-
- #[rstest]
- #[case("bash")]
- #[case("zsh")]
- #[case("fish")]
- #[case("nu")]
- fn test_wrapper_step_for_each(#[case] shell: &str, mut repo: TestRepo) {
- // Remove fixture worktrees so we can create our own feature-a and feature-b
- repo.remove_fixture_worktrees();
-
- repo.commit("Initial commit");
-
- // Create additional worktrees
- repo.add_worktree("feature-a");
- repo.add_worktree("feature-b");
-
- // Run for-each with echo to test stdout handling
- let output = exec_through_wrapper(
- shell,
- &repo,
- "step",
- &["for-each", "--", "echo", "Branch: {{ branch }}"],
- );
-
- // Shell-agnostic assertions
- assert_eq!(output.exit_code, 0, "{}: Command should succeed", shell);
- output.assert_no_directive_leaks();
- output.assert_no_job_control_messages();
-
- // Verify output contains branch names (stdout redirected to stderr)
- assert!(
- output.combined.contains("Branch: main"),
- "{}: Should show main branch output.\nOutput:\n{}",
- shell,
- output.combined
- );
- assert!(
- output.combined.contains("Branch: feature-a"),
- "{}: Should show feature-a branch output.\nOutput:\n{}",
- shell,
- output.combined
- );
- assert!(
- output.combined.contains("Branch: feature-b"),
- "{}: Should show feature-b branch output.\nOutput:\n{}",
- shell,
- output.combined
- );
-
- // Verify summary message
- assert!(
- output.combined.contains("Completed in 3 worktrees"),
- "{}: Should show completion summary.\nOutput:\n{}",
- shell,
- output.combined
- );
-
- // Consolidated snapshot - output should be identical across all shells
- shell_wrapper_settings().bind(|| {
- insta::allow_duplicates! {
- assert_snapshot!("step_for_each", &output.combined);
- }
- });
- }
-
- #[rstest]
- #[case("bash")]
- #[case("zsh")]
- #[case("fish")]
- #[case("nu")]
- fn test_wrapper_merge(#[case] shell: &str, mut repo: TestRepo) {
- // Disable LLM prompt (PTY tests are interactive, claude may be installed)
- repo.write_test_config("");
-
- // Create a feature branch
- repo.add_worktree("feature");
-
- let output = exec_through_wrapper(shell, &repo, "merge", &["main"]);
-
- // Shell-agnostic assertions
- assert_eq!(output.exit_code, 0, "{}: Command should succeed", shell);
- output.assert_no_directive_leaks();
-
- // Consolidated snapshot - output should be identical across all shells
- shell_wrapper_settings().bind(|| {
- insta::allow_duplicates! {
- assert_snapshot!("merge", &output.combined);
- }
- });
- }
-
#[rstest]
#[case("bash")]
#[case("zsh")]
@@ -1560,7 +1449,6 @@ approved-commands = ["echo 'fish background task'"]
// Note: Nushell not included - this test builds custom scripts with bash syntax
#[rstest]
#[case("bash")]
- #[case("zsh")]
#[case("fish")]
fn test_source_flag_forwards_errors(#[case] shell: &str, repo: TestRepo) {
use std::env;
@@ -1961,50 +1849,6 @@ approved-commands = ["echo 'bash background'"]
);
}
- // ========================================================================
- // Special Characters in Branch Names Tests
- // ========================================================================
-
- /// Test that branch names with special characters work correctly
- #[rstest]
- #[case("bash")]
- #[case("zsh")]
- #[case("fish")]
- #[case("nu")]
- fn test_branch_name_with_slashes(#[case] shell: &str, repo: TestRepo) {
- // Branch name with slashes (common git convention)
- let output =
- exec_through_wrapper(shell, &repo, "switch", &["--create", "feature/test-branch"]);
-
- assert_eq!(output.exit_code, 0, "{}: Command should succeed", shell);
- output.assert_no_directive_leaks();
-
- assert!(
- output.combined.contains("Created branch") && output.combined.contains("and worktree"),
- "{}: Should create worktree for branch with slashes",
- shell
- );
- }
-
- /// Test that branch names with dashes and underscores work
- #[rstest]
- #[case("bash")]
- #[case("zsh")]
- #[case("fish")]
- #[case("nu")]
- fn test_branch_name_with_dashes_underscores(#[case] shell: &str, repo: TestRepo) {
- let output = exec_through_wrapper(shell, &repo, "switch", &["--create", "fix-bug_123"]);
-
- assert_eq!(output.exit_code, 0, "{}: Command should succeed", shell);
- output.assert_no_directive_leaks();
-
- assert!(
- output.combined.contains("Created branch") && output.combined.contains("and worktree"),
- "{}: Should create worktree for branch with dashes/underscores",
- shell
- );
- }
-
// ========================================================================
// WORKTRUNK_BIN Fallback Tests
// ========================================================================
@@ -2013,7 +1857,6 @@ approved-commands = ["echo 'bash background'"]
// Note: Nushell not included - this test builds custom scripts with bash syntax
#[rstest]
#[case("bash")]
- #[case("zsh")]
#[case("fish")]
fn test_worktrunk_bin_fallback(#[case] shell: &str, repo: TestRepo) {
let wt_bin = wt_bin();
@@ -2026,21 +1869,6 @@ approved-commands = ["echo 'bash background'"]
// Script that explicitly removes wt from PATH but sets WORKTRUNK_BIN
let script = match shell {
- "zsh" => format!(
- r#"
- autoload -Uz compinit && compinit -i 2>/dev/null
- # Clear PATH to ensure wt is not found via PATH
- export PATH="/usr/bin:/bin"
- export WORKTRUNK_BIN={}
- export WORKTRUNK_CONFIG_PATH={}
- export WORKTRUNK_APPROVALS_PATH={}
- export CLICOLOR_FORCE=1
- {}
- wt switch --create fallback-test
- echo "__PWD__ $PWD"
- "#,
- wt_bin_quoted, config_quoted, approvals_quoted, wrapper_script
- ),
"fish" => format!(
r#"
# Clear PATH to ensure wt is not found via PATH
@@ -2281,57 +2109,6 @@ approved-commands = ["echo 'bash background'"]
}
}
- // ========================================================================
- // Interrupt/Cleanup Tests
- // ========================================================================
-
- /// Test that shell integration completes without leaving zombie processes
- /// Note: Temp directory cleanup is verified implicitly by successful test completion.
- /// We can't check for specific temp files because tests run in parallel.
- #[rstest]
- #[case("bash")]
- #[case("zsh")]
- #[case("fish")]
- #[case("nu")]
- fn test_shell_completes_cleanly(#[case] shell: &str, repo: TestRepo) {
- // Configure a post-start command to exercise the background job code path
- let config_dir = repo.root_path().join(".config");
- fs::create_dir_all(&config_dir).unwrap();
- fs::write(
- config_dir.join("wt.toml"),
- r#"post-start = "echo 'cleanup test'""#,
- )
- .unwrap();
-
- repo.commit("Add post-start command");
-
- // Pre-approve the command
- repo.write_test_approvals(
- r#"[projects."../origin"]
-approved-commands = ["echo 'cleanup test'"]
-"#,
- );
-
- // Run a command that exercises the full FIFO/background job code path
- let output = exec_through_wrapper(shell, &repo, "switch", &["--create", "cleanup-test"]);
-
- // Verify command completed successfully
- // If cleanup failed (e.g., FIFO not removed, zombie process),
- // the command would hang or fail
- assert_eq!(
- output.exit_code, 0,
- "{}: Command should complete cleanly",
- shell
- );
- output.assert_no_directive_leaks();
-
- assert!(
- output.combined.contains("Created branch") && output.combined.contains("and worktree"),
- "{}: Should complete successfully",
- shell
- );
- }
-
// ========================================================================
// README Example Tests (PTY-based for interleaved output)
// ========================================================================
@@ -3271,7 +3048,6 @@ for c in "${{COMPREPLY[@]}}"; do echo "${{c%% *}}"; done
// Note: Nushell not included - this test builds custom scripts with bash syntax
#[rstest]
#[case("bash")]
- #[case("zsh")]
#[case("fish")]
fn test_wrapper_help_redirect_captures_all_output(#[case] shell: &str, repo: TestRepo) {
let wt_bin = wt_bin();
@@ -3305,25 +3081,6 @@ set -x CLICOLOR_FORCE 1
# Run help with redirect - ALL output should go to file
wt --help &>'{redirect_path}'
-# Marker to show script completed
-echo "SCRIPT_COMPLETED"
-"#,
- wt_bin = wt_bin.display(),
- wrapper_script = wrapper_script,
- redirect_path = redirect_path,
- ),
- "zsh" => format!(
- r#"
-autoload -Uz compinit && compinit -i 2>/dev/null
-export WORKTRUNK_BIN='{wt_bin}'
-export CLICOLOR_FORCE=1
-
-# Source the shell integration
-{wrapper_script}
-
-# Run help with redirect - ALL output should go to file
-wt --help &>'{redirect_path}'
-
# Marker to show script completed
echo "SCRIPT_COMPLETED"
"#,
@@ -3419,7 +3176,6 @@ echo "SCRIPT_COMPLETED"
// Note: Nushell not included - this test builds custom scripts with bash syntax
#[rstest]
#[case("bash")]
- #[case("zsh")]
#[case("fish")]
fn test_wrapper_help_interactive_uses_pager(#[case] shell: &str, repo: TestRepo) {
let wt_bin = wt_bin();
@@ -3467,26 +3223,6 @@ set -x CLICOLOR_FORCE 1
# Run help interactively (no redirect) - pager should be invoked
wt --help
-# Marker to show script completed
-echo "SCRIPT_COMPLETED"
-"#,
- wt_bin = wt_bin.display(),
- pager_script = pager_script.display(),
- wrapper_script = wrapper_script,
- ),
- "zsh" => format!(
- r#"
-autoload -Uz compinit && compinit -i 2>/dev/null
-export WORKTRUNK_BIN='{wt_bin}'
-export GIT_PAGER='{pager_script}'
-export CLICOLOR_FORCE=1
-
-# Source the shell integration
-{wrapper_script}
-
-# Run help interactively (no redirect) - pager should be invoked
-wt --help
-
# Marker to show script completed
echo "SCRIPT_COMPLETED"
"#,
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_already_exists.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_already_exists.snap
deleted file mode 100644
index 7ec9a6e57..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_already_exists.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Branch feature already exists
-↳ To switch to the existing branch, run without --create: wt switch feature
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found.snap
deleted file mode 100644
index 7dadbf78a..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ No branch named nonexistent
-↳ To create a new branch, run wt switch --create nonexistent; to list branches, run wt list --branches --remotes
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_no_create_hint.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_no_create_hint.snap
deleted file mode 100644
index 6b83fd17d..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_no_create_hint.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ No branch named nonexistent
-↳ To list branches, run wt list --branches --remotes
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_numeric_github.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_numeric_github.snap
deleted file mode 100644
index 8b627522d..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_numeric_github.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ No branch named 2474
-↳ To switch to PR #2474, run wt switch pr:2474; to create a new branch, run wt switch --create 2474; to list branches, run wt list --branches --remotes (last fetched 9h ago)
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_numeric_gitlab.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_numeric_gitlab.snap
deleted file mode 100644
index 6f3b47eee..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_numeric_gitlab.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ No branch named 2474
-↳ To switch to MR !2474, run wt switch mr:2474; to create a new branch, run wt switch --create 2474; to list branches, run wt list --branches --remotes
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_numeric_unknown_platform.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_numeric_unknown_platform.snap
deleted file mode 100644
index 1be800e64..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_numeric_unknown_platform.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ No branch named 2474
-↳ To switch to PR #2474 or MR !2474, run wt switch pr:2474 or wt switch mr:2474; to create a new branch, run wt switch --create 2474; to list branches, run wt list --branches --remotes
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_with_fetch_time.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_with_fetch_time.snap
deleted file mode 100644
index 18771d8a8..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__branch_not_found_with_fetch_time.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ No branch named nonexistent
-↳ To create a new branch, run wt switch --create nonexistent; to list branches, run wt list --branches --remotes (last fetched 3h ago)
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__cannot_remove_main_worktree.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__cannot_remove_main_worktree.snap
deleted file mode 100644
index 537146f99..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__cannot_remove_main_worktree.snap
+++ /dev/null
@@ -1,5 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ The main worktree cannot be removed
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__command_errors.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__command_errors.snap
new file mode 100644
index 000000000..83ff26863
--- /dev/null
+++ b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__command_errors.snap
@@ -0,0 +1,53 @@
+---
+source: tests/integration_tests/git_error_display.rs
+expression: render_cases(cases)
+---
+## non-interactive
+
+✗ Cannot prompt for approval in non-interactive environment
+↳ To skip prompts in CI/CD, add --yes; to pre-approve commands, run wt config approvals add
+
+## LLM command failed
+
+✗ Commit generation command failed
+  Error: API key not found
+○ Ran command:
+  llm --model claude
+
+## LLM command failed with reproduction
+
+✗ Commit generation command failed
+  Error: API key not found
+○ Ran command:
+  wt step commit --show-prompt | llm --model claude
+
+## project config missing
+
+✗ No project configuration found
+↳ Create a config file at: /tmp/repo/.config/wt.toml
+
+## parse error
+
+✗ Invalid branch name format
+
+## remote-only branch
+
+✗ Branch feature exists only on remote (origin/feature)
+↳ To create a local worktree, run wt switch feature
+
+## other git error
+
+✗ Unexpected git error
+
+## named hook failed
+
+✗ pre-merge command failed: test: exit code 1
+
+## unnamed hook failed
+
+✗ pre-start command failed: command not found
+
+## hook failed with skip hint
+
+✗ pre-merge command failed: test: exit code 1
+↳ To skip pre-merge hooks, re-run with --no-hooks
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__conflicting_changes.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__conflicting_changes.snap
deleted file mode 100644
index 1d37cc16a..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__conflicting_changes.snap
+++ /dev/null
@@ -1,8 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Can't push to local main branch: conflicting uncommitted changes
-  src/main.rs
-  src/lib.rs
-↳ Commit or stash these changes in /tmp/repo.main first
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__detached_head.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__detached_head.snap
deleted file mode 100644
index c2b203782..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__detached_head.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Cannot merge: not on a branch (detached HEAD)
-↳ To switch to a branch, run git switch <branch>
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__detached_head_no_action.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__detached_head_no_action.snap
deleted file mode 100644
index 415a30fec..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__detached_head_no_action.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Not on a branch (detached HEAD)
-↳ To switch to a branch, run git switch <branch>
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__git_state_errors.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__git_state_errors.snap
new file mode 100644
index 000000000..27fff03d4
--- /dev/null
+++ b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__git_state_errors.snap
@@ -0,0 +1,48 @@
+---
+source: tests/integration_tests/git_error_display.rs
+expression: render_cases(cases)
+---
+## detached HEAD while merging
+
+✗ Cannot merge: not on a branch (detached HEAD)
+↳ To switch to a branch, run git switch <branch>
+
+## detached HEAD without action
+
+✗ Not on a branch (detached HEAD)
+↳ To switch to a branch, run git switch <branch>
+
+## rebase in progress
+
+✗ Cannot rebase: a git operation is already in progress
+
+## merge in progress
+
+✗ Cannot merge: a git operation is already in progress
+
+## uncommitted changes
+
+✗ Cannot remove worktree: working tree has uncommitted changes
+↳ Commit or stash changes first
+
+## uncommitted changes on named branch
+
+✗ Cannot remove worktree: feature-branch has uncommitted changes
+↳ Commit or stash changes first
+
+## uncommitted changes with force hint
+
+✗ Cannot remove worktree: feature-branch has uncommitted changes
+↳ Commit or stash changes first, or to lose uncommitted changes, run wt remove --force feature-branch
+
+## uncommitted changes with dirty files
+
+✗ Cannot remove worktree after merge: feature-auth has uncommitted changes
+  M auth.rs
+  ?? .DS_Store
+↳ Commit or stash changes first
+
+## branch already exists
+
+✗ Branch feature already exists
+↳ To switch to the existing branch, run without --create: wt switch feature
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_with_name.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_with_name.snap
deleted file mode 100644
index dd141129d..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_with_name.snap
+++ /dev/null
@@ -1,5 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ pre-merge command failed: test: exit code 1
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_with_skip_hint.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_with_skip_hint.snap
deleted file mode 100644
index 17e673cb9..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_with_skip_hint.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: "err_with_hint.downcast_ref::<HookErrorWithHint>().expect(\"wrapped to HookErrorWithHint\").render()"
----
-✗ pre-merge command failed: test: exit code 1
-↳ To skip pre-merge hooks, re-run with --no-hooks
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_without_name.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_without_name.snap
deleted file mode 100644
index 04c3f0ca3..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_without_name.snap
+++ /dev/null
@@ -1,5 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ pre-start command failed: command not found
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__integration_errors.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__integration_errors.snap
new file mode 100644
index 000000000..f10f026f8
--- /dev/null
+++ b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__integration_errors.snap
@@ -0,0 +1,35 @@
+---
+source: tests/integration_tests/git_error_display.rs
+expression: render_cases(cases)
+---
+## push failed
+
+✗ Can't push to local main branch
+  To /Users/user/workspace/repo/.git
+  ! [remote rejected] HEAD -> main (Up-to-date check failed)
+  error: failed to push some refs to '/Users/user/workspace/repo/.git'
+
+## conflicting changes
+
+✗ Can't push to local main branch: conflicting uncommitted changes
+  src/main.rs
+  src/lib.rs
+↳ Commit or stash these changes in /tmp/repo.main first
+
+## not fast-forward
+
+✗ Can't push to local main branch: it has newer commits
+  abc1234 Fix bug
+  def5678 Add feature
+↳ To rebase onto main, run wt step rebase main
+
+## not fast-forward during merge
+
+✗ Can't push to local main branch: it has newer commits
+  abc1234 New commit on main
+↳ To incorporate these changes, run wt merge main again
+
+## rebase conflict
+
+✗ Rebase onto main incomplete
+  CONFLICT (content): Merge conflict in src/main.rs
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__llm_command_failed.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__llm_command_failed.snap
deleted file mode 100644
index 273904040..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__llm_command_failed.snap
+++ /dev/null
@@ -1,8 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Commit generation command failed
-  Error: API key not found
-○ Ran command:
-  llm --model claude
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__llm_command_failed_with_reproduction.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__llm_command_failed_with_reproduction.snap
deleted file mode 100644
index 1d60adeeb..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__llm_command_failed_with_reproduction.snap
+++ /dev/null
@@ -1,8 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Commit generation command failed
-  Error: API key not found
-○ Ran command:
-  wt step commit --show-prompt | llm --model claude
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_fast_forward.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_fast_forward.snap
deleted file mode 100644
index cd52b8c3d..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_fast_forward.snap
+++ /dev/null
@@ -1,8 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Can't push to local main branch: it has newer commits
-  abc1234 Fix bug
-  def5678 Add feature
-↳ To rebase onto main, run wt step rebase main
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_fast_forward_merge_context.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_fast_forward_merge_context.snap
deleted file mode 100644
index 03c42da05..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_fast_forward_merge_context.snap
+++ /dev/null
@@ -1,7 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Can't push to local main branch: it has newer commits
-  abc1234 New commit on main
-↳ To incorporate these changes, run wt merge main again
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_interactive.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_interactive.snap
deleted file mode 100644
index 73025f606..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_interactive.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Cannot prompt for approval in non-interactive environment
-↳ To skip prompts in CI/CD, add --yes; to pre-approve commands, run wt config approvals add
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__operation_in_progress.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__operation_in_progress.snap
deleted file mode 100644
index 7002f5d63..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__operation_in_progress.snap
+++ /dev/null
@@ -1,7 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: "rendered.join(\"\\n\\n\")"
----
-✗ Cannot rebase: a git operation is already in progress
-
-✗ Cannot merge: a git operation is already in progress
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__other.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__other.snap
deleted file mode 100644
index 3ca5b56d2..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__other.snap
+++ /dev/null
@@ -1,5 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Unexpected git error
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__parse_error.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__parse_error.snap
deleted file mode 100644
index cab9e2803..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__parse_error.snap
+++ /dev/null
@@ -1,5 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Invalid branch name format
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__project_config_not_found.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__project_config_not_found.snap
deleted file mode 100644
index 570144f08..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__project_config_not_found.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ No project configuration found
-↳ Create a config file at: /tmp/repo/.config/wt.toml
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__push_failed.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__push_failed.snap
deleted file mode 100644
index bda82d2f4..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__push_failed.snap
+++ /dev/null
@@ -1,8 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Can't push to local main branch
-  To /Users/user/workspace/repo/.git
-  ! [remote rejected] HEAD -> main (Up-to-date check failed)
-  error: failed to push some refs to '/Users/user/workspace/repo/.git'
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__rebase_conflict.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__rebase_conflict.snap
deleted file mode 100644
index 2b11a00a9..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__rebase_conflict.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Rebase onto main incomplete
-  CONFLICT (content): Merge conflict in src/main.rs
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__remote_only_branch.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__remote_only_branch.snap
deleted file mode 100644
index 4197e3f6b..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__remote_only_branch.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Branch feature exists only on remote (origin/feature)
-↳ To create a local worktree, run wt switch feature
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__uncommitted_changes.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__uncommitted_changes.snap
deleted file mode 100644
index 925b564a6..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__uncommitted_changes.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Cannot remove worktree: working tree has uncommitted changes
-↳ Commit or stash changes first
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__uncommitted_changes_with_branch.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__uncommitted_changes_with_branch.snap
deleted file mode 100644
index 5510ba1ee..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__uncommitted_changes_with_branch.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Cannot remove worktree: feature-branch has uncommitted changes
-↳ Commit or stash changes first
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__uncommitted_changes_with_dirty_files.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__uncommitted_changes_with_dirty_files.snap
deleted file mode 100644
index 6ff5ff26e..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__uncommitted_changes_with_dirty_files.snap
+++ /dev/null
@@ -1,8 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Cannot remove worktree after merge: feature-auth has uncommitted changes
-  M auth.rs
-  ?? .DS_Store
-↳ Commit or stash changes first
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__uncommitted_changes_with_force_hint.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__uncommitted_changes_with_force_hint.snap
deleted file mode 100644
index a36a5c2f1..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__uncommitted_changes_with_force_hint.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Cannot remove worktree: feature-branch has uncommitted changes
-↳ Commit or stash changes first, or to lose uncommitted changes, run wt remove --force feature-branch
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_creation_failed.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_creation_failed.snap
deleted file mode 100644
index 7afa78db0..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_creation_failed.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Failed to create worktree for feature-y from base main
-  fatal: '/tmp/repo.feature-y' already exists
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_creation_failed_with_command.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_creation_failed_with_command.snap
deleted file mode 100644
index bb0ffe19f..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_creation_failed_with_command.snap
+++ /dev/null
@@ -1,9 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Failed to create worktree for fix from base main
-  Preparing worktree (new branch 'fix')
-  fatal: cannot lock ref 'refs/heads/fix'
-↳ Failed command, exit code 128:
-  git worktree add /tmp/repo.fix -b fix main
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_errors.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_errors.snap
new file mode 100644
index 000000000..f1556608b
--- /dev/null
+++ b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_errors.snap
@@ -0,0 +1,91 @@
+---
+source: tests/integration_tests/git_error_display.rs
+expression: render_cases(cases)
+---
+## removal failed
+
+✗ Failed to remove worktree for feature-x @ /tmp/repo.feature-x
+  fatal: worktree is dirty
+  error: could not remove worktree
+
+## removal left directories
+
+✗ Failed to remove worktree for feature-x @ /tmp/repo.feature-x
+  error: failed to delete '/tmp/repo.feature-x': Directory not empty
+↳ Remaining in directory: .vite/, node_modules/, target/
+↳ A background process may be writing files; try wt remove (without --foreground)
+
+## removal left one entry
+
+✗ Failed to remove worktree for feature-x @ /tmp/repo.feature-x
+  error: failed to remove '/tmp/repo.feature-x/target': Permission denied
+↳ Remaining in directory: target/
+
+## removal truncates a long entry list
+
+✗ Failed to remove worktree for feature-x @ /tmp/repo.feature-x
+  error: failed to delete '/tmp/repo.feature-x': Directory not empty
+↳ Remaining in directory: dir-00/, dir-01/, dir-02/, dir-03/, dir-04/, dir-05/, dir-06/, dir-07/, dir-08/, dir-09/, and 5 more
+↳ A background process may be writing files; try wt remove (without --foreground)
+
+## creation failed
+
+✗ Failed to create worktree for feature-y from base main
+  fatal: '/tmp/repo.feature-y' already exists
+
+## creation failed with command
+
+✗ Failed to create worktree for fix from base main
+  Preparing worktree (new branch 'fix')
+  fatal: cannot lock ref 'refs/heads/fix'
+↳ Failed command, exit code 128:
+  git worktree add /tmp/repo.fix -b fix main
+
+## worktree missing
+
+✗ Worktree directory missing for stale-branch
+↳ To clean up, run git worktree prune
+
+## branch not found
+
+✗ No branch named nonexistent
+↳ To create a new branch, run wt switch --create nonexistent; to list branches, run wt list --branches --remotes
+
+## branch not found after stale fetch
+
+✗ No branch named nonexistent
+↳ To create a new branch, run wt switch --create nonexistent; to list branches, run wt list --branches --remotes (last fetched 3h ago)
+
+## branch not found without create hint
+
+✗ No branch named nonexistent
+↳ To list branches, run wt list --branches --remotes
+
+## numeric branch on unknown forge
+
+✗ No branch named 2474
+↳ To switch to PR #2474 or MR !2474, run wt switch pr:2474 or wt switch mr:2474; to create a new branch, run wt switch --create 2474; to list branches, run wt list --branches --remotes
+
+## numeric branch on GitHub
+
+✗ No branch named 2474
+↳ To switch to PR #2474, run wt switch pr:2474; to create a new branch, run wt switch --create 2474; to list branches, run wt list --branches --remotes (last fetched 9h ago)
+
+## numeric branch on GitLab
+
+✗ No branch named 2474
+↳ To switch to MR !2474, run wt switch mr:2474; to create a new branch, run wt switch --create 2474; to list branches, run wt list --branches --remotes
+
+## worktree path occupied
+
+✗ Cannot switch to feature-z — there's a worktree at the expected path /tmp/repo.feature-z on branch other-branch
+↳ To switch the worktree at /tmp/repo.feature-z to feature-z, run cd /tmp/repo.feature-z && git switch feature-z
+
+## worktree path exists
+
+✗ Directory already exists: /tmp/repo.feature
+↳ To remove manually, run rm -rf /tmp/repo.feature; to overwrite (with backup), run wt switch --clobber feature
+
+## cannot remove main worktree
+
+✗ The main worktree cannot be removed
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_missing.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_missing.snap
deleted file mode 100644
index 7d0505ae8..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_missing.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Worktree directory missing for stale-branch
-↳ To clean up, run git worktree prune
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_path_exists.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_path_exists.snap
deleted file mode 100644
index 2bf011167..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_path_exists.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Directory already exists: /tmp/repo.feature
-↳ To remove manually, run rm -rf /tmp/repo.feature; to overwrite (with backup), run wt switch --clobber feature
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_path_occupied.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_path_occupied.snap
deleted file mode 100644
index 8539cc8c3..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_path_occupied.snap
+++ /dev/null
@@ -1,6 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Cannot switch to feature-z — there's a worktree at the expected path /tmp/repo.feature-z on branch other-branch
-↳ To switch the worktree at /tmp/repo.feature-z to feature-z, run cd /tmp/repo.feature-z && git switch feature-z
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_removal_failed.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_removal_failed.snap
deleted file mode 100644
index fcabfa1de..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_removal_failed.snap
+++ /dev/null
@@ -1,7 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Failed to remove worktree for feature-x @ /tmp/repo.feature-x
-  fatal: worktree is dirty
-  error: could not remove worktree
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_removal_failed_directory_not_empty.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_removal_failed_directory_not_empty.snap
deleted file mode 100644
index 990593504..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_removal_failed_directory_not_empty.snap
+++ /dev/null
@@ -1,8 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Failed to remove worktree for feature-x @ /tmp/repo.feature-x
-  error: failed to delete '/tmp/repo.feature-x': Directory not empty
-↳ Remaining in directory: .vite/, node_modules/, target/
-↳ A background process may be writing files; try wt remove (without --foreground)
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_removal_failed_many_remaining_entries.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_removal_failed_many_remaining_entries.snap
deleted file mode 100644
index 96f275125..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_removal_failed_many_remaining_entries.snap
+++ /dev/null
@@ -1,8 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Failed to remove worktree for feature-x @ /tmp/repo.feature-x
-  error: failed to delete '/tmp/repo.feature-x': Directory not empty
-↳ Remaining in directory: dir-00/, dir-01/, dir-02/, dir-03/, dir-04/, dir-05/, dir-06/, dir-07/, dir-08/, dir-09/, and 5 more
-↳ A background process may be writing files; try wt remove (without --foreground)
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_removal_failed_with_remaining_entries.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_removal_failed_with_remaining_entries.snap
deleted file mode 100644
index 73505caa2..000000000
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_removal_failed_with_remaining_entries.snap
+++ /dev/null
@@ -1,7 +0,0 @@
----
-source: tests/integration_tests/git_error_display.rs
-expression: err.render()
----
-✗ Failed to remove worktree for feature-x @ /tmp/repo.feature-x
-  error: failed to remove '/tmp/repo.feature-x/target': Permission denied
-↳ Remaining in directory: target/
diff --git a/tests/integration_tests/spacing_edge_cases.rs b/tests/integration_tests/spacing_edge_cases.rs
deleted file mode 100644
index 70080d4ef..000000000
--- a/tests/integration_tests/spacing_edge_cases.rs
+++ /dev/null
@@ -1,202 +0,0 @@
-use crate::common::{TestRepo, list_snapshots, repo, setup_snapshot_settings};
-use insta::Settings;
-use insta_cmd::assert_cmd_snapshot;
-use rstest::rstest;
-use std::process::Command;
-
-fn snapshot_list(test_name: &str, repo: &TestRepo) {
- run_snapshot(
- setup_snapshot_settings(repo),
- test_name,
- list_snapshots::command(repo, repo.root_path()),
- );
-}
-
-fn snapshot_list_with_width(test_name: &str, repo: &TestRepo, width: usize) {
- run_snapshot(
- setup_snapshot_settings(repo),
- test_name,
- list_snapshots::command_with_width(repo, width),
- );
-}
-
-fn run_snapshot(settings: Settings, test_name: &str, mut cmd: Command) {
- settings.bind(|| {
- assert_cmd_snapshot!(test_name, cmd);
- });
-}
-
-#[rstest]
-fn test_short_branch_names_shorter_than_header(mut repo: TestRepo) {
- // Create worktrees with very short branch names (shorter than "Branch" header)
- repo.add_worktree("a");
- repo.add_worktree("bb");
- repo.add_worktree("ccc");
-
- snapshot_list("short_branch_names", &repo);
-}
-
-#[rstest]
-fn test_long_branch_names_longer_than_header(mut repo: TestRepo) {
- // Create worktrees with very long branch names
- repo.add_worktree("very-long-feature-branch-name");
- repo.add_worktree("another-extremely-long-name-here");
- repo.add_worktree("short");
-
- snapshot_list("long_branch_names", &repo);
-}
-
-#[rstest]
-fn test_unicode_branch_names_width_calculation(mut repo: TestRepo) {
- // Wide (CJK) branch names whose display width differs from both their byte
- // length and their char count — the list renderer pads columns by
- // `unicode_width` display cells, so a byte- or char-count layout would
- // misalign the Branch and Path columns for these. `日本語` is 3 chars /
- // 9 bytes / 6 display cells; `中文` is 2 chars / 6 bytes / 4 cells. ASCII
- // names (byte == char == cell) never exercise that path.
- repo.add_worktree("日本語");
- repo.add_worktree("中文");
- repo.add_worktree("café");
-
- snapshot_list("unicode_branch_names", &repo);
-}
-
-#[rstest]
-fn test_mixed_length_branch_names(mut repo: TestRepo) {
- // Mix of very short, medium, and very long branch names
- repo.add_worktree("x");
- repo.add_worktree("medium");
- repo.add_worktree("extremely-long-branch-name-that-might-cause-layout-issues");
-
- snapshot_list("mixed_length_branch_names", &repo);
-}
-
-// Column alignment tests with varying diff sizes
-// (Merged from column_alignment.rs)
-
-#[rstest]
-fn test_column_alignment_varying_diff_widths(mut repo: TestRepo) {
- // Create worktrees with varying diff sizes to test alignment
- repo.add_worktree("feature-small");
- repo.add_worktree("feature-medium");
- repo.add_worktree("feature-large");
-
- // Add files to create diffs with different digit counts
- let small_path = repo.worktrees.get("feature-small").unwrap();
- for i in 0..5 {
- std::fs::write(small_path.join(format!("file{}.txt", i)), "content").unwrap();
- }
-
- let medium_path = repo.worktrees.get("feature-medium").unwrap();
- for i in 0..50 {
- std::fs::write(medium_path.join(format!("file{}.txt", i)), "content").unwrap();
- }
-
- let large_path = repo.worktrees.get("feature-large").unwrap();
- for i in 0..500 {
- std::fs::write(large_path.join(format!("file{}.txt", i)), "content").unwrap();
- }
-
- // Test at a width where Dirty column is visible
- snapshot_list_with_width("alignment_varying_diffs", &repo, 180);
-}
-
-#[rstest]
-fn test_column_alignment_with_empty_diffs(mut repo: TestRepo) {
- // Mix of worktrees with and without diffs
- repo.add_worktree("no-changes");
-
- repo.add_worktree("with-changes");
- let changes_path = repo.worktrees.get("with-changes").unwrap();
- std::fs::write(changes_path.join("file.txt"), "content").unwrap();
-
- repo.add_worktree("also-no-changes");
-
- // Path column should align even when some rows have diffs and others don't
- snapshot_list_with_width("alignment_empty_diffs", &repo, 180);
-}
-
-#[rstest]
-fn test_column_alignment_extreme_diff_sizes(mut repo: TestRepo) {
- // Create worktrees with extreme diff size differences
- repo.add_worktree("tiny");
- repo.add_worktree("huge");
-
- let tiny_path = repo.worktrees.get("tiny").unwrap();
- std::fs::write(tiny_path.join("file.txt"), "x").unwrap();
-
- let huge_path = repo.worktrees.get("huge").unwrap();
- // 200 files is enough to test alignment with 3-digit diff counts
- for i in 0..200 {
- std::fs::write(huge_path.join(format!("file{}.txt", i)), "content").unwrap();
- }
-
- snapshot_list_with_width("alignment_extreme_diffs", &repo, 180);
-}
-
-// Width survey: visualize column layout at various terminal widths.
-// These snapshots show what columns are visible and how branch names render
-// at each size. The picker in Right layout gets terminal_width/2, so
-// "picker at 80 cols" = list at 40 cols.
-//
-// Context: https://github.com/max-sixty/worktrunk/pull/1564
-
-#[rstest]
-fn test_width_survey_typical_branches(mut repo: TestRepo) {
- // Realistic mix: short default branch + medium feature branches
- repo.add_worktree("feature/auth-redesign");
- repo.add_worktree("fix/login-timeout");
- repo.add_worktree("chore/update-deps");
-
- // Add some dirty files so status columns have data
- let auth_path = repo.worktrees.get("feature/auth-redesign").unwrap();
- std::fs::write(auth_path.join("auth.rs"), "changed").unwrap();
- std::fs::write(auth_path.join("tests.rs"), "changed").unwrap();
-
- let fix_path = repo.worktrees.get("fix/login-timeout").unwrap();
- std::fs::write(fix_path.join("timeout.rs"), "changed").unwrap();
-
- for width in [30, 40, 50, 60, 80, 100, 120] {
- snapshot_list_with_width(&format!("width_survey_typical_{width}"), &repo, width);
- }
-}
-
-#[rstest]
-fn test_width_survey_long_branches(mut repo: TestRepo) {
- // Long branch names that stress the allocator at narrow widths
- repo.add_worktree("feature/implement-oauth2-social-login");
- repo.add_worktree("fix/database-connection-pool-exhaustion");
- repo.add_worktree("short");
-
- let long_path = repo
- .worktrees
- .get("feature/implement-oauth2-social-login")
- .unwrap();
- std::fs::write(long_path.join("oauth.rs"), "changed").unwrap();
-
- for width in [30, 40, 50, 60, 80, 100, 120] {
- snapshot_list_with_width(&format!("width_survey_long_{width}"), &repo, width);
- }
-}
-
-#[rstest]
-fn test_width_survey_picker_equivalent(mut repo: TestRepo) {
- // Simulate what the picker sees in Right layout: half the terminal width.
- // "picker_right_80" = picker list pane when terminal is 80 cols (list gets 40).
- repo.add_worktree("feature/auth-redesign");
- repo.add_worktree("fix/login-timeout");
- repo.add_worktree("chore/update-deps");
-
- let auth_path = repo.worktrees.get("feature/auth-redesign").unwrap();
- std::fs::write(auth_path.join("auth.rs"), "changed").unwrap();
-
- // Right layout: list gets terminal_width / 2
- for terminal_width in [60, 80, 100, 120, 160] {
- let list_width = terminal_width / 2;
- snapshot_list_with_width(
- &format!("width_survey_picker_right_{terminal_width}"),
- &repo,
- list_width,
- );
- }
-}
diff --git a/tests/snapshots/integration__integration_tests__list_column_alignment__status_column_alignment_with_header.snap b/tests/snapshots/integration__integration_tests__list_column_alignment__status_column_alignment_with_header.snap
deleted file mode 100644
index 271f59e61..000000000
--- a/tests/snapshots/integration__integration_tests__list_column_alignment__status_column_alignment_with_header.snap
+++ /dev/null
@@ -1,56 +0,0 @@
----
-source: tests/integration_tests/list_column_alignment.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "500"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ main…± Remote⇅ Path Commit Age Message
-@ main ^| | . 05a4a45d 16h Initial commit
-+ feature-a ↑ ↑1 +1 ../repo.feature-a 1b87d473 16h Add feature-a file
-+ feature-b ↑ ↑1 +1 ../repo.feature-b f62940fc 16h Add feature-b file
-+ feature-c ↑ ↑1 +1 ../repo.feature-c 345c7c93 16h Add feature-c file
-+ test !? ↑ +1 -1 ↑1 +1 -1 ../repo.test 572ec619 1d Test
-
------ stderr -----
-
-○ Showing 5 worktrees, 1 with changes, 4 ahead
diff --git a/tests/snapshots/integration__integration_tests__list_column_alignment__status_column_width_consistency.snap b/tests/snapshots/integration__integration_tests__list_column_alignment__status_column_width_consistency.snap
deleted file mode 100644
index 564b88c31..000000000
--- a/tests/snapshots/integration__integration_tests__list_column_alignment__status_column_width_consistency.snap
+++ /dev/null
@@ -1,57 +0,0 @@
----
-source: tests/integration_tests/list_column_alignment.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "500"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ main…± Remote⇅ Path Commit Age Message
-@ main ^| | . 05a4a45d 16h Initial commit
-+ feature-a ↑ ↑1 +1 ../repo.feature-a 1b87d473 16h Add feature-a file
-+ feature-b ↑ ↑1 +1 ../repo.feature-b f62940fc 16h Add feature-b file
-+ feature-c ↑ ↑1 +1 ../repo.feature-c 345c7c93 16h Add feature-c file
-+ complex + ? ↑ +1 -1 ↑1 +1 -1 ../repo.complex 0fdc439a 1d Complex
-+ simple ? ↑ ↑1 +1 -1 ../repo.simple 42a9d012 1d Simple
-
------ stderr -----
-
-○ Showing 6 worktrees, 2 with changes, 5 ahead
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap b/tests/snapshots/integration__integration_tests__list_layout__diverse_rows.snap
similarity index 72%
rename from tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
rename to tests/snapshots/integration__integration_tests__list_layout__diverse_rows.snap
index 17426ba7a..47f8727f5 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__list_layout__diverse_rows.snap
@@ -1,5 +1,5 @@
---
-source: tests/integration_tests/spacing_edge_cases.rs
+source: tests/integration_tests/list_layout.rs
info:
program: wt
args:
@@ -8,7 +8,8 @@ info:
APPDATA: "[TEST_CONFIG_HOME]"
CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
CLICOLOR_FORCE: "1"
- COLUMNS: "500"
+ COLUMNS: "180"
+ GIT_ALLOW_PROTOCOL: file
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
@@ -47,13 +48,11 @@ exit_code: 0
----- stdout -----
Branch Status HEAD± main↕ main…± Remote⇅ Path Commit Age Message
@ main ^| | . 05a4a45d 16h Initial commit
-+ café _ ../repo.café 05a4a45d 16h Initial commit
-+ feature-a ↑ ↑1 +1 ../repo.feature-a 1b87d473 16h Add feature-a file
-+ feature-b ↑ ↑1 +1 ../repo.feature-b f62940fc 16h Add feature-b file
++ feature-a + ? ↑ +120 -1 ↑1 +1 ../repo.feature-a 1b87d473 16h Add feature-a file
++ feature-b ↑ -1 ↑1 +1 ../repo.feature-b f62940fc 16h Add feature-b file
+ feature-c ↑ ↑1 +1 ../repo.feature-c 345c7c93 16h Add feature-c file
-+ 中文 _ ../repo.中文 05a4a45d 16h Initial commit
+ 日本語 _ ../repo.日本語 05a4a45d 16h Initial commit
----- stderr -----
-○ Showing 7 worktrees, 3 ahead
+○ Showing 5 worktrees, 2 with changes, 3 ahead
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_100.snap b/tests/snapshots/integration__integration_tests__list_layout__width_120.snap
similarity index 52%
rename from tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_100.snap
rename to tests/snapshots/integration__integration_tests__list_layout__width_120.snap
index 9e86f2f5b..a6abcdbe1 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_100.snap
+++ b/tests/snapshots/integration__integration_tests__list_layout__width_120.snap
@@ -1,5 +1,5 @@
---
-source: tests/integration_tests/spacing_edge_cases.rs
+source: tests/integration_tests/list_layout.rs
info:
program: wt
args:
@@ -8,7 +8,8 @@ info:
APPDATA: "[TEST_CONFIG_HOME]"
CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
CLICOLOR_FORCE: "1"
- COLUMNS: "100"
+ COLUMNS: "120"
+ GIT_ALLOW_PROTOCOL: file
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
@@ -35,6 +36,7 @@ info:
WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_PARENT_SHELL: ""
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
@@ -44,15 +46,13 @@ info:
success: true
exit_code: 0
----- stdout -----
- Branch Status HEAD± main↕ main…± Remote⇅ Commit Age
-@ main ^| | 05a4a45d 16h
-+ chore/update-deps _ 05a4a45d 16h
-+ feature-a ↑ ↑1 +1 1b87d473 16h
-+ feature/auth-redesign ? – 05a4a45d 16h
-+ feature-b ↑ ↑1 +1 f62940fc 16h
-+ feature-c ↑ ↑1 +1 345c7c93 16h
-+ fix/login-timeout ? – 05a4a45d 16h
+ Branch Status HEAD± main↕ main…± Remote⇅ Commit Age Message
+@ main ^| | 05a4a45d 16h Initial comm…
++ feature-a ↑ ↑1 +1 1b87d473 16h Add feature-…
++ feature-b ↑ ↑1 +1 f62940fc 16h Add feature-…
++ feature-c ↑ ↑1 +1 345c7c93 16h Add feature-…
++ feature/implement-oauth2-social-login ? – 05a4a45d 16h Initial comm…
----- stderr -----
-○ Showing 7 worktrees, 2 with changes, 3 ahead, 2 columns hidden
+○ Showing 5 worktrees, 1 with changes, 3 ahead, 1 column hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_30.snap b/tests/snapshots/integration__integration_tests__list_layout__width_30.snap
similarity index 89%
rename from tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_30.snap
rename to tests/snapshots/integration__integration_tests__list_layout__width_30.snap
index 8271e7526..80908c13e 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_30.snap
+++ b/tests/snapshots/integration__integration_tests__list_layout__width_30.snap
@@ -1,5 +1,5 @@
---
-source: tests/integration_tests/spacing_edge_cases.rs
+source: tests/integration_tests/list_layout.rs
info:
program: wt
args:
@@ -9,6 +9,7 @@ info:
CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
CLICOLOR_FORCE: "1"
COLUMNS: "30"
+ GIT_ALLOW_PROTOCOL: file
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
@@ -35,6 +36,7 @@ info:
WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_PARENT_SHELL: ""
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
@@ -50,9 +52,7 @@ exit_code: 0
+ feature-b
+ feature-c
+ feature/implement-oauth2-so…
-+ fix/database-connection-poo…
-+ short
----- stderr -----
-○ Showing 7 worktrees, 1 with changes, 3 ahead, 9 columns hidden
+○ Showing 5 worktrees, 1 with changes, 3 ahead, 9 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_50.snap b/tests/snapshots/integration__integration_tests__list_layout__width_60.snap
similarity index 68%
rename from tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_50.snap
rename to tests/snapshots/integration__integration_tests__list_layout__width_60.snap
index 7f89f79eb..debe0dc5d 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_50.snap
+++ b/tests/snapshots/integration__integration_tests__list_layout__width_60.snap
@@ -1,5 +1,5 @@
---
-source: tests/integration_tests/spacing_edge_cases.rs
+source: tests/integration_tests/list_layout.rs
info:
program: wt
args:
@@ -8,7 +8,8 @@ info:
APPDATA: "[TEST_CONFIG_HOME]"
CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
CLICOLOR_FORCE: "1"
- COLUMNS: "50"
+ COLUMNS: "60"
+ GIT_ALLOW_PROTOCOL: file
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
@@ -35,6 +36,7 @@ info:
WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
WORKTRUNK_TEST_NUSHELL_ENV: "0"
WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_PARENT_SHELL: ""
WORKTRUNK_TEST_POWERSHELL_ENV: "0"
WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
@@ -44,15 +46,13 @@ info:
success: true
exit_code: 0
----- stdout -----
- Branch main↕
-@ main
-+ feature-a ↑1
-+ feature-b ↑1
-+ feature-c ↑1
-+ feature/implement-oauth2-social-login
-+ fix/database-connection-pool-exhaustion
-+ short
+ Branch Status HEAD±
+@ main ^|
++ feature-a ↑
++ feature-b ↑
++ feature-c ↑
++ feature/implement-oauth2-social-login ? –
----- stderr -----
-○ Showing 7 worktrees, 1 with changes, 3 ahead, 8 columns hidden
+○ Showing 5 worktrees, 1 with changes, 3 ahead, 7 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__merge.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__merge.snap
deleted file mode 100644
index 6483f25f4..000000000
--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__merge.snap
+++ /dev/null
@@ -1,8 +0,0 @@
----
-source: tests/integration_tests/shell_wrapper.rs
-expression: "&output.combined"
----
-
-○ Already up to date with main (no new commits, no rebase needed)
-○ Worktree preserved (already on target branch)
-
diff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__remove.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__remove.snap
deleted file mode 100644
index 8f2148b18..000000000
--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__remove.snap
+++ /dev/null
@@ -1,7 +0,0 @@
----
-source: tests/integration_tests/shell_wrapper.rs
-expression: "&output.combined"
----
-
-◎ Removing to-remove worktree & branch in background (same commit as main, _)
-
diff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__step_for_each.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__step_for_each.snap
deleted file mode 100644
index 6e3dd4401..000000000
--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__step_for_each.snap
+++ /dev/null
@@ -1,14 +0,0 @@
----
-source: tests/integration_tests/shell_wrapper.rs
-expression: "&output.combined"
----
-
-◎ Running in main...
-Branch: main
-◎ Running in feature-a...
-Branch: feature-a
-◎ Running in feature-b...
-Branch: feature-b
-
-✓ Completed in 3 worktrees
-
diff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_create.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_create.snap
index 182bbe1ed..6290b577c 100644
--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_create.snap
+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_create.snap
@@ -3,6 +3,6 @@ source: tests/integration_tests/shell_wrapper.rs
expression: "&output.combined"
---
-✓ Created branch feature from main and worktree @ _REPO_.feature
+✓ Created branch feature/with-dashes_and_underscores from main and worktree @ _REPO_.feature-with-dashes_and_underscores
↳ To customize worktree locations, run wt config create

diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap
deleted file mode 100644
index 9d4e51475..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "180"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ main…± Remote⇅ Path Commit Age Message
-@ main ^| | . 05a4a45d 16h Initial commit
-+ also-no-changes _ ../repo.also-no-changes 05a4a45d 16h Initial commit
-+ feature-a ↑ ↑1 +1 ../repo.feature-a 1b87d473 16h Add feature-a file
-+ feature-b ↑ ↑1 +1 ../repo.feature-b f62940fc 16h Add feature-b file
-+ feature-c ↑ ↑1 +1 ../repo.feature-c 345c7c93 16h Add feature-c file
-+ no-changes _ ../repo.no-changes 05a4a45d 16h Initial commit
-+ with-changes ! – +1 -1 ../repo.with-changes 05a4a45d 16h Initial commit
-
------ stderr -----
-
-○ Showing 7 worktrees, 1 with changes, 3 ahead
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap
deleted file mode 100644
index e1fa214fa..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap
+++ /dev/null
@@ -1,57 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "180"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ main…± Remote⇅ Path Commit Age Message
-@ main ^| | . 05a4a45d 16h Initial commit
-+ feature-a ↑ ↑1 +1 ../repo.feature-a 1b87d473 16h Add feature-a file
-+ feature-b ↑ ↑1 +1 ../repo.feature-b f62940fc 16h Add feature-b file
-+ feature-c ↑ ↑1 +1 ../repo.feature-c 345c7c93 16h Add feature-c file
-+ huge ? – ../repo.huge 05a4a45d 16h Initial commit
-+ tiny ! – +1 -1 ../repo.tiny 05a4a45d 16h Initial commit
-
------ stderr -----
-
-○ Showing 6 worktrees, 2 with changes, 3 ahead
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap
deleted file mode 100644
index 4740d36fc..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "180"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ main…± Remote⇅ Path Commit Age Message
-@ main ^| | . 05a4a45d 16h Initial commit
-+ feature-a ↑ ↑1 +1 ../repo.feature-a 1b87d473 16h Add feature-a file
-+ feature-b ↑ ↑1 +1 ../repo.feature-b f62940fc 16h Add feature-b file
-+ feature-c ↑ ↑1 +1 ../repo.feature-c 345c7c93 16h Add feature-c file
-+ feature-large ? – ../repo.feature-large 05a4a45d 16h Initial commit
-+ feature-medium ? – ../repo.feature-medium 05a4a45d 16h Initial commit
-+ feature-small ? – ../repo.feature-small 05a4a45d 16h Initial commit
-
------ stderr -----
-
-○ Showing 7 worktrees, 3 with changes, 3 ahead
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap
deleted file mode 100644
index 8a95b8c2f..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "500"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ main…± Remote⇅ Path Commit Age Message
-@ main ^| | . 05a4a45d 16h Initial commit
-+ another-extremely-long-name-here _ ../repo.another-extremely-long-name-here 05a4a45d 16h Initial commit
-+ feature-a ↑ ↑1 +1 ../repo.feature-a 1b87d473 16h Add feature-a file
-+ feature-b ↑ ↑1 +1 ../repo.feature-b f62940fc 16h Add feature-b file
-+ feature-c ↑ ↑1 +1 ../repo.feature-c 345c7c93 16h Add feature-c file
-+ short _ ../repo.short 05a4a45d 16h Initial commit
-+ very-long-feature-branch-name _ ../repo.very-long-feature-branch-name 05a4a45d 16h Initial commit
-
------ stderr -----
-
-○ Showing 7 worktrees, 3 ahead
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap
deleted file mode 100644
index fa0e0bc76..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "500"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ main…± Remote⇅ Path Commit Age Message
-@ main ^| | . 05a4a45d 16h Initial commit
-+ extremely-long-branch-name-that-might-cause-layout-issues _ ../repo.extremely-long-branch-name-that-might-cause-layout-issues 05a4a45d 16h Initial commit
-+ feature-a ↑ ↑1 +1 ../repo.feature-a 1b87d473 16h Add feature-a file
-+ feature-b ↑ ↑1 +1 ../repo.feature-b f62940fc 16h Add feature-b file
-+ feature-c ↑ ↑1 +1 ../repo.feature-c 345c7c93 16h Add feature-c file
-+ medium _ ../repo.medium 05a4a45d 16h Initial commit
-+ x _ ../repo.x 05a4a45d 16h Initial commit
-
------ stderr -----
-
-○ Showing 7 worktrees, 3 ahead
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
deleted file mode 100644
index 5b8a01c69..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "500"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ main…± Remote⇅ Path Commit Age Message
-@ main ^| | . 05a4a45d 16h Initial commit
-+ a _ ../repo.a 05a4a45d 16h Initial commit
-+ bb _ ../repo.bb 05a4a45d 16h Initial commit
-+ ccc _ ../repo.ccc 05a4a45d 16h Initial commit
-+ feature-a ↑ ↑1 +1 ../repo.feature-a 1b87d473 16h Add feature-a file
-+ feature-b ↑ ↑1 +1 ../repo.feature-b f62940fc 16h Add feature-b file
-+ feature-c ↑ ↑1 +1 ../repo.feature-c 345c7c93 16h Add feature-c file
-
------ stderr -----
-
-○ Showing 7 worktrees, 3 ahead
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_100.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_100.snap
deleted file mode 100644
index 2041043b5..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_100.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "100"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ main…± Remote⇅ Age
-@ main ^| | 16h
-+ feature-a ↑ ↑1 +1 16h
-+ feature-b ↑ ↑1 +1 16h
-+ feature-c ↑ ↑1 +1 16h
-+ feature/implement-oauth2-social-login ? – 16h
-+ fix/database-connection-pool-exhaustion _ 16h
-+ short _ 16h
-
------ stderr -----
-
-○ Showing 7 worktrees, 1 with changes, 3 ahead, 3 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_120.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_120.snap
deleted file mode 100644
index e8bc259a4..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_120.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "120"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ main…± Remote⇅ Commit Age Message
-@ main ^| | 05a4a45d 16h Initial co…
-+ feature-a ↑ ↑1 +1 1b87d473 16h Add featur…
-+ feature-b ↑ ↑1 +1 f62940fc 16h Add featur…
-+ feature-c ↑ ↑1 +1 345c7c93 16h Add featur…
-+ feature/implement-oauth2-social-login ? – 05a4a45d 16h Initial co…
-+ fix/database-connection-pool-exhaustion _ 05a4a45d 16h Initial co…
-+ short _ 05a4a45d 16h Initial co…
-
------ stderr -----
-
-○ Showing 7 worktrees, 1 with changes, 3 ahead, 1 column hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_40.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_40.snap
deleted file mode 100644
index 6d61c4cf2..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_40.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "40"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch
-@ main
-+ feature-a
-+ feature-b
-+ feature-c
-+ feature/implement-oauth2-social-login
-+ fix/database-connection-pool-exhausti…
-+ short
-
------ stderr -----
-
-○ Showing 7 worktrees, 1 with changes, 3 ahead, 9 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_60.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_60.snap
deleted file mode 100644
index 16041b428..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_60.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "60"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status main↕
-@ main ^|
-+ feature-a ↑ ↑1
-+ feature-b ↑ ↑1
-+ feature-c ↑ ↑1
-+ feature/implement-oauth2-social-login ? –
-+ fix/database-connection-pool-exhaustion _
-+ short _
-
------ stderr -----
-
-○ Showing 7 worktrees, 1 with changes, 3 ahead, 7 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_80.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_80.snap
deleted file mode 100644
index a3d7496f0..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_80.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "80"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ Remote⇅
-@ main ^| |
-+ feature-a ↑ ↑1
-+ feature-b ↑ ↑1
-+ feature-c ↑ ↑1
-+ feature/implement-oauth2-social-login ? –
-+ fix/database-connection-pool-exhaustion _
-+ short _
-
------ stderr -----
-
-○ Showing 7 worktrees, 1 with changes, 3 ahead, 5 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_100.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_100.snap
deleted file mode 100644
index 21e0c5f5f..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_100.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "50"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± Age
-@ main ^| 16h
-+ chore/update-deps _ 16h
-+ feature-a ↑ 16h
-+ feature/auth-redesign ? – 16h
-+ feature-b ↑ 16h
-+ feature-c ↑ 16h
-+ fix/login-timeout _ 16h
-
------ stderr -----
-
-○ Showing 7 worktrees, 1 with changes, 3 ahead, 6 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_120.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_120.snap
deleted file mode 100644
index ca4b0f095..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_120.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "60"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ Age
-@ main ^| 16h
-+ chore/update-deps _ 16h
-+ feature-a ↑ ↑1 16h
-+ feature/auth-redesign ? – 16h
-+ feature-b ↑ ↑1 16h
-+ feature-c ↑ ↑1 16h
-+ fix/login-timeout _ 16h
-
------ stderr -----
-
-○ Showing 7 worktrees, 1 with changes, 3 ahead, 5 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_160.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_160.snap
deleted file mode 100644
index de09beaa5..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_160.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "80"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ main…± Remote⇅ Age
-@ main ^| | 16h
-+ chore/update-deps _ 16h
-+ feature-a ↑ ↑1 +1 16h
-+ feature/auth-redesign ? – 16h
-+ feature-b ↑ ↑1 +1 16h
-+ feature-c ↑ ↑1 +1 16h
-+ fix/login-timeout _ 16h
-
------ stderr -----
-
-○ Showing 7 worktrees, 1 with changes, 3 ahead, 3 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_60.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_60.snap
deleted file mode 100644
index 4ce368e00..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_60.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "30"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Age
-@ main 16h
-+ chore/update-deps 16h
-+ feature-a 16h
-+ feature/auth-redesign 16h
-+ feature-b 16h
-+ feature-c 16h
-+ fix/login-timeout 16h
-
------ stderr -----
-
-○ Showing 7 worktrees, 1 with changes, 3 ahead, 8 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_80.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_80.snap
deleted file mode 100644
index 046c9a9d1..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_80.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "40"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status Age
-@ main ^| 16h
-+ chore/update-deps _ 16h
-+ feature-a ↑ 16h
-+ feature/auth-redesign ? – 16h
-+ feature-b ↑ 16h
-+ feature-c ↑ 16h
-+ fix/login-timeout _ 16h
-
------ stderr -----
-
-○ Showing 7 worktrees, 1 with changes, 3 ahead, 7 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_120.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_120.snap
deleted file mode 100644
index bdf511263..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_120.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "120"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ main…± Remote⇅ Commit Age Message
-@ main ^| | 05a4a45d 16h Initial commit
-+ chore/update-deps _ 05a4a45d 16h Initial commit
-+ feature-a ↑ ↑1 +1 1b87d473 16h Add feature-a file
-+ feature/auth-redesign ? – 05a4a45d 16h Initial commit
-+ feature-b ↑ ↑1 +1 f62940fc 16h Add feature-b file
-+ feature-c ↑ ↑1 +1 345c7c93 16h Add feature-c file
-+ fix/login-timeout ? – 05a4a45d 16h Initial commit
-
------ stderr -----
-
-○ Showing 7 worktrees, 2 with changes, 3 ahead, 1 column hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_30.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_30.snap
deleted file mode 100644
index a9076b100..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_30.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "30"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Age
-@ main 16h
-+ chore/update-deps 16h
-+ feature-a 16h
-+ feature/auth-redesign 16h
-+ feature-b 16h
-+ feature-c 16h
-+ fix/login-timeout 16h
-
------ stderr -----
-
-○ Showing 7 worktrees, 2 with changes, 3 ahead, 8 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_40.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_40.snap
deleted file mode 100644
index 42414c97b..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_40.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "40"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status Age
-@ main ^| 16h
-+ chore/update-deps _ 16h
-+ feature-a ↑ 16h
-+ feature/auth-redesign ? – 16h
-+ feature-b ↑ 16h
-+ feature-c ↑ 16h
-+ fix/login-timeout ? – 16h
-
------ stderr -----
-
-○ Showing 7 worktrees, 2 with changes, 3 ahead, 7 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_50.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_50.snap
deleted file mode 100644
index 9407189ac..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_50.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "50"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± Age
-@ main ^| 16h
-+ chore/update-deps _ 16h
-+ feature-a ↑ 16h
-+ feature/auth-redesign ? – 16h
-+ feature-b ↑ 16h
-+ feature-c ↑ 16h
-+ fix/login-timeout ? – 16h
-
------ stderr -----
-
-○ Showing 7 worktrees, 2 with changes, 3 ahead, 6 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_60.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_60.snap
deleted file mode 100644
index ddc2c43f4..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_60.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "60"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ Age
-@ main ^| 16h
-+ chore/update-deps _ 16h
-+ feature-a ↑ ↑1 16h
-+ feature/auth-redesign ? – 16h
-+ feature-b ↑ ↑1 16h
-+ feature-c ↑ ↑1 16h
-+ fix/login-timeout ? – 16h
-
------ stderr -----
-
-○ Showing 7 worktrees, 2 with changes, 3 ahead, 5 columns hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_80.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_80.snap
deleted file mode 100644
index 6b2c97321..000000000
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_80.snap
+++ /dev/null
@@ -1,58 +0,0 @@
----
-source: tests/integration_tests/spacing_edge_cases.rs
-info:
- program: wt
- args:
- - list
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLAUDE_CONFIG_DIR: "[TEST_CLAUDE_CONFIG]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "80"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_BASH_INSTALLED: "0"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_CODEX_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_FISH_INSTALLED: "0"
- WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
- WORKTRUNK_TEST_MOCK_CONFIG_DIR: "[TEST_MOCK_CONFIG]"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- WORKTRUNK_TEST_ZSH_INSTALLED: "0"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
- Branch Status HEAD± main↕ main…± Remote⇅ Age
-@ main ^| | 16h
-+ chore/update-deps _ 16h
-+ feature-a ↑ ↑1 +1 16h
-+ feature/auth-redesign ? – 16h
-+ feature-b ↑ ↑1 +1 16h
-+ feature-c ↑ ↑1 +1 16h
-+ fix/login-timeout ? – 16h
-
------ stderr -----
-
-○ Showing 7 worktrees, 2 with changes, 3 ahead, 3 columns hidden