8000 feat(composer): undo send and a forgotten-attachment reminder by Dandiccf · Pull Request #458 · hyprlab/hylki · GitHub
[go: up one dir, main page]

Skip to content

feat(composer): undo send and a forgotten-attachment reminder - #458

Closed
Dandiccf wants to merge 1 commit into
hyprlab:mainfrom
Dandiccf:feat/send-safeguards
Closed

Dandiccf wants to merge 1 commit into
hyprlab:mainfrom
Dandiccf:feat/send-safeguards

Conversation

@Dandiccf
@Dandiccf Dandiccf commented Oct 15, 2026 •
Copy link
Copy Markdown
Contributor

Summary

Two safeguards for the moment a message leaves. (The Reply All fix for #448 that was here is in main now as 381259c, thank you.)

Undo Send (#434, its first two points). Send now holds a message in the Outbox for a few seconds, with Undo on a toast at the bottom of the window. Undo brings it back into a composer, unsent; sending it again starts a new wait. Settings → Composing → Undo send offers Off, 5 (default), 10, 20 or 30 seconds.

  • The wait reuses Send Later's path (send_at plus the Outbox), so it works the same for IMAP/SMTP, JMAP and Microsoft 365, and a message whose wait is cut short by quitting goes the next time Hylki starts.
  • A message sent with Send Later already waits and is not held again.
  • The worker's "will be sent at …" notice is skipped for this wait (new OutgoingMessage::undo_send), since the toast says it already.
  • The message that comes back is marked unsaved, so closing its composer asks first instead of losing the only copy.
  • A reply sent from the split pane still turns into its card in the conversation at once (3ffbb8d); Undo takes that card out again, as a refused send does.
  • The toast layer (adw::ToastOverlay) wraps the window content at the end of init, after the drop zones have found their overlay.

Forgotten-attachment reminder. A message whose own text (not the quote, not the signature) mentions an attachment but carries no file and no cloud link asks "Send without an attachment?" with Attach Files… and Send Anyway; Escape returns to the message. The words are word starts ("attach", "enclos"), extended per language by a translatable list (attachment words|…), so German finds "Anhang", "anbei", "beigefügt" and so on. Settings → Composing → Remind me of forgotten attachments turns it off.

Docs (DOCUMENTATION, FEATURES, CHANGELOG), the template and German translations are updated.

Testing

  • cargo test: 789 passed (rebased on 0848ff3), including new tests for attachment-word matching and own-text extraction.
  • Clippy: no findings on changed lines. tools/check-docs.py passes.
  • Checked in demo mode (German UI): the toast with Undo, the attachment question in the composer, and both rows in Settings → Composing.

This PR was prepared with AI assistance (Claude Code) and reviewed by me.

🤖 Generated with Claude Code

@Dandiccf
Dandiccf force-pushed the feat/send-safeguards branch from 8c70d5e to d38350d Compare October 15, 2026 10:33
…b#434)

Send holds a message in the Outbox for five seconds by default, with Undo on a toast that brings it back into the composer. A message that mentions an attachment but carries none asks before it goes. Both are set under Settings, Composing.
@Dandiccf
Dandiccf force-pushed the feat/send-safeguards branch from d38350d to c6e9acd Compare October 15, 2026 11:03
@Dandiccf Dandiccf changed the title feat(composer): undo send, attachment reminder, Reply All without own addresses feat(composer): undo send and a forgotten-attachment reminder Oct 15, 2026
@Dandiccf
Copy link
Copy Markdown
Contributor Author

Withdrawing this pull request; I won't pursue it here. Thank you for your time.

@Dandiccf Dandiccf closed this Oct 15, 2026
@Dandiccf
Dandiccf deleted the feat/send-safeguards branch October 15, 2026 13:28
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.

1 participant

0