Add PlanningSessionFiles, PlanningSessionStartContext/ResumeContext DTOs,
PlanningSessionManager.StartAsync (file scaffolding + status transition),
and integration tests. Also fix migration discovery by adding [DbContext]
attribute to all migration classes and switch DbFixture to EnsureCreated.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add IWorkerClient interface; WorkerClient implements it
- TasksIslandViewModel accepts IWorkerClient? and gains OpenPlanningSession,
ResumePlanningSession, DiscardPlanningSession, FinalizePlanningSession,
and ToggleExpand commands
- Regroup() is hierarchy-aware: children of collapsed planning parents are hidden
- InternalsVisibleTo ClaudeDo.Worker.Tests for Regroup()
- 4 new unit tests covering collapse/expand and guard logic
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds ParentTaskId, IsExpanded, IsChild, IsPlanningParent, IsDraft, and
PlanningBadge to TaskRowViewModel with property-changed notifications.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add GitService.CheckoutBranchAsync; compare targetBranch to current HEAD
before MergeNoFfAsync and switch when they differ. Returns Blocked if the
branch does not exist. Add three new tests (two service, one GitService).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>
- 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>