Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat: show branch and fork info in PR/MR description (#808)
Maximilian Roos7ee2fb7430ac
diff --git a/src/commands/worktree/switch.rs b/src/commands/worktree/switch.rsindex 3cd53fd82..5ab8f3fbf 100644--- a/src/commands/worktree/switch.rs+++ b/src/commands/worktree/switch.rs@@ -33,13 +33,14 @@ struct ResolvedTarget {/// Returns two lines for gutter formatting:/// ```text/// ┃ Fix authentication bug in login flow (#101)-/// ┃ by @alice · open · https://github.com/owner/repo/pull/101+/// ┃ by @alice · open · feature-auth · https://github.com/owner/repo/pull/101/// ```fn format_ref_context(ctx: &impl RefContext) -> String {let mut status_parts = vec![format!("by @{}", ctx.author()), ctx.state().to_string()];if ctx.draft() {status_parts.push("draft".to_string());}+ status_parts.push(ctx.source_ref());let status_line = status_parts.join(" · ");cformat!(diff --git a/src/git/error.rs b/src/git/error.rsindex b4fb6e0fb..0512e40b7 100644--- a/src/git/error.rs+++ b/src/git/error.rs@@ -85,6 +85,12 @@ pub trait RefContext {fn state(&self) -> &str;fn draft(&self) -> bool;fn url(&self) -> &str;++ /// The source branch reference for display.+ ///+ /// For same-repo PRs/MRs: just the branch name (e.g., `feature-auth`)+ /// For fork PRs/MRs: `owner:branch` format (e.g., `contributor:feature-fix`)+ fn source_ref(&self) -> String;}/// Domain errors for git and worktree operations.diff --git a/src/git/mr_ref.rs b/src/git/mr_ref.rsindex 434863d01..7021576e5 100644--- a/src/git/mr_ref.rs+++ b/src/git/mr_ref.rs@@ -82,6 +82,43 @@ impl super::RefContext for MrInfo {fn url(&self) -> &str {&self.url}+ fn source_ref(&self) -> String {+ if self.is_cross_project {+ // Try to extract owner from source project URL+ let owner = self+ .source_project_http_url+ .as_ref()+ .or(self.source_project_ssh_url.as_ref())+ .and_then(|url| extract_owner_from_url(url));+ match owner {+ Some(owner) => format!("{}:{}", owner, self.source_branch),+ None => self.source_branch.clone(),+ }+ } else {+ self.source_branch.clone()+ }+ }+}++/// Extract owner from a git URL.+///+/// Handles both SSH (`[email protected]:owner/repo.git`) and HTTPS+/// (`https://gitlab.com/owner/repo.git`) formats.+fn extract_owner_from_url(url: &str) -> Option<String> {+ // SSH format: [email protected]:owner/repo.git+ if let Some(path) = url.strip_prefix("git@").and_then(|s| s.split(':').nth(1)) {+ return path.split('/').next().map(|s| s.to_string());+ }+ // HTTPS format: https://gitlab.com/owner/repo.git+ // After stripping prefix: "gitlab.com/owner/repo.git"+ // nth(1) skips the host and returns the owner+ if let Some(path) = url+ .strip_prefix("https://")+ .or_else(|| url.strip_prefix("http://"))+ {+ return path.split('/').nth(1).map(|s| s.to_string());+ }+ None}/// Raw JSON response from `glab api projects/:id/merge_requests/<number>`.@@ -578,4 +615,101 @@ mod tests {let url = target_remote_url(&mr);assert_eq!(url, None);}++ #[test]+ fn test_extract_owner_from_url_ssh() {+ assert_eq!(+ extract_owner_from_url("[email protected]:owner/repo.git"),+ Some("owner".to_string())+ );+ assert_eq!(+ extract_owner_from_url("[email protected]:org/repo.git"),+ Some("org".to_string())+ );+ }++ #[test]+ fn test_extract_owner_from_url_https() {+ assert_eq!(+ extract_owner_from_url("https://gitlab.com/owner/repo.git"),+ Some("owner".to_string())+ );+ assert_eq!(+ extract_owner_from_url("http://gitlab.com/owner/repo.git"),+ Some("owner".to_string())+ );+ }++ #[test]+ fn test_extract_owner_from_url_invalid() {+ assert_eq!(extract_owner_from_url("invalid-url"), None);+ assert_eq!(extract_owner_from_url(""), None);+ }++ #[test]+ fn test_source_ref_same_project() {+ let mr = MrInfo {+ number: 101,+ title: "Fix bug".to_string(),+ author: "alice".to_string(),+ state: "opened".to_string(),+ draft: false,+ source_branch: "feature-auth".to_string(),+ source_project_id: 123,+ target_project_id: 123,+ source_project_ssh_url: None,+ source_project_http_url: None,+ target_project_ssh_url: None,+ target_project_http_url: None,+ is_cross_project: false,+ url: "https://gitlab.com/owner/repo/-/merge_requests/101".to_string(),+ };+ use crate::git::RefContext;+ assert_eq!(mr.source_ref(), "feature-auth");+ }++ #[test]+ fn test_source_ref_cross_project() {+ let mr = MrInfo {+ number: 101,+ title: "Fix bug".to_string(),+ author: "contributor".to_string(),+ state: "opened".to_string(),+ draft: false,+ source_branch: "feature-fix".to_string(),+ source_project_id: 456,+ target_project_id: 123,+ source_project_ssh_url: Some("[email protected]:contributor/repo.git".to_string()),+ source_project_http_url: Some("https://gitlab.com/contributor/repo.git".to_string()),+ target_project_ssh_url: None,+ target_project_http_url: None,+ is_cross_project: true,+ url: "https://gitlab.com/owner/repo/-/merge_requests/101".to_string(),+ };+ use crate::git::RefContext;+ assert_eq!(mr.source_ref(), "contributor:feature-fix");+ }++ #[test]+ fn test_source_ref_cross_project_no_url() {+ // When URL parsing fails, falls back to just the branch name+ let mr = MrInfo {+ number: 101,+ title: "Fix bug".to_string(),+ author: "contributor".to_string(),+ state: "opened".to_string(),+ draft: false,+ source_branch: "feature-fix".to_string(),+ source_project_id: 456,+ target_project_id: 123,+ source_project_ssh_url: None,+ source_project_http_url: None,+ target_project_ssh_url: None,+ target_project_http_url: None,+ is_cross_project: true,+ url: "https://gitlab.com/owner/repo/-/merge_requests/101".to_string(),+ };+ use crate::git::RefContext;+ assert_eq!(mr.source_ref(), "feature-fix");+ }}diff --git a/src/git/pr_ref.rs b/src/git/pr_ref.rsindex ebdc36584..6d1dfaf33 100644--- a/src/git/pr_ref.rs+++ b/src/git/pr_ref.rs@@ -89,6 +89,13 @@ impl super::RefContext for PrInfo {fn url(&self) -> &str {&self.url}+ fn source_ref(&self) -> String {+ if self.is_cross_repository {+ format!("{}:{}", self.head_owner, self.head_ref_name)+ } else {+ self.head_ref_name.clone()+ }+ }}/// Raw JSON response from `gh api repos/{owner}/{repo}/pulls/{number}`.@@ -467,4 +474,46 @@ mod tests {"https://github.example.com/org/project.git");}++ #[test]+ fn test_source_ref_same_repo() {+ let pr = PrInfo {+ number: 101,+ title: "Fix bug".to_string(),+ author: "alice".to_string(),+ state: "open".to_string(),+ draft: false,+ head_ref_name: "feature-auth".to_string(),+ head_owner: "owner".to_string(),+ head_repo: "repo".to_string(),+ base_owner: "owner".to_string(),+ base_repo: "repo".to_string(),+ is_cross_repository: false,+ host: "github.com".to_string(),+ url: "https://github.com/owner/repo/pull/101".to_string(),+ };+ use crate::git::RefContext;+ assert_eq!(pr.source_ref(), "feature-auth");+ }++ #[test]+ fn test_source_ref_fork() {+ let pr = PrInfo {+ number: 42,+ title: "Add feature".to_string(),+ author: "contributor".to_string(),+ state: "open".to_string(),+ draft: false,+ head_ref_name: "feature-fix".to_string(),+ head_owner: "contributor".to_string(),+ head_repo: "repo".to_string(),+ base_owner: "owner".to_string(),+ base_repo: "repo".to_string(),+ is_cross_repository: true,+ host: "github.com".to_string(),+ url: "https://github.com/owner/repo/pull/42".to_string(),+ };+ use crate::git::RefContext;+ assert_eq!(pr.source_ref(), "contributor:feature-fix");+ }}diff --git a/tests/snapshots/integration__integration_tests__switch__switch_mr_create_conflict.snap b/tests/snapshots/integration__integration_tests__switch__switch_mr_create_conflict.snapindex a491d74fb..223730a47 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_mr_create_conflict.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_mr_create_conflict.snap@@ -38,6 +38,6 @@ exit_code: 1----- stderr -----[36m◎[39m [36mFetching MR !101...[39m[107m [0m [1mFix authentication bug in login flow[22m (!101)-[107m [0m by @alice · opened · [90mhttps://gitlab.com/owner/test-repo/-/merge_requests/101[39m+[107m [0m by @alice · opened · feature-auth · [90mhttps://gitlab.com/owner/test-repo/-/merge_requests/101[39m[31m✗[39m [31mCannot create branch for [1mmr:101[22m — MR already has branch [1mfeature-auth[22m[39m[2m↳[22m [2mTo switch to it: [90mwt switch mr:101[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_mr_fork.snap b/tests/snapshots/integration__integration_tests__switch__switch_mr_fork.snapindex 12354bc19..49531193c 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_mr_fork.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_mr_fork.snap@@ -37,7 +37,7 @@ exit_code: 0----- stderr -----[36m◎[39m [36mFetching MR !42...[39m[107m [0m [1mAdd feature fix for edge case[22m (!42)-[107m [0m by @contributor · opened · [90mhttps://gitlab.com/owner/test-repo/-/merge_requests/42[39m+[107m [0m by @contributor · opened · contributor:feature-fix · [90mhttps://gitlab.com/owner/test-repo/-/merge_requests/42[39m[2m○[22m Push configured to fork: [90mhttps://gitlab.com/contributor/test-repo.git[39m[32m✓[39m [32mCreated branch [1mfeature-fix[22m (tracking [1mMR !42[22m) and worktree @ [1m_REPO_.feature-fix[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_mr_fork_existing_branch_tracks_different.snap b/tests/snapshots/integration__integration_tests__switch__switch_mr_fork_existing_branch_tracks_different.snapindex ff7799e69..dc2b3f31c 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_mr_fork_existing_branch_tracks_different.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_mr_fork_existing_branch_tracks_different.snap@@ -37,6 +37,6 @@ exit_code: 1----- stderr -----[36m◎[39m [36mFetching MR !42...[39m[107m [0m [1mAdd feature fix for edge case[22m (!42)-[107m [0m by @contributor · opened · [90mhttps://gitlab.com/owner/test-repo/-/merge_requests/42[39m+[107m [0m by @contributor · opened · feature-fix · [90mhttps://gitlab.com/owner/test-repo/-/merge_requests/42[39m[31m✗[39m [31mBranch [1mfeature-fix[22m exists but doesn't track MR !42[39m[2m↳[22m [2mTo free the name, run [90mgit branch -m -- feature-fix feature-fix-old[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_mr_fork_existing_branch_tracks_mr.snap b/tests/snapshots/integration__integration_tests__switch__switch_mr_fork_existing_branch_tracks_mr.snapindex 5c1573e4d..3fca8cbc9 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_mr_fork_existing_branch_tracks_mr.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_mr_fork_existing_branch_tracks_mr.snap@@ -37,7 +37,7 @@ exit_code: 0----- stderr -----[36m◎[39m [36mFetching MR !42...[39m[107m [0m [1mAdd feature fix for edge case[22m (!42)-[107m [0m by @contributor · opened · [90mhttps://gitlab.com/owner/test-repo/-/merge_requests/42[39m+[107m [0m by @contributor · opened · feature-fix · [90mhttps://gitlab.com/owner/test-repo/-/merge_requests/42[39m[2m○[22m Branch [1mfeature-fix[22m already configured for MR !42[32m✓[39m [32mCreated worktree for [1mfeature-fix[22m @ [1m_REPO_.feature-fix[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_mr_fork_existing_no_tracking.snap b/tests/snapshots/integration__integration_tests__switch__switch_mr_fork_existing_no_tracking.snapindex ff7799e69..dc2b3f31c 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_mr_fork_existing_no_tracking.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_mr_fork_existing_no_tracking.snap@@ -37,6 +37,6 @@ exit_code: 1----- stderr -----[36m◎[39m [36mFetching MR !42...[39m[107m [0m [1mAdd feature fix for edge case[22m (!42)-[107m [0m by @contributor · opened · [90mhttps://gitlab.com/owner/test-repo/-/merge_requests/42[39m+[107m [0m by @contributor · opened · feature-fix · [90mhttps://gitlab.com/owner/test-repo/-/merge_requests/42[39m[31m✗[39m [31mBranch [1mfeature-fix[22m exists but doesn't track MR !42[39m[2m↳[22m [2mTo free the name, run [90mgit branch -m -- feature-fix feature-fix-old[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_mr_same_repo.snap b/tests/snapshots/integration__integration_tests__switch__switch_mr_same_repo.snapindex ceb53e4a3..afe3f08f2 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_mr_same_repo.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_mr_same_repo.snap@@ -37,6 +37,6 @@ exit_code: 0----- stderr -----[36m◎[39m [36mFetching MR !101...[39m[107m [0m [1mFix authentication bug in login flow[22m (!101)-[107m [0m by @alice · opened · [90mhttps://gitlab.com/owner/test-repo/-/merge_requests/101[39m+[107m [0m by @alice · opened · feature-auth · [90mhttps://gitlab.com/owner/test-repo/-/merge_requests/101[39m[33m▲[39m [33mWorktree for [1mfeature-auth[22m @ [1m_REPO_.feature-auth[22m, but cannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_pr_create_conflict.snap b/tests/snapshots/integration__integration_tests__switch__switch_pr_create_conflict.snapindex 2352adc09..6910a34c6 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_pr_create_conflict.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_pr_create_conflict.snap@@ -1,6 +1,5 @@---source: tests/integration_tests/switch.rs-assertion_line: 1451info:program: wtargs:@@ -39,6 +38,6 @@ exit_code: 1----- stderr -----[36m◎[39m [36mFetching PR #101...[39m[107m [0m [1mFix authentication bug in login flow[22m (#101)-[107m [0m by @alice · open · [90mhttps://github.com/owner/test-repo/pull/101[39m+[107m [0m by @alice · open · feature-auth · [90mhttps://github.com/owner/test-repo/pull/101[39m[31m✗[39m [31mCannot create branch for [1mpr:101[22m — PR already has branch [1mfeature-auth[22m[39m[2m↳[22m [2mTo switch to it: [90mwt switch pr:101[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_pr_fork.snap b/tests/snapshots/integration__integration_tests__switch__switch_pr_fork.snapindex 30a112bc1..1945fa530 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_pr_fork.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_pr_fork.snap@@ -37,7 +37,7 @@ exit_code: 0----- stderr -----[36m◎[39m [36mFetching PR #42...[39m[107m [0m [1mAdd feature fix for edge case[22m (#42)-[107m [0m by @contributor · open · [90mhttps://github.com/owner/test-repo/pull/42[39m+[107m [0m by @contributor · open · contributor:feature-fix · [90mhttps://github.com/owner/test-repo/pull/42[39m[2m○[22m Push configured to fork: [90mhttps://github.com/contributor/test-repo.git[39m[32m✓[39m [32mCreated branch [1mfeature-fix[22m (tracking [1mPR #42[22m) and worktree @ [1m_REPO_.feature-fix[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_existing_different_pr.snap b/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_existing_different_pr.snapindex 798ded677..61ba992e6 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_existing_different_pr.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_existing_different_pr.snap@@ -37,7 +37,7 @@ exit_code: 0----- stderr -----[36m◎[39m [36mFetching PR #42...[39m[107m [0m [1mAdd feature fix for edge case[22m (#42)-[107m [0m by @contributor · open · [90mhttps://github.com/owner/test-repo/pull/42[39m+[107m [0m by @contributor · open · contributor:feature-fix · [90mhttps://github.com/owner/test-repo/pull/42[39m[33m▲[39m [33mUsing prefixed branch name [1mcontributor/feature-fix[22m due to name conflict[39m[2m↳[22m [2mPush to fork is not supported with prefixed branches; feedback welcome at https://github.com/max-sixty/worktrunk/issues/714[22m[32m✓[39m [32mCreated branch [1mcontributor/feature-fix[22m (tracking [1mPR #42[22m) and worktree @ [1m_REPO_.contributor-feature-fix[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_existing_no_tracking.snap b/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_existing_no_tracking.snapindex 798ded677..61ba992e6 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_existing_no_tracking.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_existing_no_tracking.snap@@ -37,7 +37,7 @@ exit_code: 0----- stderr -----[36m◎[39m [36mFetching PR #42...[39m[107m [0m [1mAdd feature fix for edge case[22m (#42)-[107m [0m by @contributor · open · [90mhttps://github.com/owner/test-repo/pull/42[39m+[107m [0m by @contributor · open · contributor:feature-fix · [90mhttps://github.com/owner/test-repo/pull/42[39m[33m▲[39m [33mUsing prefixed branch name [1mcontributor/feature-fix[22m due to name conflict[39m[2m↳[22m [2mPush to fork is not supported with prefixed branches; feedback welcome at https://github.com/max-sixty/worktrunk/issues/714[22m[32m✓[39m [32mCreated branch [1mcontributor/feature-fix[22m (tracking [1mPR #42[22m) and worktree @ [1m_REPO_.contributor-feature-fix[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_existing_same_pr.snap b/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_existing_same_pr.snapindex bd7588022..35b89eb24 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_existing_same_pr.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_existing_same_pr.snap@@ -37,7 +37,7 @@ exit_code: 0----- stderr -----[36m◎[39m [36mFetching PR #42...[39m[107m [0m [1mAdd feature fix for edge case[22m (#42)-[107m [0m by @contributor · open · [90mhttps://github.com/owner/test-repo/pull/42[39m+[107m [0m by @contributor · open · contributor:feature-fix · [90mhttps://github.com/owner/test-repo/pull/42[39m[2m○[22m Branch [1mfeature-fix[22m already configured for PR #42[32m✓[39m [32mCreated worktree for [1mfeature-fix[22m @ [1m_REPO_.feature-fix[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_no_upstream.snap b/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_no_upstream.snapindex df718c37d..2dc180c83 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_no_upstream.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_no_upstream.snap@@ -37,6 +37,6 @@ exit_code: 1----- stderr -----[36m◎[39m [36mFetching PR #42...[39m[107m [0m [1mAdd feature fix for edge case[22m (#42)-[107m [0m by @contributor · open · [90mhttps://github.com/owner/test-repo/pull/42[39m+[107m [0m by @contributor · open · contributor:feature-fix · [90mhttps://github.com/owner/test-repo/pull/42[39m[31m✗[39m [31mNo remote found for [1mowner/test-repo[22m[39m[2m↳[22m [2mAdd the remote: [90mgit remote add upstream https://github.com/owner/test-repo.git[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_prefixed_exists_different_pr.snap b/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_prefixed_exists_different_pr.snapindex 889c12ebf..80eff1bb3 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_prefixed_exists_different_pr.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_prefixed_exists_different_pr.snap@@ -37,6 +37,6 @@ exit_code: 1----- stderr -----[36m◎[39m [36mFetching PR #42...[39m[107m [0m [1mAdd feature fix for edge case[22m (#42)-[107m [0m by @contributor · open · [90mhttps://github.com/owner/test-repo/pull/42[39m+[107m [0m by @contributor · open · contributor:feature-fix · [90mhttps://github.com/owner/test-repo/pull/42[39m[31m✗[39m [31mBranch [1mcontributor/feature-fix[22m exists but doesn't track PR #42[39m[2m↳[22m [2mTo free the name, run [90mgit branch -m -- contributor/feature-fix contributor/feature-fix-old[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_prefixed_exists_same_pr.snap b/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_prefixed_exists_same_pr.snapindex 21dfb4528..749fa4c68 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_prefixed_exists_same_pr.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_pr_fork_prefixed_exists_same_pr.snap@@ -37,7 +37,7 @@ exit_code: 0----- stderr -----[36m◎[39m [36mFetching PR #42...[39m[107m [0m [1mAdd feature fix for edge case[22m (#42)-[107m [0m by @contributor · open · [90mhttps://github.com/owner/test-repo/pull/42[39m+[107m [0m by @contributor · open · contributor:feature-fix · [90mhttps://github.com/owner/test-repo/pull/42[39m[2m○[22m Branch [1mcontributor/feature-fix[22m already configured for PR #42[33m▲[39m [33mWorktree for [1mcontributor/feature-fix[22m @ [1m_REPO_.contributor-feature-fix[22m, but cannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_pr_same_repo.snap b/tests/snapshots/integration__integration_tests__switch__switch_pr_same_repo.snapindex f8af0bdf4..dd423190e 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_pr_same_repo.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_pr_same_repo.snap@@ -37,7 +37,7 @@ exit_code: 0----- stderr -----[36m◎[39m [36mFetching PR #101...[39m[107m [0m [1mFix authentication bug in login flow[22m (#101)-[107m [0m by @alice · open · [90mhttps://github.com/owner/test-repo/pull/101[39m+[107m [0m by @alice · open · feature-auth · [90mhttps://github.com/owner/test-repo/pull/101[39m[36m◎[39m [36mFetching [1mfeature-auth[22m from origin...[39m[33m▲[39m [33mWorktree for [1mfeature-auth[22m @ [1m_REPO_.feature-auth[22m, but cannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_pr_same_repo_no_remote.snap b/tests/snapshots/integration__integration_tests__switch__switch_pr_same_repo_no_remote.snapindex 63ec38371..5e8d79449 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_pr_same_repo_no_remote.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_pr_same_repo_no_remote.snap@@ -37,6 +37,6 @@ exit_code: 1----- stderr -----[36m◎[39m [36mFetching PR #101...[39m[107m [0m [1mFix authentication bug in login flow[22m (#101)-[107m [0m by @alice · open · [90mhttps://github.com/owner/test-repo/pull/101[39m+[107m [0m by @alice · open · feature-auth · [90mhttps://github.com/owner/test-repo/pull/101[39m[31m✗[39m [31mNo remote found for [1mowner/test-repo[22m[39m[2m↳[22m [2mAdd the remote: [90mgit remote add upstream https://github.com/owner/test-repo.git[39m[22m