fix(ui): validate PowerUse window, explain effort and Prime Claude in Settings
Three usability-audit findings in Settings: - An unparseable PowerUse window (e.g. "9:0") used to save silently as null (= round the clock), the opposite of what the typo implied. Validate() now rejects an unparseable start/end unless blank; the worker-side read-time tolerance is unchanged. - "Effort" column header gets a tooltip explaining it's the model's reasoning effort (cost/depth tradeoff). - The "Prime Claude" tab gets a tooltip explaining scheduled Claude runs (Ping / Fill My Day / custom prompt). New locale keys added to en+de. Updated the PowerUse round-trip test that asserted the old silent-normalize behavior.
This commit is contained in:
@@ -119,8 +119,13 @@ public sealed partial class GeneralSettingsTabViewModel : ViewModelBase
|
||||
foreach (var row in ModelPresets)
|
||||
if (row.MaxTurns is < 1 or > 200)
|
||||
return $"Max turns for {row.Model} must be between 1 and 200.";
|
||||
if (!IsValidWindowBound(PowerUseWindowStart) || !IsValidWindowBound(PowerUseWindowEnd))
|
||||
return Loc.T("settings.general.powerUseWindowInvalid");
|
||||
return null;
|
||||
}
|
||||
|
||||
private static bool IsValidWindowBound(string? value)
|
||||
=> string.IsNullOrWhiteSpace(value) || PowerUseWindow.Parse(value) is not null;
|
||||
}
|
||||
|
||||
/// <summary>One row of the per-model preset table. Single consumer, so it lives here.</summary>
|
||||
|
||||
@@ -190,7 +190,8 @@
|
||||
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
|
||||
<Grid ColumnDefinitions="90,12,*,12,110" Margin="0,4,0,0">
|
||||
<TextBlock Grid.Column="0" Classes="eyebrow" Text="{loc:Tr settings.general.model}"/>
|
||||
<TextBlock Grid.Column="2" Classes="eyebrow" Text="{loc:Tr settings.general.effort}"/>
|
||||
<TextBlock Grid.Column="2" Classes="eyebrow" Text="{loc:Tr settings.general.effort}"
|
||||
ToolTip.Tip="{loc:Tr settings.general.effortHint}"/>
|
||||
<TextBlock Grid.Column="4" Classes="eyebrow" Text="{loc:Tr settings.general.maxTurns}"/>
|
||||
</Grid>
|
||||
<ItemsControl ItemsSource="{Binding General.ModelPresets}">
|
||||
@@ -307,7 +308,8 @@
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="{loc:Tr settings.sidebar.categoryPrime}">
|
||||
<TabItem Header="{loc:Tr settings.sidebar.categoryPrime}"
|
||||
ToolTip.Tip="{loc:Tr settings.sidebar.categoryPrimeHint}">
|
||||
<ScrollViewer>
|
||||
<StackPanel Spacing="12" Margin="0,8,0,0">
|
||||
<Border IsVisible="{Binding !HasLinkedRepo}"
|
||||
|
||||
Reference in New Issue
Block a user