Fix emoji in account names and add INBOX support#1
Open
ezcoder wants to merge 1 commit intointelligrit:mainfrom
Open
Fix emoji in account names and add INBOX support#1ezcoder wants to merge 1 commit intointelligrit:mainfrom
ezcoder wants to merge 1 commit intointelligrit:mainfrom
Conversation
Two bugs fixed: 1. Emoji/Unicode in account names broke JXA scripts because escapeJSString() passed raw multi-byte characters through osascript. Now encodes all non-ASCII as \uXXXX sequences (with surrogate pairs for characters above U+FFFF). 2. INBOX was missing from mailbox listings and inaccessible for message operations. Mail.app exposes INBOX via acc.inbox(), separate from acc.mailboxes(). Added a findMailbox() JXA helper and updated all functions that resolve mailboxes by name. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
escapeJSString()now encodes all non-ASCII characters as\uXXXXescape sequences (with surrogate pair support for emoji above U+FFFF), preventing breakage when passing account names through osascript.acc.inbox(), which is separate fromacc.mailboxes(). Added afindMailbox()JXA helper that handles this, and updated all functions that resolve mailboxes by name (message listing, details, search, mark/flag/delete, archive, move, attachments).Test plan
mail-app-cli mailboxes listand verify INBOX appears for each accountmail-app-cli messages list -a "<account-with-emoji>" -m "INBOX"to verify both fixes work togethermail-app-cli messages list -a "<account>" -m "INBOX"to verify message listing from INBOXmail-app-cli search "test"to verify search now finds INBOX messages🤖 Generated with Claude Code