From 3e848710b87e1c169a761ca14a90d687b8eca998 Mon Sep 17 00:00:00 2001 From: mika kuns Date: Thu, 4 Jun 2026 20:17:45 +0200 Subject: [PATCH] refactor(ui): remove dead inline-layout handlers from DetailsIslandView The redesigned detail island moved the title, subtask rows, and copy/edit controls into TaskHeaderBar and DescriptionStepsCard, leaving four unused code-behind handlers (OnSubtaskTitleTapped, OnSubtaskEditLostFocus, OnTaskIdTapped, OnCopyDescriptionClick) and their imports. Co-Authored-By: Claude Opus 4.7 --- .../Views/Islands/DetailsIslandView.axaml.cs | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/src/ClaudeDo.Ui/Views/Islands/DetailsIslandView.axaml.cs b/src/ClaudeDo.Ui/Views/Islands/DetailsIslandView.axaml.cs index 3abdf57..3687975 100644 --- a/src/ClaudeDo.Ui/Views/Islands/DetailsIslandView.axaml.cs +++ b/src/ClaudeDo.Ui/Views/Islands/DetailsIslandView.axaml.cs @@ -1,13 +1,7 @@ -using System.Linq; using Avalonia; using Avalonia.Controls; -using Avalonia.Input; -using Avalonia.Input.Platform; -using Avalonia.Interactivity; using Avalonia.Layout; using Avalonia.Media; -using Avalonia.Threading; -using Avalonia.VisualTree; using ClaudeDo.Ui.ViewModels.Islands; using ClaudeDo.Ui.Views.Modals; using ClaudeDo.Ui.Views.Planning; @@ -138,37 +132,4 @@ public partial class DetailsIslandView : UserControl _ = dialog.ShowDialog(owner); return await tcs.Task; } - - private void OnSubtaskTitleTapped(object? sender, TappedEventArgs e) - { - if (sender is not Control c || c.DataContext is not SubtaskRowViewModel row) return; - row.IsEditing = true; - - var box = (c.GetVisualParent() as Panel)?.GetVisualDescendants().OfType().FirstOrDefault(); - if (box is not null) - Dispatcher.UIThread.Post(() => { box.Focus(); box.SelectAll(); }, DispatcherPriority.Background); - } - - private void OnSubtaskEditLostFocus(object? sender, RoutedEventArgs e) - { - if (DataContext is DetailsIslandViewModel vm - && sender is Control c && c.DataContext is SubtaskRowViewModel row) - vm.CommitSubtaskEditCommand.Execute(row); - } - - private async void OnTaskIdTapped(object? sender, TappedEventArgs e) - { - if (DataContext is not DetailsIslandViewModel vm || vm.Task is null) return; - var clipboard = TopLevel.GetTopLevel(this)?.Clipboard; - if (clipboard is null) return; - await clipboard.SetTextAsync(vm.Task.Id); - } - - private async void OnCopyDescriptionClick(object? sender, RoutedEventArgs e) - { - if (DataContext is not DetailsIslandViewModel vm) return; - var clipboard = TopLevel.GetTopLevel(this)?.Clipboard; - if (clipboard is null) return; - await clipboard.SetTextAsync(vm.EditableDescription ?? string.Empty); - } }