feat(ui): wire worktree overview modal entry points

Add list context-menu command (per-list mode) and Help menu entry (global mode) for the WorktreesOverviewModal; register VM and factory in DI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-05-19 09:49:44 +02:00
parent 9f70f6747e
commit 789094fcd9
7 changed files with 72 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
using System.Linq;
using Avalonia.Controls;
using Avalonia.Interactivity;
using ClaudeDo.Ui.ViewModels.Islands;
@@ -25,6 +26,23 @@ public partial class ListsIslandView : UserControl
if (top is null) window.Show();
else await window.ShowDialog(top);
};
vm.ShowWorktreesOverviewModal = async modal =>
{
var window = new WorktreesOverviewModalView { DataContext = modal };
modal.CloseAction = () => window.Close();
modal.JumpToTaskAction = (listId, _) =>
{
if (vm is { } v)
{
var item = v.UserLists.FirstOrDefault(l => l.Id == $"user:{listId}");
if (item is not null) v.SelectedList = item;
}
};
// TODO: ShowDiffAction and ConfirmAction not wired in v1
var top = TopLevel.GetTopLevel(this) as Window;
if (top is null) window.Show();
else await window.ShowDialog(top);
};
}
};
}