A LocalSystem Windows service can't see the logged-in user's Claude CLI authentication, so the worker now runs as the current user via a hidden per-user logon Scheduled Task with restart-on-failure. - Worker is WinExe (no console window) with a Serilog rolling file sink and a single-instance mutex so the logon task, app ensure-running, and Restart button can't fight over the SignalR port. - Installer replaces the service steps (register/start/stop) with autostart task steps, migrates the legacy ClaudeDoWorker service away on update, and removes the task on uninstall. ServicePage drops the service-account UI. - UI gains a WorkerLocator; the app ensures the worker is running at startup and the Restart button kills+relaunches this install's worker process. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
50 lines
2.7 KiB
XML
50 lines
2.7 KiB
XML
<UserControl x:Class="ClaudeDo.Installer.Pages.ServicePage.ServicePageView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:ClaudeDo.Installer.Pages.ServicePage"
|
|
d:DataContext="{d:DesignInstance local:ServicePageViewModel}"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d">
|
|
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
<StackPanel MaxWidth="520">
|
|
<TextBlock Text="Worker" FontSize="18" FontWeight="SemiBold" Margin="0,0,0,4"/>
|
|
<TextBlock Text="Configure the ClaudeDo background worker."
|
|
Foreground="{StaticResource TextSecondaryBrush}" Margin="0,0,0,20"
|
|
TextWrapping="Wrap"/>
|
|
|
|
<Label Content="SignalR Port"/>
|
|
<TextBox Text="{Binding SignalRPort, UpdateSourceTrigger=PropertyChanged}" Margin="0,0,0,12"/>
|
|
|
|
<Label Content="Queue Backstop Interval (ms)"/>
|
|
<TextBox Text="{Binding QueueBackstopIntervalMs, UpdateSourceTrigger=PropertyChanged}" Margin="0,0,0,12"/>
|
|
|
|
<Label Content="Claude CLI Path"/>
|
|
<Grid Margin="0,0,0,12">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBox Grid.Column="0" Text="{Binding ClaudeBin, UpdateSourceTrigger=PropertyChanged}"/>
|
|
<Button Grid.Column="1" Content="Browse..." Command="{Binding BrowseClaudeCommand}"
|
|
Margin="8,0,0,0"/>
|
|
</Grid>
|
|
|
|
<Separator Margin="0,4,0,12"/>
|
|
|
|
<TextBlock Text="The worker runs as you (the logged-in user) via a per-user logon task, so it can use your Claude CLI authentication."
|
|
Foreground="{StaticResource TextDimBrush}" FontSize="11" Margin="0,0,0,12"
|
|
TextWrapping="Wrap"/>
|
|
|
|
<CheckBox Content="Start worker automatically at logon" IsChecked="{Binding AutoStart}" Margin="0,0,0,12"/>
|
|
|
|
<Label Content="Restart Delay (ms)"/>
|
|
<TextBox Text="{Binding RestartDelayMs, UpdateSourceTrigger=PropertyChanged}" Margin="0,0,0,12"/>
|
|
|
|
<TextBlock Text="{Binding ValidationError}" Foreground="{StaticResource ErrorBrush}" FontSize="11"
|
|
Visibility="{Binding ValidationError, Converter={StaticResource NullToCollapsedConverter}}"/>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</UserControl>
|