feat(queue): warn when the base branch has uncommitted changes

Queuing (update_task_status, batch_update_task_status) and run_task_now
now surface a non-blocking baseDirty warning (separate modified/untracked
counts) when the list's working dir has uncommitted changes at enqueue
time, since a new worktree forks from the commit tip and silently misses
them. BaseDirtyChecker caches per working dir for a few seconds so a
batch queue over many tasks in one list only shells out to git once. The
UI surfaces the same warning via the footer error strip on queue actions.
This commit is contained in:
mika kuns
2026-08-10 14:30:33 +02:00
parent 6a2a19cc9e
commit d3155e6868
23 changed files with 481 additions and 32 deletions
@@ -228,14 +228,15 @@ public class MissionControlViewModelTests : IDisposable
public QueueingWorkerClient(Func<ClaudeDoDbContext> newContext) => _newContext = newContext;
public override async Task SetTaskStatusAsync(string taskId, TaskStatus status)
public override async Task<BaseDirtyWarningDto?> SetTaskStatusAsync(string taskId, TaskStatus status)
{
QueuedTaskIds.Add(taskId);
await using var db = _newContext();
var entity = await db.Tasks.FirstOrDefaultAsync(t => t.Id == taskId);
if (entity is null) return;
if (entity is null) return null;
entity.Status = status;
await db.SaveChangesAsync();
return null;
}
}