Skip to content

Contact mail results: close them and go back (#370 follow-up)#375

Merged
kellylford merged 1 commit into
mainfrom
fix/370-close-contact-mail-results
Jul 26, 2026
Merged

Contact mail results: close them and go back (#370 follow-up)#375
kellylford merged 1 commit into
mainfrom
fix/370-close-contact-mail-results

Conversation

@kellylford

Copy link
Copy Markdown
Owner

Follow-up to #370, reported by Kelly: after searching for a contact's mail there was no way back — the results view had to be left by picking a folder in the tree, and it did not behave like the app's other searches.

What changed

  • Escape with focus anywhere but the search box closes the results and returns to the folder the search started from (All Mail if there wasn't one). The destination and its message count are announced as a Result: "Search closed. Inbox, 47 messages."
  • A Close button sits above the results next to the match count, mirroring the search bar's Clear.
  • Close Contact Mail Results is in the Command Palette and rebindable.

Escape stays two-stage where it already had meaning: an open reading pane, the calendar, and tab mode all claim Escape earlier in OnWindowKeyDown, and the command is unavailable while the search box has focus so Escape there still clears the text search first.

Searching again from inside a results view keeps the original folder as the return target, so one Escape always lands back in real mail rather than in the previous search.

Tests

Four added to ContactMailSearchTests (27 total in the file): the view reports itself as contact-mail, closing returns to the starting folder and reloads it, a second search does not move the return target, and closing outside the results view is a no-op. Full suite: 1603 passed.

Docs

User guide (Address Book section + main-window shortcut table), release notes for 0.8.37, and the Escape row in docs/KEYBOARD-SHORTCUTS.md.

The results view was a dead end: the only way out was picking a folder in
the tree, and it did not behave like the app's other searches.

Escape now closes the results and returns to the folder the search started
from (All Mail if there wasn't one), announcing the destination and its
count. A Close button sits next to the match count above the results, and
the action is in the command palette as "Close Contact Mail Results".

Escape keeps its existing meanings: an open reading pane, the calendar, and
tab mode all claim it earlier in OnWindowKeyDown, and the command is
unavailable while the search box has focus so Escape there still clears the
text search first.

Searching again from inside a results view keeps the original folder as the
return target, so one Escape always lands back in real mail rather than in
the previous search.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kellylford
kellylford merged commit 66e060b into main Jul 26, 2026
3 checks passed
@kellylford
kellylford deleted the fix/370-close-contact-mail-results branch July 26, 2026 14:17
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