App: build a ServiceProvider in Program.cs (AppSettings, SqliteConnectionFactory, all repositories, GitService, WorkerClient, all view-models), apply schema, then hand control to Avalonia. App.OnFrameworkInitializationCompleted resolves MainWindowViewModel from the container. Ui: - AppSettings POCO loaded from ~/.todo-app/ui.config.json (db path, hub url). - WorkerClient wraps HubConnection with auto-reconnect, exposes IsConnected and ActiveTasks plus C# events for TaskStarted/Finished/Message/Updated and WorktreeUpdated; all inbound events are marshalled to the UI thread. - ViewModels: MainWindow (lists CRUD via ListEditor dialog), TaskList (load by list, add/edit/delete, auto WakeQueue on agent+queued create), TaskItem (RunNow gated on connection + status), TaskDetail (description, result, live ndjson rolling buffer of 500 lines, worktree branch/diff with merge/keep/ discard via GitService), StatusBar, ListEditor, TaskEditor. - Views: 3-pane MainWindow (lists | tasks | detail) with GridSplitters, status bar, dialog windows for the editors. Status badges via StatusColorConverter. - Markdown rendering, folder picker, delete-confirmation, settings dialog and scroll-to-bottom on the live log are intentionally TODO -- functional scaffold only. Tests: also debounce the FIFO queue test (poll instead of Task.Delay(200)) so the assertion isn't racy when the suite runs alongside the slower git tests. 38 tests pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
23 lines
1.2 KiB
XML
23 lines
1.2 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:ClaudeDo.Ui.ViewModels"
|
|
xmlns:conv="using:ClaudeDo.Ui.Converters"
|
|
x:Class="ClaudeDo.Ui.Views.StatusBarView"
|
|
x:DataType="vm:StatusBarViewModel">
|
|
<Border Background="#222" Padding="6,3">
|
|
<Grid ColumnDefinitions="Auto,Auto,*,Auto">
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="6">
|
|
<Ellipse Width="10" Height="10" VerticalAlignment="Center"
|
|
Fill="{Binding ConnectionStatus, Converter={x:Static conv:ConnectionColorConverter.Instance}}"/>
|
|
<TextBlock Text="{Binding ConnectionStatus}" Foreground="White" VerticalAlignment="Center" FontSize="12"/>
|
|
</StackPanel>
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding ActiveTasksSummary}" Foreground="LightGray"
|
|
VerticalAlignment="Center" Margin="20,0,0,0" FontSize="12"/>
|
|
|
|
<TextBlock Grid.Column="3" Text="{Binding StatusMessage}" Foreground="Yellow"
|
|
VerticalAlignment="Center" FontSize="12" Margin="0,0,8,0"/>
|
|
</Grid>
|
|
</Border>
|
|
</UserControl>
|