From ee2cbc92ef5b18fc2a5ae77e838cd719ffcfab33 Mon Sep 17 00:00:00 2001 From: mika kuns Date: Thu, 23 Apr 2026 17:40:27 +0200 Subject: [PATCH] feat(ui): move list-settings access from lists pane to tasks header The gear button on list rows became noisy and overlapped with row selection. Moves it into the tasks island header where it targets the currently selected list. Lists pane regains a cleaner row layout. Also: swallow GetListConfig errors on fresh lists that have no row yet. --- src/ClaudeDo.Ui/Design/IslandStyles.axaml | 3 +++ src/ClaudeDo.Ui/Services/WorkerClient.cs | 9 ++++++++- .../ViewModels/Islands/TasksIslandViewModel.cs | 4 +++- src/ClaudeDo.Ui/ViewModels/IslandsShellViewModel.cs | 5 +++++ src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml | 12 ++---------- src/ClaudeDo.Ui/Views/Islands/TasksIslandView.axaml | 4 ++-- 6 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/ClaudeDo.Ui/Design/IslandStyles.axaml b/src/ClaudeDo.Ui/Design/IslandStyles.axaml index b027137..0cd8837 100644 --- a/src/ClaudeDo.Ui/Design/IslandStyles.axaml +++ b/src/ClaudeDo.Ui/Design/IslandStyles.axaml @@ -81,6 +81,9 @@ M13 4 H20 V11 H18 V7.4 L11.4 14 L10 12.6 L16.6 6 H13 Z M4 6 H10 V8 H6 V18 H16 V14 H18 V20 H4 Z + + M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8z M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65a.5.5 0 0 0 .12-.64l-2-3.46a.5.5 0 0 0-.61-.22l-2.49 1a7.03 7.03 0 0 0-1.69-.98l-.38-2.65a.5.5 0 0 0-.5-.42h-4a.5.5 0 0 0-.5.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1a.5.5 0 0 0-.61.22l-2 3.46a.5.5 0 0 0 .12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65a.5.5 0 0 0-.12.64l2 3.46a.5.5 0 0 0 .61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65a.5.5 0 0 0 .5.42h4a.5.5 0 0 0 .5-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1a.5.5 0 0 0 .61-.22l2-3.46a.5.5 0 0 0-.12-.64l-2.11-1.65z + diff --git a/src/ClaudeDo.Ui/Services/WorkerClient.cs b/src/ClaudeDo.Ui/Services/WorkerClient.cs index 462b1e6..0612c37 100644 --- a/src/ClaudeDo.Ui/Services/WorkerClient.cs +++ b/src/ClaudeDo.Ui/Services/WorkerClient.cs @@ -308,7 +308,14 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable public async Task GetListConfigAsync(string listId) { - return await _hub.InvokeAsync("GetListConfig", listId); + try + { + return await _hub.InvokeAsync("GetListConfig", listId); + } + catch + { + return null; + } } public async Task UpdateTaskAgentSettingsAsync(UpdateTaskAgentSettingsDto dto) diff --git a/src/ClaudeDo.Ui/ViewModels/Islands/TasksIslandViewModel.cs b/src/ClaudeDo.Ui/ViewModels/Islands/TasksIslandViewModel.cs index 28f313f..904a654 100644 --- a/src/ClaudeDo.Ui/ViewModels/Islands/TasksIslandViewModel.cs +++ b/src/ClaudeDo.Ui/ViewModels/Islands/TasksIslandViewModel.cs @@ -351,8 +351,10 @@ public sealed partial class TasksIslandViewModel : ViewModelBase [RelayCommand] private void Sort() { /* placeholder — UI-only */ } + public event EventHandler? OpenListSettingsRequested; + [RelayCommand] - private void More() { /* placeholder — UI-only */ } + private void OpenListSettings() => OpenListSettingsRequested?.Invoke(this, EventArgs.Empty); partial void OnSelectedTaskChanged(TaskRowViewModel? value) { diff --git a/src/ClaudeDo.Ui/ViewModels/IslandsShellViewModel.cs b/src/ClaudeDo.Ui/ViewModels/IslandsShellViewModel.cs index fdb3e82..50e760b 100644 --- a/src/ClaudeDo.Ui/ViewModels/IslandsShellViewModel.cs +++ b/src/ClaudeDo.Ui/ViewModels/IslandsShellViewModel.cs @@ -101,6 +101,11 @@ public sealed partial class IslandsShellViewModel : ViewModelBase Lists.SelectionChanged += (_, _) => Tasks.LoadForList(Lists.SelectedList); Tasks.SelectionChanged += (_, _) => Details.Bind(Tasks.SelectedTask); Tasks.TasksChanged += (_, _) => _ = Lists.RefreshCountsAsync(); + Tasks.OpenListSettingsRequested += (_, _) => + { + if (Lists.SelectedList is { } row) + Lists.OpenListSettingsCommand.Execute(row); + }; Details.CloseDetail = () => Tasks.SelectedTask = null; Details.DeleteFromList = row => { diff --git a/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml b/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml index 5f41145..89f09d5 100644 --- a/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml +++ b/src/ClaudeDo.Ui/Views/Islands/ListsIslandView.axaml @@ -134,9 +134,9 @@ CommandParameter="{Binding}"/> - + - @@ -159,14 +159,6 @@ - - -