feat(undo-log): hyperlink email rows in Undo Log Detail (#474) #547

Merged
guettlibot merged 3 commits from refs/pull/547/head into main 2026-06-10 11:15:51 +00:00
guettlibot commented 2026-06-08 17:07:29 +00:00 (Migrated from codeberg.org)

Summary

  • Each email row in the Undo Log Detail "Emails" section is now tappable.
  • Tapping resolves the email via EmailRepository.findEmailByMessageId(accountId, messageId) and navigates to its current location, so the link survives the move/snooze that changed its IMAP UID.
  • If the email has no Message-ID, or no row matches the lookup (e.g. hard-deleted), a SnackBar explains the situation instead of navigating.

A chevron_right trailing icon was added to signal the rows are now navigable.

Closes #474

Test plan

  • New widget test test/widget/undo_log_detail_screen_test.dart covers:
    • tap on a row whose lookup hits → navigates to /accounts/<acc>/mailboxes/<encoded>/emails/<encoded> with the current mailbox/id
    • tap when lookup returns null → "Email no longer exists" SnackBar, no navigation
    • tap when the original row has no Message-ID → "no Message-ID" SnackBar, no navigation
## Summary - Each email row in the **Undo Log Detail** "Emails" section is now tappable. - Tapping resolves the email via `EmailRepository.findEmailByMessageId(accountId, messageId)` and navigates to its **current** location, so the link survives the move/snooze that changed its IMAP UID. - If the email has no Message-ID, or no row matches the lookup (e.g. hard-deleted), a SnackBar explains the situation instead of navigating. A `chevron_right` trailing icon was added to signal the rows are now navigable. Closes #474 ## Test plan - [x] New widget test `test/widget/undo_log_detail_screen_test.dart` covers: - tap on a row whose lookup hits → navigates to `/accounts/<acc>/mailboxes/<encoded>/emails/<encoded>` with the **current** mailbox/id - tap when lookup returns `null` → "Email no longer exists" SnackBar, no navigation - tap when the original row has no Message-ID → "no Message-ID" SnackBar, no navigation
Sign in to join this conversation.