feat(ui): Throttle-Stufen im Ausfuehrung-Tab sichtbar machen

Die vier UsageThrottle-Prozente waren nur per Gauge-Drag im Usage-Monitor
erreichbar und wurden im Settings-Modal unsichtbar durchgeschleift. Jetzt
read-only angezeigt plus Button in den Usage-Monitor. Der Button schliesst die
Settings absichtlich: Save() schreibt die beim Oeffnen gelesenen Throttle-Werte
zurueck und wuerde ein zwischenzeitliches Draggen ueberschreiben.
This commit is contained in:
mika kuns
2026-08-27 10:39:08 +02:00
parent 4464dc6ff1
commit 31d53b0033
5 changed files with 71 additions and 0 deletions
@@ -66,6 +66,18 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
[RelayCommand]
private void OpenRepoImport() => RequestRepoImport?.Invoke();
// Same deal for the usage monitor, which owns the throttle-stage editor. It must *close* this
// modal rather than stack on top: Save() writes the throttle values it read at open, so a drag
// made while Settings is still open would be overwritten on save.
public Action? RequestUsageMonitor { get; set; }
[RelayCommand]
private void OpenUsageMonitor() => RequestUsageMonitor?.Invoke();
/// Read-only echo of the four throttle percentages, which are edited by dragging the
/// usage-monitor gauges — without this the Execution tab silently carries them through.
[ObservableProperty] private string _throttleSummary = "";
[ObservableProperty] private string _validationError = "";
[ObservableProperty] private bool _isBusy;
[ObservableProperty] private string _statusMessage = "";
@@ -135,6 +147,9 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
_throttleStages = (
dto.UsageThrottleFiveHourSoftPct, dto.UsageThrottleFiveHourHardPct,
dto.UsageThrottleSevenDaySoftPct, dto.UsageThrottleSevenDayHardPct);
ThrottleSummary = Loc.T("settings.general.throttleStagesValues",
_throttleStages.FiveSoft, _throttleStages.FiveHard,
_throttleStages.SevenSoft, _throttleStages.SevenHard);
Worktrees.WorktreeStrategy = dto.WorktreeStrategy ?? "sibling";
Worktrees.CentralWorktreeRoot = dto.CentralWorktreeRoot;
Worktrees.WorktreeAutoCleanupEnabled = dto.WorktreeAutoCleanupEnabled;
@@ -148,6 +163,7 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
}
else StatusMessage = Loc.T("vm.settingsModal.workerOffline");
await Files.LoadClaudeBinAsync();
await Prime.LoadAsync();
await OnlineInbox.LoadAsync();
await SessionSkills.LoadAsync(dto?.SessionSkills);