fix(ui): store ScheduledFor as real UTC instead of mislabeled local time
The DB's global UtcConverter only tags DateTimes as Utc on read (SpecifyKind), it never converts on write. SetScheduledForAsync persisted the ThemedDatePicker's Local/Unspecified wall-clock value verbatim, so QueuePicker's comparison against DateTime.UtcNow fired scheduled tasks late by the local UTC offset (e.g. 2h in CEST). Convert to UTC at the write boundary, and ToLocalTime() at the read/compare sites (overdue checks in TaskRowViewModel/TasksIslandViewModel, the date-picker's edit seed) so existing scheduled/overdue display doesn't shift. Existing DB rows hold local wall-clock values mistagged as Utc; no migration added (few rows, one-time 2h-class shift accepted per the originating audit finding).
This commit is contained in:
@@ -121,7 +121,7 @@ public sealed partial class TaskRowViewModel : ViewModelBase
|
||||
public bool HasBranch => !string.IsNullOrWhiteSpace(Branch);
|
||||
public bool HasDiff => DiffAdditions > 0 || DiffDeletions > 0;
|
||||
public bool HasSteps => StepsCount > 0;
|
||||
public bool IsOverdue => ScheduledFor is { } d && d.Date < DateTime.Today && !Done;
|
||||
public bool IsOverdue => ScheduledFor is { } d && d.ToLocalTime().Date < DateTime.Today && !Done;
|
||||
public bool IsRunning => Status == TaskStatus.Running;
|
||||
public bool IsWaitingForReview => Status == TaskStatus.WaitingForReview;
|
||||
// Parked = set aside from review: Idle but still holding its Active worktree (vs a plain Idle
|
||||
|
||||
Reference in New Issue
Block a user