chore(ui): clear build warnings

- Guard Windows-only ServiceController/registry calls behind SupportedOSPlatform
  and OperatingSystem.IsWindows() (CA1416)
- Initialize test-only ctor fields with null! (CS8618)
- Migrate obsolete Avalonia APIs: Watermark -> PlaceholderText,
  SystemDecorations -> WindowDecorations

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-05-29 14:25:44 +02:00
parent 12668f684f
commit 19f22d2d97
14 changed files with 33 additions and 29 deletions

View File

@@ -5,7 +5,7 @@
x:DataType="vm:DiffModalViewModel"
Title="Diff"
Width="1200" Height="800"
SystemDecorations="None"
WindowDecorations="None"
ExtendClientAreaToDecorationsHint="True"
WindowStartupLocation="CenterOwner"
Background="{StaticResource SurfaceBrush}">

View File

@@ -7,7 +7,7 @@
Width="520" Height="720"
CanResize="True"
MinWidth="460" MinHeight="520"
SystemDecorations="None"
WindowDecorations="None"
ExtendClientAreaToDecorationsHint="True"
WindowStartupLocation="CenterOwner"
Background="{DynamicResource SurfaceBrush}">
@@ -89,7 +89,7 @@
<StackPanel Spacing="4">
<TextBlock Classes="field-label" Text="Working directory"/>
<Grid ColumnDefinitions="*,Auto">
<TextBox Grid.Column="0" Text="{Binding WorkingDir}" Watermark="(none)" />
<TextBox Grid.Column="0" Text="{Binding WorkingDir}" PlaceholderText="(none)" />
<Button Grid.Column="1" Content="Browse..." Margin="8,0,0,0" Click="BrowseClicked" />
</Grid>
</StackPanel>

View File

@@ -6,7 +6,7 @@
Title="Merge worktree"
Width="560" Height="460"
CanResize="False"
SystemDecorations="None"
WindowDecorations="None"
ExtendClientAreaToDecorationsHint="True"
WindowStartupLocation="CenterOwner"
Background="{DynamicResource SurfaceBrush}">

View File

@@ -8,7 +8,7 @@
x:DataType="vm:SettingsModalViewModel"
Title="Settings"
Width="580" Height="760"
SystemDecorations="None"
WindowDecorations="None"
ExtendClientAreaToDecorationsHint="True"
WindowStartupLocation="CenterOwner"
Background="{DynamicResource SurfaceBrush}">
@@ -94,7 +94,7 @@
<StackPanel Spacing="4">
<TextBlock Classes="field-label" Text="Default instructions"/>
<TextBox AcceptsReturn="True" TextWrapping="Wrap" Height="110"
Watermark="Baseline instructions applied to every task"
PlaceholderText="Baseline instructions applied to every task"
Text="{Binding General.DefaultClaudeInstructions, Mode=TwoWay}"/>
</StackPanel>
<Grid ColumnDefinitions="*,12,*,12,*">
@@ -133,7 +133,7 @@
<StackPanel Grid.Column="2" Spacing="4">
<TextBlock Classes="field-label" Text="Central worktree root"/>
<TextBox Text="{Binding Worktrees.CentralWorktreeRoot, Mode=TwoWay}"
Watermark="e.g. C:\worktrees"/>
PlaceholderText="e.g. C:\worktrees"/>
</StackPanel>
</Grid>
<StackPanel Orientation="Horizontal" Spacing="8">

View File

@@ -6,7 +6,7 @@
Title="Unfinished planning session"
Width="440" Height="200"
CanResize="False"
SystemDecorations="None"
WindowDecorations="None"
ExtendClientAreaToDecorationsHint="True"
WindowStartupLocation="CenterOwner"
Background="{DynamicResource SurfaceBrush}">

View File

@@ -8,7 +8,7 @@
Width="1100" Height="720"
MinWidth="640" MinHeight="400"
WindowStartupLocation="CenterOwner"
SystemDecorations="BorderOnly"
WindowDecorations="BorderOnly"
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaTitleBarHeightHint="-1"
Background="Transparent"

View File

@@ -9,7 +9,7 @@
CanResize="True"
WindowStartupLocation="CenterOwner"
Background="{DynamicResource SurfaceBrush}"
SystemDecorations="BorderOnly"
WindowDecorations="BorderOnly"
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaTitleBarHeightHint="-1">