From 2fe2ac83b1171dfc1726fb6d0a37a6e55ea632f9 Mon Sep 17 00:00:00 2001 From: mika kuns Date: Thu, 27 Aug 2026 13:41:03 +0200 Subject: [PATCH] fix(ui): Import-Erfolgsmeldung nicht mehr als Fehler einfaerben Der Footer-Strip trug schon immer ein Level, es gab nur keinen Einstiegspunkt jenseits von FlashFooterError. "3 neue Tasks" in Rot liest sich als Fehlschlag. --- .../ViewModels/Islands/ListsIslandViewModel.cs | 8 ++++---- src/ClaudeDo.Ui/ViewModels/IslandsShellViewModel.cs | 12 ++++++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/ClaudeDo.Ui/ViewModels/Islands/ListsIslandViewModel.cs b/src/ClaudeDo.Ui/ViewModels/Islands/ListsIslandViewModel.cs index 095e80c1..850594b4 100644 --- a/src/ClaudeDo.Ui/ViewModels/Islands/ListsIslandViewModel.cs +++ b/src/ClaudeDo.Ui/ViewModels/Islands/ListsIslandViewModel.cs @@ -33,6 +33,9 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable // mirrors TasksIslandViewModel.ErrorReported โ€” surfaces modal-owned failures in the footer strip. public event Action? ErrorReported; + // Same strip, but for an action that succeeded and has a result worth showing. + public event Action? SuccessReported; + public IDialogService? Dialogs { get; set; } [RelayCommand] @@ -528,10 +531,7 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable try { var result = await _worker.ImportTicketsAsync(rawId); - // No FlashFooterInfo variant exists in this project โ€” the footer strip only has an - // error channel (ErrorReported -> IslandsShellViewModel.FlashFooterError). A silent - // success is the worse option, so the result reuses the same channel. - ErrorReported?.Invoke(Loc.T("lists.importTicketsResult", result.Examined, result.Created)); + SuccessReported?.Invoke(Loc.T("lists.importTicketsResult", result.Examined, result.Created)); } catch (Exception ex) { diff --git a/src/ClaudeDo.Ui/ViewModels/IslandsShellViewModel.cs b/src/ClaudeDo.Ui/ViewModels/IslandsShellViewModel.cs index 13623fbb..00073357 100644 --- a/src/ClaudeDo.Ui/ViewModels/IslandsShellViewModel.cs +++ b/src/ClaudeDo.Ui/ViewModels/IslandsShellViewModel.cs @@ -190,10 +190,17 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable // Surfaces a UI-originated failure in the footer status strip (same line as the // worker log), color-coded as an error and auto-cleared by _clearTimer. - public void FlashFooterError(string message) + public void FlashFooterError(string message) => FlashFooter(message, WorkerLogLevel.Error); + + // Same strip, for an action that succeeded and has something to report ("3 new tasks"). + // The strip has always carried a level โ€” routing a success through FlashFooterError would + // paint a good outcome red, which reads as a failure. + public void FlashFooterSuccess(string message) => FlashFooter(message, WorkerLogLevel.Success); + + private void FlashFooter(string message, WorkerLogLevel level) { WorkerLogText = $"{DateTime.Now:HH:mm} ยท {message}"; - WorkerLogLevel = WorkerLogLevel.Error; + WorkerLogLevel = level; IsWorkerLogVisible = true; _clearTimer.Stop(); _clearTimer.Start(); @@ -337,6 +344,7 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable Tasks.PrepRequested += () => Details.ShowPrep(); Tasks.ErrorReported += FlashFooterError; Lists.ErrorReported += FlashFooterError; + Lists.SuccessReported += FlashFooterSuccess; Tasks.OpenConPtySessionRequested += taskId => { OpenMissionControl();