feat(todo): Upcoming's tasks dragged onto another day (ADR 0033, D16)

A row of Upcoming, overdue ones too, held and dropped on another day
moves there, its time, duration and recurrence kept; Moved to … offers
Undo. The tint over a day a drag hovers is laid beside the rows, not
around them, which paint on the Material beneath.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-01 17:58:06 +01:00
commit c83f7c46ff
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -1374,6 +1374,40 @@ void main() {
expect(find.byKey(quickAddTitleKey), findsNothing);
});
testWidgets('a row of Upcoming held and dropped on another day moves '
'there, its time kept, which can be undone', (tester) async {
final today = Day.of(DateTime.now());
await start(tester, usedBefore: true);
await seed(
tester,
TaskContent(
title: 'Water plants',
projectId: inbox(),
date: TaskDate(today, time: 23 * 60 + 30),
),
);
await goTab(tester, 'Upcoming');
final day = find.byTooltip(RegExp('^Add a task on .*Tomorrow'));
await dragFrom(
tester,
tester.getCenter(row('Water plants')),
tester.getCenter(day) - const Offset(200, 0),
);
expect(
(await stored(tester))['Water plants']!.date,
TaskDate(today.plus(1), time: 23 * 60 + 30),
);
expect(find.textContaining('Moved to'), findsOneWidget);
await tester.tap(find.text('Undo'));
await tester.pumpAndSettle();
expect(
(await stored(tester))['Water plants']!.date,
TaskDate(today, time: 23 * 60 + 30),
);
});
testWidgets('the add button dropped on a day in Upcoming adds a task '
'for that day', (tester) async {
final tomorrow = Day.of(DateTime.now()).plus(1);