Skip to content

feat(send): Esc takes back the message waiting in Undo Send - #607

Closed
fsoft72 wants to merge 2 commits into
hyprlab:mainfrom
fsoft72:pr/esc-undo-send
Closed

fsoft72 wants to merge 2 commits into
hyprlab:mainfrom
fsoft72:pr/esc-undo-send

Conversation

@fsoft72

@fsoft72 fsoft72 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

What

While a message waits out its Undo Send delay, Esc now does the same as Undo.

  • With a message waiting, Esc (outside a text field) brings the most recent one back to its composer.
  • With none waiting, Esc keeps its old meaning: back to the message list.
  • A text field or composer keeps Esc for itself.

Why

Esc is the natural key to back out of a send, but it did nothing for it. Pressing it once also closed the Undo toast without undoing, so the message still went out.

How

  • AdwToastOverlay closes the toast on the first Esc before the window sees the key. The toast's dismissed signal now sends AppMsg::UndoSend. This is a no-op once the message was dispatched or undone, because both take it off the held list before dismissing the toast.
  • A new AppMsg::EscapeKey covers the case where Esc reaches the window instead of the toast: it undoes the latest held send, else falls back to Shortcut::BackToList. It is separate from BackToList because h, Left and u share that shortcut and should not undo a send.
  • docs/DOCUMENTATION.md (Undo Send) mentions the key.

Testing

cargo check passes. Tried by hand: one Esc during the countdown brings the message back to the composer.

🤖 Generated with Claude Code

hyprlab added a commit that referenced this pull request Nov 6, 2026
The toast overlay binds Escape, so one press closed the notice and the message still went. The key is now caught ahead of the overlay, which leaves the notice's close button hiding the notice only.

Co-Authored-By: Fabio Rotondo <2844375+fsoft72@users.noreply.github.com>
hyprlab added a commit that referenced this pull request Nov 8, 2026
Cache encryption (#601), the security batch (#595 to #600), Esc in Undo Send (#607), Focus Mode's own page, the palettes removed, flowed plain text (#606), the remote cache folder (#614), the calendar crash and Russian (#611), Aster Mail drafts (#604) and theme colors (#593).
@hyprlab

hyprlab commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Agentic reply:

Esc in Undo Send is in the 1.48.0-beta.3 release, landed by hand and credited to you. At landing, the window takes Esc before the notice does, rather than undoing from the notice's dismissed signal, which also fires from its close button. The close button still only hides the notice, and Esc stays with a text field, the composer or a dialog that has it. Please test it there and report anything that doesn't look right. It reaches the stable channel with the next stable release.

The beta build is in the repo now. If you already have the beta installed, flatpak update picks it up. If not, download and install it first:

flatpak install --user --from https://hylki.hyprlab.co/flatpak/co.hyprlab.Hylki.Beta.flatpakref

RPM, Debian and AppImage betas: Beta channel.

@hyprlab hyprlab closed this Nov 8, 2026
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