feat(ui,worker): surface task numbers in row/detail UI and worker log
Slice 4/5 of task-numbers: TaskRowViewModel.Number renders as a dimmed "#123" before the row title; DetailsIslandViewModel.TaskIdBadge now shows "#123" instead of the unusable "#T<guid-prefix>" handle; and the curated WorkerLog business events in TaskRunner, TaskMergeService, and TaskResetService prefix their quoted title with "#<Number>".
This commit is contained in:
@@ -22,6 +22,24 @@ public class TaskRowViewModelTests
|
||||
Assert.Equal(expected, vm.StatusChipClass);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Number_SetFromEntity_SurvivesUpdateFromEntity()
|
||||
{
|
||||
var entity = new TaskEntity
|
||||
{
|
||||
Id = "t", ListId = "l1", Title = "Task", Number = 123, CreatedAt = DateTime.UtcNow,
|
||||
};
|
||||
var vm = TaskRowViewModel.FromEntity(entity);
|
||||
Assert.Equal(123, vm.Number);
|
||||
|
||||
// Simulates the TaskUpdated refresh path: the entity is re-fetched and the same
|
||||
// row is updated in place rather than replaced.
|
||||
entity.Title = "Task (edited)";
|
||||
vm.UpdateFromEntity(entity);
|
||||
|
||||
Assert.Equal(123, vm.Number);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IsDropTarget_Follows_Either_DropHint_And_Raises_PropertyChanged()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user