Worker and App Program.cs: replace SqliteConnectionFactory+SchemaInitializer
with AddDbContextFactory<ClaudeDoDbContext> + Database.Migrate(). Repos
changed from AddSingleton to AddScoped.
All singleton services (QueueService, StaleTaskRecovery, WorktreeManager,
TaskRunner) and singleton ViewModels (MainWindowViewModel, TaskDetailViewModel,
TaskListViewModel, TaskEditorViewModel) now take IDbContextFactory<ClaudeDoDbContext>
and create short-lived contexts per operation.
Test infrastructure: DbFixture now uses EF migrations instead of SchemaInitializer;
all test classes create contexts via DbFixture.CreateContext().
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Delete SqliteConnectionFactory, SchemaInitializer, and schema.sql.
Fix ValueConverter lambdas in entity configurations (no throw-expressions
in expression trees). Add IDesignTimeDbContextFactory for dotnet-ef tooling.
Generate InitialCreate migration with seed data for agent/manual tags.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace raw ADO.NET implementations with EF Core LINQ queries and
ExecuteUpdate/ExecuteDelete for bulk operations. TaskRepository preserves
FlipAllRunningToFailedAsync(reason) signature and keeps raw SQL for the
atomic queue claim (UPDATE...RETURNING). GetByListAsync alias kept for
backwards compat.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- app: ClaudeTask.ico wired as ApplicationIcon and MainWindow.Icon
via avares URI
- installer: ClaudeTaskSetup.ico wired as ApplicationIcon and embedded
as a WPF Resource so WizardWindow and SettingsWindow can reference it
via pack URI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- task detail vm: LoadAsync now uses a per-call CancellationTokenSource
so rapid TaskUpdated events can't race on _taskId / Subtasks / Tags;
old subtask PropertyChanged handlers are torn down before Clear
- task detail vm: async void event handlers (OnTaskUpdated,
OnWorktreeUpdated, OnSubtaskPropertyChanged) wrap work in try/catch
so thrown exceptions can't crash the Avalonia sync context
- task detail vm: Clear cancels/disposes the load CTS so a late-arriving
LoadAsync can't resurrect detail state after deselect
- app: DisposeAsync the ServiceProvider in a finally after the classic
desktop lifetime ends, so WorkerClient.DisposeAsync runs and the
SignalR connection closes cleanly instead of being abandoned
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- claude process: run stdout/stderr reads without ct; rely on
kill-on-cancel closing the pipes to unblock them — previously
ReadLineAsync(ct) could hang, stalling task slots and shutdown
- task runner: terminal db writes (task_runs, MarkDone, MarkFailed,
SetLogPath) now use CancellationToken.None; RunOnceAsync catches
OCE and finalizes the run row so ContinueAsync can resume
- task repository: GetNextQueuedAgentTaskAsync is now a single
UPDATE ... RETURNING statement — closes TOCTOU window where two
loop iterations could dispatch the same queued task
- queue service: dispose CancellationTokenSource in slot-completion
ContinueWith to stop leaking wait handles
- git service: register ct.Kill(processTree), drain reads without ct,
always reap via WaitForExitAsync(None) — no more git zombies on
cancelled worktree ops
- worktree manager: branch name uses full task id (dashes stripped)
instead of 8-char prefix, eliminating collision risk
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After `sc delete`, the service stays in "marked for deletion" state until
every open handle (services.msc, Task Manager Services tab, Event Viewer,
prior sc query process) is closed. The installer used to immediately call
`sc create` and hit a silent hang / confusing "specified service has been
marked for deletion" error.
Poll `sc query` for up to 30s after delete; if the service is still
registered past that, fail with actionable guidance (close the offending
console or reboot). Also translate exit 1072 from `sc create` into the
same human-readable hint.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Self-contained single-file bundle was crashing at startup with 0xc0000005
in the apphost bootstrap (COR_E_EXECUTIONENGINE), because the Linux Gitea
runner doesn't carry the Microsoft.WindowsDesktop.App runtime pack — the
resulting bundle was missing WPF runtime bits. Disabling compression alone
didn't resolve it.
Switch to framework-dependent single-file: target machines need the .NET 8
Desktop Runtime (x64) installed but the bundle is ~2 MB instead of ~140 MB
and starts reliably. Keep IncludeAllContentForSelfExtract=true so native
deps (e_sqlite3) extract to a temp dir on first run.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Published installer was crashing at launch with 0xc0000005 (access violation)
and exit code 0x80131506 (COR_E_EXECUTIONENGINE), faulting inside the exe's
own bundle-extractor bootstrap before any managed code ran. This is a known
interaction between WPF, single-file publish, and EnableCompressionInSingleFile.
Disable compression (exe grows ~30% but startup becomes reliable).
IncludeAllContentForSelfExtract stays true — WPF still needs on-disk
extraction for XAML resources.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Worker:
- Wire UseWindowsService + Microsoft.Extensions.Hosting.WindowsServices so
SCM's Service Control Protocol handshake succeeds. Previously the binary
exited immediately under sc start, leaving the service registered but
never running.
Installer:
- Pin SDK to .NET 9 (global.json) — SDK 10 dropped win-arm from its RID
graph, breaking restore of the WPF project; .NET 9 keeps win-arm AND
understands the .slnx solution format.
- Force SelfContained=true and default RID=win-x64 when PublishSingleFile
is set, so Rider Publish and CLI produce the same bundle.
- Dark theme: set Background/Foreground explicitly on WizardWindow and
SettingsWindow roots (WPF implicit styles don't cascade to derived
Window types). Custom ComboBox template + ComboBoxItem style so
dropdowns honour the dark palette instead of system defaults.
- Throttle download progress to one report per MB and overwrite the same
UI line (\r prefix marker) instead of appending per chunk.
- Register ClaudeDo in HKLM\...\Uninstall so it appears in Apps & Features.
Copy installer into InstallDir\uninstaller\ for the UninstallString, and
schedule a cmd.exe trampoline to handle the self-delete case when
Apps & Features launches the copy from inside the install dir.
- Treat sc.exe stop exit 1062 (ERROR_SERVICE_NOT_ACTIVE) as success.
- Delete the uninstall registry key during UninstallRunner.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The release workflow runs on a Linux container; building net8.0-windows +
UseWPF=true requires this opt-in property since .NET 8. No-op on Windows.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
TaskDetailView now edits Model / SystemPrompt / Agent inline (LostFocus
save), matching the modal editor. Both TaskEditorView and TaskDetailView
gain a Browse button that opens a .md file picker — external agent
paths are preserved on reload via a synthetic AgentInfo entry. Both
views also render the per-task subtask checklist (CheckBox + TextBox +
remove), with diff-on-save in the editor and inline-save in the detail
panel.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Per-task checklist backend: subtasks table with CASCADE delete,
SubtaskEntity + SubtaskRepository (connection-per-op, async), DI
registration in App and Worker, TaskRunner composes a '## Sub-Tasks'
markdown block into the Claude prompt when subtasks exist.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Lists (320px) and Detail (500px) borders no longer cap the 3-column
grid — star-sizing (1*:2*:1.5*) now fills the window, reducing the
dead whitespace between columns.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removes SourceDirectory field (no longer in InstallContext), adds
dynamic Heading/Subheading/InstallDirEditable for FreshInstall vs Update
mode, and updates XAML to match sibling page style.
Placeholder edit to App.xaml.cs to keep the project building until Task 11
wires the new async detector.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Standalone WPF app (ClaudeDo.Installer) that handles full installation
and ongoing configuration of ClaudeDo. Two modes: wizard for first run,
tabbed settings panel for subsequent launches. Page-based extensibility
via IInstallerPage interface — adding new config sections requires only
one new class.
Install pipeline: dotnet publish, deploy binaries, write configs, init
DB (via SchemaInitializer from ClaudeDo.Data), register Windows Service,
create shortcuts. Dark theme matching the Avalonia app (forest teal accent).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove wrapping ScrollViewer from live output TextBox — Avalonia
TextBox with AcceptsReturn handles its own scrolling; nested
ScrollViewer caused layout collapse
- Auto-scroll via CaretIndex instead of removed ScrollViewer
- Add OnWindowClosed to both editor ViewModels, ensuring the
TaskCompletionSource always resolves when the dialog closes
(including via X button), preventing RelayCommand from staying
permanently disabled
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix event handler leak in TaskDetailView.OnDataContextChanged
(unsubscribe from previous ViewModel before subscribing to new one)
- Move FormatFile call off UI thread with Task.Run to prevent freeze
on large log files
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds Model, SystemPrompt, and AgentPath override fields to TaskEditorViewModel and TaskEditorView. Wires agent loading from WorkerClient in TaskListViewModel before opening the editor dialog.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace LiveLines with formatted LiveText + StreamLineFormatter
- Add log reload from disk for completed tasks
- Add start feedback (starting.../running) on detail and list views
- Apply dark theme (WindowBgBrush, AccentBrush) to editor modals
- Add model/system-prompt/agent-path config to ListEditorView
- Wire config loading/saving in MainWindowViewModel
- Fix duplicate AgentInfo DTO (use canonical Data.Models version)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Parses Claude CLI stream-json output into human-readable text.
Handles text deltas, tool use, results, API retries, and trims large files.
All 13 tests pass.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>