Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
test: add GitLab MR status and shell config creation tests (#546)
Maximilian Roosf0f3e1862939
diff --git a/tests/common/mod.rs b/tests/common/mod.rsindex 059bcba7e..56f41636e 100644--- a/tests/common/mod.rs+++ b/tests/common/mod.rs@@ -1701,6 +1701,99 @@ exit 1self.mock_bin_path = Some(mock_bin);}+ /// Setup mock `glab` that returns configurable MR/CI data for GitLab+ ///+ /// Use this for testing GitLab CI status parsing code. The mock returns JSON data+ /// for `glab mr list` and `glab repo view` commands.+ ///+ /// # Arguments+ /// * `mr_json` - JSON string to return for `glab mr list --output json`+ /// * `project_id` - Optional project ID to return from `glab repo view`+ pub fn setup_mock_glab_with_ci_data(&mut self, mr_json: &str, project_id: Option<u64>) {+ use crate::common::mock_commands::write_mock_script;++ let mock_bin = self.temp_dir.path().join("mock-bin");+ std::fs::create_dir_all(&mock_bin).unwrap();++ // Write JSON to a file to avoid escaping issues+ let mr_json_file = mock_bin.join("mr_data.json");+ std::fs::write(&mr_json_file, mr_json).unwrap();++ // Convert mock_bin path to a format bash can read+ let script_dir = {+ let path_str = mock_bin.to_string_lossy();+ #[cfg(windows)]+ {+ let chars: Vec<char> = path_str.chars().collect();+ if chars.len() >= 2 && chars[1] == ':' {+ let drive = chars[0].to_ascii_lowercase();+ format!("/{}{}", drive, path_str[2..].replace('\\', "/"))+ } else {+ path_str.replace('\\', "/")+ }+ }+ #[cfg(not(windows))]+ {+ path_str.to_string()+ }+ };++ // Build glab mock script+ let project_id_response = match project_id {+ Some(id) => format!(r#"{{"id": {}}}"#, id),+ None => r#"{"error": "not found"}"#.to_string(),+ };++ let script = format!(+ r#"#!/bin/bash+# Mock glab command that returns configured JSON data+SCRIPT_DIR="{script_dir}"++case "$1" in+ --version)+ echo "glab version 1.0.0 (mock)"+ exit 0+ ;;+ auth)+ # glab auth status - succeed immediately+ exit 0+ ;;+ mr)+ # glab mr list - return MR data from file+ cat "$SCRIPT_DIR/mr_data.json"+ exit 0+ ;;+ repo)+ # glab repo view --output json - return project info+ echo '{project_id_response}'+ exit 0+ ;;+ ci)+ # glab ci list - return empty for now+ echo '[]'+ exit 0+ ;;+ *)+ exit 1+ ;;+esac+"#+ );+ write_mock_script(&mock_bin, "glab", &script);++ // Create mock gh script that fails (GitHub not available)+ write_mock_script(+ &mock_bin,+ "gh",+ r#"#!/bin/sh+# Mock gh command that fails fast+exit 1+"#,+ );++ self.mock_bin_path = Some(mock_bin);+ }+/// Configure a command to use mock gh/glab commands////// Must call `setup_mock_gh()` first. Prepends the mock bin directory to PATHdiff --git a/tests/integration_tests/ci_status.rs b/tests/integration_tests/ci_status.rsindex d11a43483..47a205e19 100644--- a/tests/integration_tests/ci_status.rs+++ b/tests/integration_tests/ci_status.rs@@ -372,3 +372,151 @@ platform = "invalid_platform"assert_cmd_snapshot!(cmd);});}++// =============================================================================+// GitLab MR status tests+// =============================================================================++/// Helper to run a GitLab CI status test with the given mock data+fn run_gitlab_ci_status_test(+ repo: &mut TestRepo,+ snapshot_name: &str,+ mr_json: &str,+ project_id: Option<u64>,+) {+ repo.setup_mock_glab_with_ci_data(mr_json, project_id);++ let settings = setup_snapshot_settings(repo);+ settings.bind(|| {+ let mut cmd = make_snapshot_cmd(repo, "list", &["--full"], None);+ repo.configure_mock_commands(&mut cmd);+ assert_cmd_snapshot!(snapshot_name, cmd);+ });+}++/// Setup a repo with GitLab remote and feature worktree, returns head SHA+fn setup_gitlab_repo_with_feature(repo: &mut TestRepo) -> String {+ repo.run_git(&[+ "remote",+ "add",+ "origin",+ "https://gitlab.com/test-group/test-project.git",+ ]);+ repo.add_worktree("feature");+ get_branch_sha(repo, "feature")+}++#[rstest]+#[case::passed("success", false, "gitlab_mr_passed")]+#[case::failed("failed", false, "gitlab_mr_failed")]+#[case::running("running", false, "gitlab_mr_running")]+#[case::pending("pending", false, "gitlab_mr_pending")]+#[case::conflicts("success", true, "gitlab_mr_conflicts")]+fn test_list_full_with_gitlab_mr_status(+ mut repo: TestRepo,+ #[case] pipeline_status: &str,+ #[case] has_conflicts: bool,+ #[case] snapshot_name: &str,+) {+ let head_sha = setup_gitlab_repo_with_feature(&mut repo);++ let mr_json = format!(+ r#"[{{+ "sha": "{}",+ "has_conflicts": {},+ "detailed_merge_status": null,+ "head_pipeline": {{"status": "{}"}},+ "source_project_id": 12345,+ "web_url": "https://gitlab.com/test-group/test-project/-/merge_requests/1"+ }}]"#,+ head_sha, has_conflicts, pipeline_status+ );++ run_gitlab_ci_status_test(&mut repo, snapshot_name, &mr_json, Some(12345));+}++#[rstest]+fn test_list_full_with_gitlab_stale_mr(mut repo: TestRepo) {+ setup_gitlab_repo_with_feature(&mut repo);++ // Make additional commit locally (not pushed)+ let worktree_path = repo.worktrees.get("feature").unwrap().clone();+ std::fs::write(worktree_path.join("new_file.txt"), "new content").unwrap();+ repo.stage_all(&worktree_path);+ repo.run_git_in(&worktree_path, &["commit", "-m", "Local commit"]);++ // MR HEAD differs from local HEAD - simulates stale MR+ let mr_json = r#"[{+ "sha": "old_sha_from_before_local_commit",+ "has_conflicts": false,+ "detailed_merge_status": null,+ "head_pipeline": {"status": "success"},+ "source_project_id": 12345,+ "web_url": "https://gitlab.com/test-group/test-project/-/merge_requests/1"+ }]"#;++ run_gitlab_ci_status_test(&mut repo, "gitlab_stale_mr", mr_json, Some(12345));+}++#[rstest]+fn test_list_full_with_gitlab_no_ci(mut repo: TestRepo) {+ let head_sha = setup_gitlab_repo_with_feature(&mut repo);++ // MR with no pipeline+ let mr_json = format!(+ r#"[{{+ "sha": "{}",+ "has_conflicts": false,+ "detailed_merge_status": null,+ "head_pipeline": null,+ "source_project_id": 12345,+ "web_url": "https://gitlab.com/test-group/test-project/-/merge_requests/1"+ }}]"#,+ head_sha+ );++ run_gitlab_ci_status_test(&mut repo, "gitlab_no_ci", &mr_json, Some(12345));+}++#[rstest]+fn test_list_full_with_gitlab_filters_by_project_id(mut repo: TestRepo) {+ // Use a specific project for our repo+ repo.run_git(&[+ "remote",+ "add",+ "origin",+ "https://gitlab.com/my-group/my-project.git",+ ]);+ repo.add_worktree("feature");+ let head_sha = get_branch_sha(&repo, "feature");++ // Multiple MRs - only one from our project (should filter to project 99999)+ let mr_json = format!(+ r#"[+ {{+ "sha": "wrong_sha",+ "has_conflicts": false,+ "detailed_merge_status": null,+ "head_pipeline": {{"status": "failed"}},+ "source_project_id": 11111,+ "web_url": "https://gitlab.com/other-group/other-project/-/merge_requests/99"+ }},+ {{+ "sha": "{}",+ "has_conflicts": false,+ "detailed_merge_status": null,+ "head_pipeline": {{"status": "success"}},+ "source_project_id": 99999,+ "web_url": "https://gitlab.com/my-group/my-project/-/merge_requests/1"+ }}+ ]"#,+ head_sha+ );++ run_gitlab_ci_status_test(+ &mut repo,+ "gitlab_filters_by_project_id",+ &mr_json,+ Some(99999),+ );+}diff --git a/tests/integration_tests/configure_shell.rs b/tests/integration_tests/configure_shell.rsindex 34cfa0ec9..e98f8d24e 100644--- a/tests/integration_tests/configure_shell.rs+++ b/tests/integration_tests/configure_shell.rs@@ -792,6 +792,53 @@ fn test_configure_shell_no_warning_for_bash_user(repo: TestRepo, temp_home: Temp});}+/// Test that explicitly targeting a shell creates the config file when it doesn't exist+#[rstest]+fn test_configure_shell_create_zshrc_when_missing(repo: TestRepo, temp_home: TempDir) {+ // Don't create .zshrc - it doesn't exist+ let zshrc_path = temp_home.path().join(".zshrc");+ assert!(!zshrc_path.exists(), "zshrc should not exist before test");++ let settings = setup_home_snapshot_settings(&temp_home);+ settings.bind(|| {+ let mut cmd = wt_command();+ repo.configure_wt_cmd(&mut cmd);+ set_temp_home_env(&mut cmd, temp_home.path());+ cmd.env("SHELL", "/bin/zsh");+ // Force compinit warning for deterministic tests across environments+ cmd.env("WORKTRUNK_TEST_COMPINIT_MISSING", "1");+ cmd.arg("config")+ .arg("shell")+ .arg("install")+ .arg("zsh") // Explicitly target zsh+ .arg("--yes")+ .current_dir(repo.root_path());++ assert_cmd_snapshot!(cmd, @"+ success: true+ exit_code: 0+ ----- stdout -----++ ----- stderr -----+ [32m✓[39m [32mCreated shell extension & completions for [1mzsh[22m @ [1m~/.zshrc[22m[39m++ [32m✓[39m [32mConfigured 1 shell[39m+ [33m▲[39m [33mCompletions require compinit; add to ~/.zshrc before the wt line:[39m+ [107m [0m [2m[0m[2m[34mautoload[0m[2m [0m[2m[36m-Uz[0m[2m compinit [0m[2m[36m&&[0m[2m [0m[2m[34mcompinit[0m[2m+ [2m↳[22m [2mRestart shell to activate shell integration[22m+ ");+ });++ // Verify the file was created with correct content+ assert!(zshrc_path.exists(), "zshrc should exist after install");+ let content = fs::read_to_string(&zshrc_path).unwrap();+ assert!(+ content.contains("eval \"$(command wt config shell init zsh)\""),+ "Created file should contain wt integration: {}",+ content+ );+}+/// Only `install zsh` or `install` (all) should trigger zsh-specific warnings#[rstest]fn test_configure_shell_no_warning_for_fish_install(repo: TestRepo, temp_home: TempDir) {diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitlab_filters_by_project_id.snap b/tests/snapshots/integration__integration_tests__ci_status__gitlab_filters_by_project_id.snapnew file mode 100644index 000000000..3c113b4cc--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitlab_filters_by_project_id.snap@@ -0,0 +1,39 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ 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_EDITOR: ""+ GIT_TERMINAL_PROMPT: "0"+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ PATH: "[PATH]"+ RUST_LOG: warn+ SOURCE_DATE_EPOCH: "1735776000"+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mPath[0m [1mRemote⇅[0m [1mCI[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m . [32m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++ [2mfeature[0m [2m_[22m [2m../repo.feature[0m [32m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++[2m○[22m [2mShowing 2 worktrees++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_conflicts.snap b/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_conflicts.snapnew file mode 100644index 000000000..e6f787e38--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_conflicts.snap@@ -0,0 +1,39 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ 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_EDITOR: ""+ GIT_TERMINAL_PROMPT: "0"+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ PATH: "[PATH]"+ RUST_LOG: warn+ SOURCE_DATE_EPOCH: "1735776000"+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mPath[0m [1mRemote⇅[0m [1mCI[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m . [33m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++ [2mfeature[0m [2m_[22m [2m../repo.feature[0m [33m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++[2m○[22m [2mShowing 2 worktrees++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_failed.snap b/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_failed.snapnew file mode 100644index 000000000..42b69c65c--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_failed.snap@@ -0,0 +1,39 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ 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_EDITOR: ""+ GIT_TERMINAL_PROMPT: "0"+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ PATH: "[PATH]"+ RUST_LOG: warn+ SOURCE_DATE_EPOCH: "1735776000"+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mPath[0m [1mRemote⇅[0m [1mCI[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m . [31m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++ [2mfeature[0m [2m_[22m [2m../repo.feature[0m [31m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++[2m○[22m [2mShowing 2 worktrees++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_passed.snap b/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_passed.snapnew file mode 100644index 000000000..3c113b4cc--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_passed.snap@@ -0,0 +1,39 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ 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_EDITOR: ""+ GIT_TERMINAL_PROMPT: "0"+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ PATH: "[PATH]"+ RUST_LOG: warn+ SOURCE_DATE_EPOCH: "1735776000"+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mPath[0m [1mRemote⇅[0m [1mCI[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m . [32m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++ [2mfeature[0m [2m_[22m [2m../repo.feature[0m [32m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++[2m○[22m [2mShowing 2 worktrees++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_pending.snap b/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_pending.snapnew file mode 100644index 000000000..7bd71ce9c--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_pending.snap@@ -0,0 +1,39 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ 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_EDITOR: ""+ GIT_TERMINAL_PROMPT: "0"+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ PATH: "[PATH]"+ RUST_LOG: warn+ SOURCE_DATE_EPOCH: "1735776000"+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mPath[0m [1mRemote⇅[0m [1mCI[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m . [34m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++ [2mfeature[0m [2m_[22m [2m../repo.feature[0m [34m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++[2m○[22m [2mShowing 2 worktrees++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_running.snap b/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_running.snapnew file mode 100644index 000000000..7bd71ce9c--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitlab_mr_running.snap@@ -0,0 +1,39 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ 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_EDITOR: ""+ GIT_TERMINAL_PROMPT: "0"+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ PATH: "[PATH]"+ RUST_LOG: warn+ SOURCE_DATE_EPOCH: "1735776000"+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mPath[0m [1mRemote⇅[0m [1mCI[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m . [34m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++ [2mfeature[0m [2m_[22m [2m../repo.feature[0m [34m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++[2m○[22m [2mShowing 2 worktrees++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitlab_no_ci.snap b/tests/snapshots/integration__integration_tests__ci_status__gitlab_no_ci.snapnew file mode 100644index 000000000..be58d94e1--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitlab_no_ci.snap@@ -0,0 +1,39 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ 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_EDITOR: ""+ GIT_TERMINAL_PROMPT: "0"+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ PATH: "[PATH]"+ RUST_LOG: warn+ SOURCE_DATE_EPOCH: "1735776000"+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mPath[0m [1mRemote⇅[0m [1mCI[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m . [90m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++ [2mfeature[0m [2m_[22m [2m../repo.feature[0m [90m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++[2m○[22m [2mShowing 2 worktrees++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitlab_stale_mr.snap b/tests/snapshots/integration__integration_tests__ci_status__gitlab_stale_mr.snapnew file mode 100644index 000000000..ae0154b3e--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitlab_stale_mr.snap@@ -0,0 +1,39 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ 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_EDITOR: ""+ GIT_TERMINAL_PROMPT: "0"+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ PATH: "[PATH]"+ RUST_LOG: warn+ SOURCE_DATE_EPOCH: "1735776000"+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mPath[0m [1mRemote⇅[0m [1mCI[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m . [2m[32m●[0m [2ma1e809f5[0m [2m1d[0m [2mInitial commit++ feature [2m↑[22m [32m↑1[0m [32m+1[0m ../repo.feature [2m[32m●[0m [2m1b2eaadd[0m [2m1d[0m [2mLocal commit++[2m○[22m [2mShowing 2 worktrees, 1 ahead++----- stderr -----