fix(ui): MergeHelperSelectionModal — Task-Nummer anzeigen, Titel wrappen, Status-Spalte verbreitern
This commit is contained in:
@@ -12,8 +12,11 @@ namespace ClaudeDo.Ui.ViewModels.Modals;
|
||||
public sealed partial class MergeHelperTaskRowViewModel : ViewModelBase
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public int Number { get; init; }
|
||||
public required string Title { get; init; }
|
||||
public required string StatusText { get; init; }
|
||||
|
||||
public bool ShowNumber => Number > 0;
|
||||
public string? ParentTaskId { get; init; }
|
||||
|
||||
/// <summary>The owning list — only set in review mode, where rows span lists.</summary>
|
||||
@@ -174,7 +177,7 @@ public sealed partial class MergeHelperSelectionModalViewModel : ViewModelBase
|
||||
.Where(t => t.Status == TaskStatus.WaitingForReview && !t.IsManual)
|
||||
.Join(ctx.Lists.Where(l => l.WorkingDir != null && l.WorkingDir != ""),
|
||||
t => t.ListId, l => l.Id,
|
||||
(t, l) => new { t.Id, t.Title, t.Status, t.ParentTaskId, t.ListId, ListName = l.Name, t.SortOrder, t.CreatedAt })
|
||||
(t, l) => new { t.Id, t.Number, t.Title, t.Status, t.ParentTaskId, t.ListId, ListName = l.Name, t.SortOrder, t.CreatedAt })
|
||||
.OrderBy(x => x.ListName).ThenBy(x => x.SortOrder).ThenBy(x => x.CreatedAt)
|
||||
.ToListAsync(ct);
|
||||
|
||||
@@ -193,6 +196,7 @@ public sealed partial class MergeHelperSelectionModalViewModel : ViewModelBase
|
||||
var reviewRow = new MergeHelperTaskRowViewModel
|
||||
{
|
||||
Id = c.Id,
|
||||
Number = c.Number,
|
||||
Title = c.Title,
|
||||
StatusText = c.Status.ToString(),
|
||||
ParentTaskId = c.ParentTaskId,
|
||||
@@ -214,7 +218,7 @@ public sealed partial class MergeHelperSelectionModalViewModel : ViewModelBase
|
||||
// Manual tasks are reminders the user owns — never offer them to the handler.
|
||||
.Where(t => !t.IsManual)
|
||||
.OrderBy(t => t.SortOrder).ThenBy(t => t.CreatedAt)
|
||||
.Select(t => new { t.Id, t.Title, t.Status, t.ParentTaskId })
|
||||
.Select(t => new { t.Id, t.Number, t.Title, t.Status, t.ParentTaskId })
|
||||
.ToListAsync(ct);
|
||||
|
||||
var candidateIds = candidates.Select(c => c.Id).ToHashSet();
|
||||
@@ -230,17 +234,17 @@ public sealed partial class MergeHelperSelectionModalViewModel : ViewModelBase
|
||||
// (including orphaned children whose parent isn't a candidate) interleaved with their
|
||||
// visible children, preserving the SortOrder/CreatedAt order within each level.
|
||||
var emitted = new HashSet<string>();
|
||||
var ordered = new List<(string Id, string Title, TaskStatus Status, string? ParentTaskId)>();
|
||||
void Emit(string id, string title, TaskStatus status, string? parentTaskId)
|
||||
var ordered = new List<(string Id, int Number, string Title, TaskStatus Status, string? ParentTaskId)>();
|
||||
void Emit(string id, int number, string title, TaskStatus status, string? parentTaskId)
|
||||
{
|
||||
if (!emitted.Add(id)) return;
|
||||
ordered.Add((id, title, status, parentTaskId));
|
||||
ordered.Add((id, number, title, status, parentTaskId));
|
||||
if (childrenByParent.TryGetValue(id, out var kids))
|
||||
foreach (var kid in kids)
|
||||
Emit(kid.Id, kid.Title, kid.Status, kid.ParentTaskId);
|
||||
Emit(kid.Id, kid.Number, kid.Title, kid.Status, kid.ParentTaskId);
|
||||
}
|
||||
foreach (var c in candidates.Where(c => !ParentIsCandidate(c.ParentTaskId)))
|
||||
Emit(c.Id, c.Title, c.Status, c.ParentTaskId);
|
||||
Emit(c.Id, c.Number, c.Title, c.Status, c.ParentTaskId);
|
||||
|
||||
foreach (var c in ordered)
|
||||
{
|
||||
@@ -248,6 +252,7 @@ public sealed partial class MergeHelperSelectionModalViewModel : ViewModelBase
|
||||
var row = new MergeHelperTaskRowViewModel
|
||||
{
|
||||
Id = c.Id,
|
||||
Number = c.Number,
|
||||
Title = c.Title,
|
||||
StatusText = c.Status.ToString(),
|
||||
ParentTaskId = c.ParentTaskId,
|
||||
|
||||
Reference in New Issue
Block a user