Skip to content

Commit 00241c5

Browse files
PureWeenCopilot
andcommitted
fix: reset LastUpdatedAt on restore so UI shows fresh activity time
Sessions in the poll-then-resume path showed stale "494m ago" in the sidebar because LastUpdatedAt is only updated by SDK events, which do not arrive during the polling window (no SDK connection). Reset LastUpdatedAt to DateTime.Now when marking a session as actively processing during restore. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1f2de81 commit 00241c5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

PolyPilot/Services/CopilotService.Persistence.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,11 @@ public async Task RestorePreviousSessionsAsync(CancellationToken cancellationTok
671671
capturedState.IsMultiAgentSession = IsSessionInMultiAgentGroup(capturedName);
672672
capturedState.Info.ProcessingPhase = 3; // Working
673673
capturedState.Info.ProcessingStartedAt = DateTime.UtcNow;
674+
// Reset LastUpdatedAt so the UI doesn't show stale "Xm ago" from
675+
// a previous app instance. Without this, sessions show "494m ago"
676+
// because LastUpdatedAt is only updated by SDK events (which don't
677+
// arrive during the poll-then-resume window).
678+
capturedState.Info.LastUpdatedAt = DateTime.Now;
674679
StartProcessingWatchdog(capturedState, capturedName);
675680
NotifyStateChanged();
676681
});

0 commit comments

Comments
 (0)