From 530d773052cdeb3a0c9060f3e6cc5ecde035dd67 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Tue, 18 Aug 2026 09:23:30 +0200 Subject: [PATCH] Allow filtering worktrees by branch name in Worktrees pane Co-authored-by: phanirithvij --- pkg/gui/context/worktrees_context.go | 2 +- pkg/integration/tests/filter_and_search/filter_worktrees.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/gui/context/worktrees_context.go b/pkg/gui/context/worktrees_context.go index 4ff536c94..690fa6d4b 100644 --- a/pkg/gui/context/worktrees_context.go +++ b/pkg/gui/context/worktrees_context.go @@ -17,7 +17,7 @@ func NewWorktreesContext(c *ContextCommon) *WorktreesContext { viewModel := NewFilteredListViewModel( func() []*models.Worktree { return c.Model().Worktrees }, func(worktree *models.Worktree) []string { - return []string{worktree.Name} + return []string{worktree.Name, worktree.Branch} }, ) diff --git a/pkg/integration/tests/filter_and_search/filter_worktrees.go b/pkg/integration/tests/filter_and_search/filter_worktrees.go index 84e367573..77dbcc744 100644 --- a/pkg/integration/tests/filter_and_search/filter_worktrees.go +++ b/pkg/integration/tests/filter_and_search/filter_worktrees.go @@ -28,6 +28,7 @@ var FilterWorktrees = NewIntegrationTest(NewIntegrationTestArgs{ ). FilterOrSearch("xxx"). Lines( + Contains("worktree-1 branch-xxx"), Contains("worktree-xxx branch-aaa"), ) },