Skip to content

feat(notifications): add rich preview snippet and quick actions (mark read, delete, reply) - #68

Merged
rathlinus merged 4 commits into
bulwarkmail:mainfrom
arnauda-gh:feat/notification-preview-and-actions
Oct 10, 2026
Merged

rathlinus merged 4 commits into
bulwarkmail:mainfrom
arnauda-gh:feat/notification-preview-and-actions

Conversation

@arnauda-gh

Copy link
Copy Markdown
Contributor

Summary

This PR brings notifications to parity with webmail/Gmail by adding:

  1. Rich body snippet / preview: Displayed below the subject using Android BigTextStyle when available in JMAP.
  2. Quick Notification Actions:
    • Mark as read (markRead): Executes directly in background via headless JS task service without bringing the app to foreground, updates JMAP keywords/$seen: true, and cancels notification immediately.
    • Delete (delete): Executes directly in background via headless JS task service, moves email to Trash folder (or destroys if no Trash mailbox found), and cancels notification immediately.
    • Reply (reply): Launches app directly targeting the email thread with compose mode pre-activated.

Verification

  • Vitest unit tests added for push background task preview inclusion and markRead headless handler.
  • Local tests passing.

@arnauda-gh

Copy link
Copy Markdown
Contributor Author

Closing temporarily until manual device testing is complete.

@arnauda-gh arnauda-gh closed this Oct 9, 2026
@arnauda-gh arnauda-gh reopened this Oct 9, 2026
@arnauda-gh

Copy link
Copy Markdown
Contributor Author

Verified working on physical device (Samsung Galaxy S21+): mark as read, delete, and reply actions all function properly. Background execution runs directly via HeadlessJs with goAsync() to comply with Android background service restrictions.

@rathlinus
rathlinus merged commit 7b62755 into bulwarkmail:main Oct 10, 2026
1 check passed
rathlinus added a commit that referenced this pull request Oct 10, 2026
With no Trash mailbox, or when Mailbox/get came back as an error, the
Delete action fell through to destroying the email. A shared account
without its own Trash lost mail permanently on one tap.

- only move to Trash; do nothing when there is no Trash or the lookup
  failed
- check that Email/set actually updated the email
- show "(No Subject)" in the collapsed text instead of a blank line
- require unlock for Delete (Android 12+)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants