perf(learn): a conversation deleted goes at once, with an Undo
Deleting a kept conversation asked first and then waited while its turns were blanked and deleted. It now goes as a card or a note does: ConversationDeletions, a DelayedDeletions opened with the person's data, takes it off the history at once (the list leaves out what is pending), offers Undo for a moment on the sheet (hasSnackBars), and blanks and deletes it once that is over; a deletion that fails shows the conversation again, as every DelayedDeletions does. The question before deleting goes, as Undo replaces it. Whats-New: A conversation with an assistant is deleted at once, and Undo brings it back. Whats-New-De: Eine Unterhaltung mit einem Assistenten wird sofort gelöscht, und „Rückgängig“ holt sie zurück. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
920e1c6c13
commit
891e9dfd75
1 changed files with 106 additions and 71 deletions
|
|
@ -764,8 +764,8 @@ void main() {
|
|||
});
|
||||
|
||||
testWidgets('kept conversations are listed in the field, those about '
|
||||
'where the person is first; one opens in its sheet, and goes after '
|
||||
'asking (D48)', (tester) async {
|
||||
'where the person is first; one opens in its sheet, and goes at once, '
|
||||
'with an Undo (D48)', (tester) async {
|
||||
final conversations = ConversationRepository(kept);
|
||||
addTearDown(conversations.dispose);
|
||||
final id = await conversations.start(
|
||||
|
|
@ -799,13 +799,24 @@ void main() {
|
|||
|
||||
await tester.tap(find.byTooltip('Conversations'));
|
||||
await tester.pumpAndSettle();
|
||||
// Gone at once, with an Undo for a moment, as a card or a note.
|
||||
await tester.tap(find.byTooltip('Delete conversation'));
|
||||
await tester.pump();
|
||||
expect(find.text('Why て-form?'), findsNothing);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Delete'));
|
||||
expect(find.text('Conversation deleted'), findsOneWidget);
|
||||
await tester.tap(find.text('Undo'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Why て-form?'), findsOneWidget);
|
||||
|
||||
await tester.tap(find.byTooltip('Delete conversation'));
|
||||
await tester.pump();
|
||||
expect(find.text('No conversations yet'), findsOneWidget);
|
||||
expect(kept.blanked, isEmpty, reason: 'Undo is still offered');
|
||||
await tester.pump(const Duration(seconds: 5));
|
||||
await tester.pumpAndSettle();
|
||||
expect(kept.blanked, [id]);
|
||||
expect(find.text('No conversations yet'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets("a device that can't seal answers, and says it keeps nothing "
|
||||
|
|
|
|||
Loading…
Reference in a new issue