feat(sync): add View log button to sync error banner

When a sync failure banner appears in the email list screen, a new
'View log' button navigates directly to the account's sync log screen
so the user can see the full error details.

Also creates issue #75 for the first-snooze-in-new-account failure.

Closes #13

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas SharedInbox
2026-05-14 21:35:59 +02:00
co-authored by Claude Sonnet 4.6
parent 02b0fec0b6
commit a29d0e93b4
4 changed files with 44 additions and 0 deletions
+6
View File
@@ -373,6 +373,12 @@ class _EmailListScreenState extends ConsumerState<EmailListScreen> {
},
child: const Text('Retry'),
),
TextButton(
onPressed: () => context.push(
'/accounts/${widget.accountId}/sync-log',
),
child: const Text('View log'),
),
TextButton(
onPressed: () => setState(() => _dismissedError = error),
child: const Text('Dismiss'),
@@ -472,6 +472,25 @@ class MockEmailRepository extends _i1.Mock implements _i9.EmailRepository {
returnValue: _i4.Future<List<_i2.Email>>.value(<_i2.Email>[]),
) as _i4.Future<List<_i2.Email>>);
@override
_i4.Future<List<_i2.EmailAddress>> searchAddresses(
String? accountId,
String? query, {
int? limit = 10,
}) =>
(super.noSuchMethod(
Invocation.method(
#searchAddresses,
[
accountId,
query,
],
{#limit: limit},
),
returnValue:
_i4.Future<List<_i2.EmailAddress>>.value(<_i2.EmailAddress>[]),
) as _i4.Future<List<_i2.EmailAddress>>);
@override
_i4.Future<int> flushPendingChanges(
String? accountId,
+19
View File
@@ -332,6 +332,25 @@ class MockEmailRepository extends _i1.Mock implements _i3.EmailRepository {
returnValue: _i4.Future<List<_i2.Email>>.value(<_i2.Email>[]),
) as _i4.Future<List<_i2.Email>>);
@override
_i4.Future<List<_i2.EmailAddress>> searchAddresses(
String? accountId,
String? query, {
int? limit = 10,
}) =>
(super.noSuchMethod(
Invocation.method(
#searchAddresses,
[
accountId,
query,
],
{#limit: limit},
),
returnValue:
_i4.Future<List<_i2.EmailAddress>>.value(<_i2.EmailAddress>[]),
) as _i4.Future<List<_i2.EmailAddress>>);
@override
_i4.Future<int> flushPendingChanges(
String? accountId,
Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB