From 99c6bf447814d4db5a65e3d9a424dde85d519a2b Mon Sep 17 00:00:00 2001 From: mika kuns Date: Thu, 4 Jun 2026 20:18:24 +0200 Subject: [PATCH] feat(ui): make steps visible at a glance; lift details card off background The single flip-icon hid that steps existed until toggled. Replace it with an always-visible "STEPS" summary strip below the description (open/total count, click to expand and manage). Description is now always the card body. Give the card a Surface2 background + LineBrush border so it separates from the window. Co-Authored-By: Claude Opus 4.7 --- .../Islands/DetailsIslandViewModel.cs | 31 +++-- .../Islands/Detail/DescriptionStepsCard.axaml | 112 +++++++++--------- 2 files changed, 79 insertions(+), 64 deletions(-) diff --git a/src/ClaudeDo.Ui/ViewModels/Islands/DetailsIslandViewModel.cs b/src/ClaudeDo.Ui/ViewModels/Islands/DetailsIslandViewModel.cs index 2be5bd2..c73429d 100644 --- a/src/ClaudeDo.Ui/ViewModels/Islands/DetailsIslandViewModel.cs +++ b/src/ClaudeDo.Ui/ViewModels/Islands/DetailsIslandViewModel.cs @@ -104,15 +104,28 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase [RelayCommand] private void ToggleDescriptionExpanded() => IsDescriptionExpanded = !IsDescriptionExpanded; - // ── Description/Steps card (redesign) ────────────────────────────── - [ObservableProperty] - [NotifyPropertyChangedFor(nameof(IsDescriptionView))] - private bool _isStepsView; - - public bool IsDescriptionView => !IsStepsView; + // ── Description / Steps card (redesign) ───────────────────────────── + // Description is always the card body; steps live in an expandable summary + // strip below it so step presence is visible without switching views. + [ObservableProperty] private bool _isStepsExpanded; [RelayCommand] - private void ToggleCardView() => IsStepsView = !IsStepsView; + private void ToggleStepsExpanded() => IsStepsExpanded = !IsStepsExpanded; + + public int TotalStepCount => Subtasks.Count; + public int OpenStepCount => Subtasks.Count(s => !s.Done); + public string StepsSummary => + TotalStepCount == 0 ? "no steps yet" + : OpenStepCount == 0 ? $"all done · {TotalStepCount} total" + : $"{OpenStepCount} open · {TotalStepCount} total"; + + private void NotifyStepsChanged() + { + OnPropertyChanged(nameof(TotalStepCount)); + OnPropertyChanged(nameof(OpenStepCount)); + OnPropertyChanged(nameof(StepsSummary)); + OnPropertyChanged(nameof(ComposedPreview)); + } // The exact text handed to Claude: title + description + open steps only. public string ComposedPreview => @@ -375,7 +388,7 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase _services = services; _notesApi = notesApi; Notes = new NotesEditorViewModel(_notesApi); - Subtasks.CollectionChanged += (_, _) => OnPropertyChanged(nameof(ComposedPreview)); + Subtasks.CollectionChanged += (_, _) => NotifyStepsChanged(); Loc.LanguageChanged += (_, _) => { OnPropertyChanged(nameof(AgentStatusLabel)); @@ -1140,7 +1153,7 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase { if (row is null) return; row.Done = !row.Done; - OnPropertyChanged(nameof(ComposedPreview)); + NotifyStepsChanged(); await using var ctx = _dbFactory.CreateDbContext(); var repo = new SubtaskRepository(ctx); var subs = await repo.GetByTaskIdAsync(Task?.Id ?? ""); diff --git a/src/ClaudeDo.Ui/Views/Islands/Detail/DescriptionStepsCard.axaml b/src/ClaudeDo.Ui/Views/Islands/Detail/DescriptionStepsCard.axaml index a8459fd..ee30847 100644 --- a/src/ClaudeDo.Ui/Views/Islands/Detail/DescriptionStepsCard.axaml +++ b/src/ClaudeDo.Ui/Views/Islands/Detail/DescriptionStepsCard.axaml @@ -5,69 +5,46 @@ x:Class="ClaudeDo.Ui.Views.Islands.Detail.DescriptionStepsCard" x:DataType="vm:DetailsIslandViewModel"> - + - + - + - - - - - + - - - + - + - - - - + - - + + - - - - - - - - + + + - - + + + + + + + + + + + + + @@ -153,8 +153,10 @@ - - + + + +