diff --git a/src/ClaudeDo.Ui/Views/Modals/WorktreeModalView.axaml b/src/ClaudeDo.Ui/Views/Modals/WorktreeModalView.axaml
index c3b736d..c380a8d 100644
--- a/src/ClaudeDo.Ui/Views/Modals/WorktreeModalView.axaml
+++ b/src/ClaudeDo.Ui/Views/Modals/WorktreeModalView.axaml
@@ -59,6 +59,7 @@
+
+
diff --git a/src/ClaudeDo.Ui/Views/Modals/WorktreeModalView.axaml.cs b/src/ClaudeDo.Ui/Views/Modals/WorktreeModalView.axaml.cs
index da5aa2b..37895ed 100644
--- a/src/ClaudeDo.Ui/Views/Modals/WorktreeModalView.axaml.cs
+++ b/src/ClaudeDo.Ui/Views/Modals/WorktreeModalView.axaml.cs
@@ -5,6 +5,7 @@ using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Media;
using Avalonia.Styling;
+using Avalonia.VisualTree;
using ClaudeDo.Ui.ViewModels.Modals;
namespace ClaudeDo.Ui.Views.Modals;
@@ -56,6 +57,16 @@ public partial class WorktreeModalView : Window
RenderTransform = new ScaleTransform(1.0, 1.0);
}
+ private void OnNodeTapped(object? sender, Avalonia.Input.TappedEventArgs e)
+ {
+ if (sender is not Control c) return;
+ if (c.DataContext is not WorktreeNodeViewModel node) return;
+ if (!node.IsDirectory) return;
+ var tvi = c.FindAncestorOfType();
+ if (tvi is null) return;
+ tvi.IsExpanded = !tvi.IsExpanded;
+ }
+
private void OnTitleBarPressed(object? sender, PointerPressedEventArgs e)
{
if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)