Allow filtering worktrees by branch name in Worktrees pane

Co-authored-by: phanirithvij <phanirithvij2000@gmail.com>
This commit is contained in:
Stefan Haller
2026-08-29 17:02:44 +02:00
co-authored by phanirithvij
parent c3027caf6b
commit 530d773052
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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}
},
)
@@ -28,6 +28,7 @@ var FilterWorktrees = NewIntegrationTest(NewIntegrationTestArgs{
).
FilterOrSearch("xxx").
Lines(
Contains("worktree-1 branch-xxx"),
Contains("worktree-xxx branch-aaa"),
)
},