feat(ui): compute dependency-chain step/grouping in TasksIslandViewModel
Slice 1 of dependency-chain display: TaskRowViewModel gains DependsOnTaskId plus the extrinsic ShowAsChainMember/ChainStep/ChainAfterLabel contract for Slice 2's rail/badge rendering. Regroup's ClassifyItems walks each row's DependsOnTaskId chain per section, pulls dependents directly under their head regardless of SortOrder, and falls back to a flat row + label when the head isn't in the same section (mirrors the ParentInView precedent). Planning children never join a chain group - parent indent wins - and only ever carry the label. No AXAML changes; that's Slice 2.
This commit is contained in:
@@ -28,12 +28,19 @@ public sealed partial class TaskRowViewModel : ViewModelBase
|
||||
[ObservableProperty] private string? _parentTaskId;
|
||||
[ObservableProperty] private string? _createdBy;
|
||||
[ObservableProperty] private string? _blockedByTaskId;
|
||||
[ObservableProperty] private string? _dependsOnTaskId;
|
||||
[ObservableProperty] private bool _isExpanded = true;
|
||||
[ObservableProperty] private bool _hasPlanningChildren;
|
||||
[ObservableProperty] private bool _hasQueuedSubtasks;
|
||||
[ObservableProperty] private bool _showListChip = true;
|
||||
[ObservableProperty] private bool _parentFinalized;
|
||||
[ObservableProperty] private bool _parentInView = true;
|
||||
// The three below are extrinsic — computed and assigned by TasksIslandViewModel.Regroup
|
||||
// (it alone has the cross-row graph needed to walk DependsOnTaskId chains), mirroring how
|
||||
// ParentInView is assigned by the same pass rather than derived locally.
|
||||
[ObservableProperty] private bool _showAsChainMember;
|
||||
[ObservableProperty] private int? _chainStep;
|
||||
[ObservableProperty] private string? _chainAfterLabel;
|
||||
[ObservableProperty] private int _roadblockCount;
|
||||
// Only meaningful when Status=Failed; stamped by TaskRunner.MarkFailed. "unknown" for a
|
||||
// Failed task that predates this field. Null on every other status.
|
||||
@@ -370,6 +377,7 @@ public sealed partial class TaskRowViewModel : ViewModelBase
|
||||
ParentTaskId = t.ParentTaskId;
|
||||
CreatedBy = t.CreatedBy;
|
||||
BlockedByTaskId = t.BlockedByTaskId;
|
||||
DependsOnTaskId = t.DependsOnTaskId;
|
||||
RoadblockCount = t.RoadblockCount;
|
||||
FailureReason = t.FailureReason;
|
||||
FailureTurnsUsed = t.FailureTurnsUsed;
|
||||
|
||||
Reference in New Issue
Block a user