fix(ui): populate diff meter when selecting a finished task

This commit is contained in:
mika kuns
2026-06-04 15:24:06 +02:00
parent 4522ac906b
commit c035720b37

View File

@@ -623,6 +623,8 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
WorktreePath = null; WorktreePath = null;
WorktreeStateLabel = null; WorktreeStateLabel = null;
BranchLine = null; BranchLine = null;
DiffAdditions = 0;
DiffDeletions = 0;
AgentState = "idle"; AgentState = "idle";
LatestRunSessionId = null; LatestRunSessionId = null;
_suppressAgentSave = true; _suppressAgentSave = true;
@@ -668,6 +670,9 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
WorktreeBaseCommit = entity.Worktree?.BaseCommit; WorktreeBaseCommit = entity.Worktree?.BaseCommit;
WorktreeStateLabel = entity.Worktree?.State.ToString(); WorktreeStateLabel = entity.Worktree?.State.ToString();
BranchLine = entity.Worktree is { } w ? $"{w.BranchName} \u2190 main" : null; BranchLine = entity.Worktree is { } w ? $"{w.BranchName} \u2190 main" : null;
var (add, del) = ParseDiffStat(entity.Worktree?.DiffStat);
DiffAdditions = add;
DiffDeletions = del;
AgentState = StatusToStateKey(entity.Status); AgentState = StatusToStateKey(entity.Status);
await LoadAgentSettingsAsync(entity, ct); await LoadAgentSettingsAsync(entity, ct);
ct.ThrowIfCancellationRequested(); ct.ThrowIfCancellationRequested();