feat(worker): surface rebase and worktree-maintenance progress on OperationProgress

RebaseOthersAfterMergeAsync now broadcasts a "rebasing" phase with i/n over the
WaitingForReview branches it checks, so the merge/continue_merge callers stop
showing the stalled "Merging…" phase while the best-effort rebase loop runs
(rebase still runs before the verify gate; a failed rebase still leaves the
merge itself successful). WorktreeMaintenanceService gained an optional
HubBroadcaster to report the same i/n shape per worktree during
cleanup/reset, with no new UI surface (deliberately out of scope). Both
review-action viewmodels now also listen on OperationProgressEvent (which
carries the total that the elapsed-seconds-only MergeProgressEvent drops) to
render "Rebasing other worktrees… (i/n)".
This commit is contained in:
mika kuns
2026-08-21 13:33:02 +02:00
parent dcda067b48
commit 42de97e16a
8 changed files with 183 additions and 9 deletions
@@ -1618,6 +1618,14 @@ public class TaskMergeServiceTests : IDisposable
Assert.Equal(GitRepoFixture.RunGit(wtPathB, "rev-parse", "HEAD").Trim(), wtB.HeadCommit);
Assert.Contains(proxy.Calls, c => c.Method == "WorktreeUpdated" && c.Args[0] is string s && s == taskB.Id);
// The rebase phase must be visible on the wire while it runs -- otherwise the UI still
// shows the stalled "Merging…" phase for the whole (best-effort) rebase loop.
Assert.Contains(proxy.Calls, c => c.Method == "OperationProgress"
&& c.Args[0] is string opKey && opKey == taskA.Id
&& c.Args[1] is string phase && phase == TaskMergeService.PhaseRebasing
&& c.Args[2] is int current && current == 1
&& c.Args[3] is int total && total == 1);
}
[Fact]