feat(daily-prep): add DailyPrepMaxTasks editor to Prime Claude settings

This commit is contained in:
mika kuns
2026-06-03 16:33:00 +02:00
parent 2d00160283
commit 5e0859fbb8
5 changed files with 11 additions and 4 deletions

View File

@@ -50,6 +50,7 @@
"prime": {
"description": "Bereite dein Claude-Nutzungsfenster vor, indem an den von dir gewählten Tagen zu einer bestimmten Zeit ein einzelner nicht-interaktiver Ping ausgelöst wird. Läuft nur, solange ClaudeDo geöffnet ist. Wenn die App innerhalb von 30 Minuten vor der Zielzeit startet, wird der Ping sofort ausgelöst.",
"addSchedule": "+ Zeitplan hinzufügen",
"dailyPrepMaxTasks": "Max. Aufgaben pro Tag",
"dayMo": "Mo",
"dayTu": "Di",
"dayWe": "Mi",

View File

@@ -50,6 +50,7 @@
"prime": {
"description": "Prime your Claude usage window by firing a single non-interactive ping on the days you choose, at a chosen time. Only runs while ClaudeDo is open. If the app starts within 30 minutes of the target time, the ping fires immediately.",
"addSchedule": "+ Add schedule",
"dailyPrepMaxTasks": "Max tasks per day",
"dayMo": "Mo",
"dayTu": "Tu",
"dayWe": "We",

View File

@@ -10,6 +10,8 @@ public sealed partial class PrimeClaudeTabViewModel : ViewModelBase
private readonly IPrimeScheduleApi _api;
private readonly HashSet<Guid> _initialIds = new();
[ObservableProperty] private int _dailyPrepMaxTasks = 5;
public ObservableCollection<PrimeScheduleRowViewModel> Rows { get; } = new();
public PrimeClaudeTabViewModel(IPrimeScheduleApi api) => _api = api;

View File

@@ -22,8 +22,6 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
[ObservableProperty] private bool _isBusy;
[ObservableProperty] private string _statusMessage = "";
private int _loadedDailyPrepMaxTasks = 5;
public Action? CloseAction { get; set; }
public SettingsModalViewModel(WorkerClient worker, PrimeClaudeTabViewModel prime,
@@ -62,7 +60,7 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
: string.Join(Environment.NewLine,
System.Text.Json.JsonSerializer.Deserialize<List<string>>(dto.ReportExcludedPaths) ?? new());
General.StandupWeekday = dto.StandupWeekday is >= 0 and <= 6 ? dto.StandupWeekday : (int)DayOfWeek.Wednesday;
_loadedDailyPrepMaxTasks = dto.DailyPrepMaxTasks < 1 ? 5 : dto.DailyPrepMaxTasks;
Prime.DailyPrepMaxTasks = dto.DailyPrepMaxTasks < 1 ? 5 : dto.DailyPrepMaxTasks;
}
else StatusMessage = Loc.T("vm.settingsModal.workerOffline");
@@ -95,7 +93,7 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
General.ReportExcludedPaths
.Split('\n').Select(l => l.Trim().TrimEnd('\r')).Where(l => l.Length > 0).ToList()),
General.StandupWeekday,
_loadedDailyPrepMaxTasks);
Prime.DailyPrepMaxTasks);
await _worker.UpdateAppSettingsAsync(dto);
await Prime.SaveAsync();
CloseAction?.Invoke();

View File

@@ -239,6 +239,11 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
<Button Classes="btn" Content="{loc:Tr settings.prime.addSchedule}" Command="{Binding Prime.AddScheduleCommand}" HorizontalAlignment="Left"/>
<StackPanel Orientation="Horizontal" Spacing="8" VerticalAlignment="Center">
<TextBlock Classes="field-label" Text="{loc:Tr settings.prime.dailyPrepMaxTasks}" VerticalAlignment="Center"/>
<NumericUpDown Minimum="1" Maximum="50" Increment="1" Width="100" FormatString="0"
Value="{Binding Prime.DailyPrepMaxTasks, Mode=TwoWay}"/>
</StackPanel>
</StackPanel>
</ScrollViewer>
</TabItem>