issue-341-guard-threademails-last
main
Add an isEmpty check before accessing threadEmails.last to prevent StateError when emails are deleted between query and access. Closes #341 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>