From b90c5855f4abca62e4bc506ed913a98f96ed10dc Mon Sep 17 00:00:00 2001 From: CubeGameLP <126233386+CubeGameLP@users.noreply.github.com> Date: Fri, 28 Aug 2026 21:36:28 +0200 Subject: [PATCH] fix(notes): let Shift+Enter break the line, and clear the leftovers around the editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shift+Enter did nothing because AcceptsReturn was only set from a style setter and never reached the box. Setting it on the element is half the fix: TextBox.OnKeyDown consumes Enter regardless of modifiers and runs before any bubbling handler, so the split chain would have died in its place. Enter is now taken in the tunnel phase and Shift+Enter is left to the box. Alongside, the notes list stops borrowing furniture it has no use for: no "0 open tasks" subtitle, no show-completed and list-settings buttons, and no details pane beside it — the editor spans that column instead of leaving it empty. Co-Authored-By: Claude Opus 5 --- .../Islands/TasksIslandViewModel.cs | 3 ++- .../ViewModels/IslandsShellViewModel.cs | 21 +++++++++++++++++-- .../Views/Islands/NotesEditorView.axaml | 9 +++++--- .../Views/Islands/NotesEditorView.axaml.cs | 8 ++++++- .../Views/Islands/TasksIslandView.axaml | 4 +++- src/ClaudeDo.Ui/Views/MainWindow.axaml | 2 +- 6 files changed, 38 insertions(+), 9 deletions(-) diff --git a/src/ClaudeDo.Ui/ViewModels/Islands/TasksIslandViewModel.cs b/src/ClaudeDo.Ui/ViewModels/Islands/TasksIslandViewModel.cs index 2a554036..c95079ba 100644 --- a/src/ClaudeDo.Ui/ViewModels/Islands/TasksIslandViewModel.cs +++ b/src/ClaudeDo.Ui/ViewModels/Islands/TasksIslandViewModel.cs @@ -808,7 +808,8 @@ public sealed partial class TasksIslandViewModel : ViewModelBase, IDisposable var running = Items.Count(i => i.Status == TaskStatus.Running); var review = Items.Count(i => i.Status == TaskStatus.Done && i.Branch != null); - Subtitle = open == 1 ? "1 open task" : $"{open} open tasks"; + // The notes list holds no tasks — an "0 open tasks" line under its header is just noise. + Subtitle = IsNotesList ? "" : open == 1 ? "1 open task" : $"{open} open tasks"; if (running > 0 || review > 0) { diff --git a/src/ClaudeDo.Ui/ViewModels/IslandsShellViewModel.cs b/src/ClaudeDo.Ui/ViewModels/IslandsShellViewModel.cs index dceb7389..ea21b950 100644 --- a/src/ClaudeDo.Ui/ViewModels/IslandsShellViewModel.cs +++ b/src/ClaudeDo.Ui/ViewModels/IslandsShellViewModel.cs @@ -145,7 +145,14 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable [ObservableProperty] private bool _isWorkerLogVisible; - public bool ShowDetails => WindowWidth >= 1100; + /// The notes list has nothing to show a detail pane for, so the pane goes away and + /// the editor takes the space instead of leaving an empty column beside it. + public bool ShowDetails => WindowWidth >= 1100 && Tasks?.IsNotesList != true; + + /// Widens the tasks island over the splitter and the details column when that column + /// is hidden — a fixed-width ColumnDefinition keeps its space even with an invisible child. + public int TasksColumnSpan => ShowDetails ? 1 : 3; + public bool ShowLists => WindowWidth >= 780; private readonly System.Timers.Timer _clearTimer = new(30_000) { AutoReset = false }; @@ -168,10 +175,16 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable partial void OnWindowWidthChanged(double value) { - OnPropertyChanged(nameof(ShowDetails)); + NotifyDetailsVisibility(); OnPropertyChanged(nameof(ShowLists)); } + private void NotifyDetailsVisibility() + { + OnPropertyChanged(nameof(ShowDetails)); + OnPropertyChanged(nameof(TasksColumnSpan)); + } + public void OnWorkerLogReceived(WorkerLogEntry entry) { var hhmm = entry.TimestampUtc.ToLocalTime().ToString("HH:mm"); @@ -341,6 +354,10 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable Lists.SelectionChanged += (_, _) => _ = RefreshStaleWorkerCheckAsync(); Tasks.SelectionChanged += (_, _) => Details.Bind(Tasks.SelectedTask, Tasks.SelectionSource); Tasks.PrepRequested += () => Details.ShowPrep(); + Tasks.PropertyChanged += (_, e) => + { + if (e.PropertyName == nameof(TasksIslandViewModel.IsNotesList)) NotifyDetailsVisibility(); + }; Tasks.ErrorReported += FlashFooterError; Lists.ErrorReported += FlashFooterError; Lists.SuccessReported += FlashFooterSuccess; diff --git a/src/ClaudeDo.Ui/Views/Islands/NotesEditorView.axaml b/src/ClaudeDo.Ui/Views/Islands/NotesEditorView.axaml index 5f14cce7..1fa35a61 100644 --- a/src/ClaudeDo.Ui/Views/Islands/NotesEditorView.axaml +++ b/src/ClaudeDo.Ui/Views/Islands/NotesEditorView.axaml @@ -13,8 +13,6 @@ - -