fix(ui): Aktions- und Bestätigungs-Konsistenz (UX-Audit #3)
Sechs Konsistenz-Fixes: Delete-Task ins Zeilen-Kontextmenü (routet über den Worker wie DetailsIslandViewModel.DeleteTaskAsync, damit ein gelöschtes Child den WaitingForChildren-Parent korrekt weiterschaltet); EnqueueCommand als "Send to queue"-Button im Detail-Pane verdrahtet; Settings-Eintrag im Listen-Kontextmenü ergänzt; Worktree-Discard und Reset-All laufen jetzt über das jeweils vorhandene Confirm-Hook (ConfirmAction / neuer ConfirmAsync-Hook auf WorktreesSettingsTabViewModel) statt ohne Rückfrage bzw. über ein Inline-Reveal-Banner; killSessionTip/closeSession und die deutschen Queue-Strings im usageMonitor vereinheitlicht. Kein zweiter Dialog-Mechanismus eingeführt — überall die vorhandenen Hooks wiederverwendet.
This commit is contained in:
@@ -15,12 +15,15 @@ public sealed partial class WorktreesSettingsTabViewModel : ViewModelBase
|
||||
[ObservableProperty] private bool _worktreeAutoCleanupEnabled;
|
||||
[ObservableProperty] private int _worktreeAutoCleanupDays = 7;
|
||||
|
||||
[ObservableProperty] private bool _showResetConfirm;
|
||||
[ObservableProperty] private string _statusMessage = "";
|
||||
[ObservableProperty] private bool _isBusy;
|
||||
|
||||
public OperationStatus ResetStatus { get; } = new();
|
||||
|
||||
/// <summary>Wired by <c>WindowDialogService.ShowSettingsAsync</c>. A missing hook (null)
|
||||
/// must not reset silently — <see cref="ConfirmResetAll"/> aborts instead.</summary>
|
||||
public Func<string, Task<bool>>? ConfirmAsync { get; set; }
|
||||
|
||||
public IReadOnlyList<string> WorktreeStrategies { get; } = new[] { "sibling", "central" };
|
||||
|
||||
public WorktreesSettingsTabViewModel(IWorkerClient worker) => _worker = worker;
|
||||
@@ -52,13 +55,13 @@ public sealed partial class WorktreesSettingsTabViewModel : ViewModelBase
|
||||
finally { IsBusy = false; }
|
||||
}
|
||||
|
||||
[RelayCommand] private void RequestResetConfirm() => ShowResetConfirm = true;
|
||||
[RelayCommand] private void CancelResetConfirm() => ShowResetConfirm = false;
|
||||
|
||||
[RelayCommand]
|
||||
private async Task ConfirmResetAll()
|
||||
{
|
||||
ShowResetConfirm = false; StatusMessage = "";
|
||||
if (ConfirmAsync is null) return;
|
||||
if (!await ConfirmAsync(Loc.T("settings.worktrees.confirmRemoveAll"))) return;
|
||||
|
||||
StatusMessage = "";
|
||||
using var op = ResetStatus.Begin(Loc.T("ops.worktrees.resetting"));
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user