Dragging a task row onto a user list in the Lists island now reassigns it to that list. The task drag holds the pointer capture, so the release is resolved geometrically (new case between the Mission Control and reorder cases) instead of going through the Lists island's own DragDrop path, which never sees a DragEventArgs during a task drag. TaskRepository.MoveToListAsync reassigns the task plus every descendant (a child must never sit in a different list than its parent) and appends the task at the end of the target list. Guards: running tasks and tasks holding an Active/Kept worktree are rejected to the footer error strip; a move that changes repo asks for confirmation naming both repos. The source repo is read from the task's own list rather than the island's current list, which is a smart/virtual list with no working dir of its own whenever one of those is shown.
25 lines
1.1 KiB
C#
25 lines
1.1 KiB
C#
using ClaudeDo.Data.Models;
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
namespace ClaudeDo.Ui.ViewModels.Islands;
|
|
|
|
public sealed partial class ListNavItemViewModel : ViewModelBase
|
|
{
|
|
public required string Id { get; init; }
|
|
public required ListKind Kind { get; init; }
|
|
[ObservableProperty] private string _name = "";
|
|
[ObservableProperty] private int _count;
|
|
[ObservableProperty] private bool _isActive;
|
|
[ObservableProperty] private string? _workingDir;
|
|
[ObservableProperty] private string _defaultCommitType = CommitTypeRegistry.DefaultType;
|
|
// Reminder list: tasks created here default to manual.
|
|
[ObservableProperty] private bool _isManual;
|
|
[ObservableProperty] private bool _dropHintAbove;
|
|
[ObservableProperty] private bool _dropHintBelow;
|
|
// Set while a dragged task hovers over this row as a move target — distinct from
|
|
// DropHintAbove/Below, which mark an insertion point for list reordering.
|
|
[ObservableProperty] private bool _isTaskDropTarget;
|
|
public string? IconKey { get; init; }
|
|
public string? DotColorKey { get; init; }
|
|
}
|