From 232d7cb6474ac0dd495877c91ede88acc20f5358 Mon Sep 17 00:00:00 2001 From: mika kuns Date: Tue, 19 May 2026 11:48:07 +0200 Subject: [PATCH] fix(ui): toggle expand on full folder row click Co-Authored-By: Claude Sonnet 4.6 --- src/ClaudeDo.Ui/Views/Modals/WorktreeModalView.axaml | 2 ++ .../Views/Modals/WorktreeModalView.axaml.cs | 11 +++++++++++ 2 files changed, 13 insertions(+) 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)