Folder labels: add \Important (RFC 8457) so [Gmail]/Important counts as special-use #62

Closed
opened 2026-07-01 21:17:29 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-01 21:17:29 +00:00 (Migrated from github.com)

Origin: code review of PR #54 (drawer folder de-duplication). One-token fix.

Problem

SPECIAL_USE_ATTRIBUTES (Folder.kt:60) omits \Important (RFC 8457), which Gmail always advertises on [Gmail]/Important in LIST responses (per Google's IMAP extensions docs: * LIST (\HasNoChildren \Important) "/" "[Gmail]/Important"). So isServerSpecial() returns false and the de-dup pass treats the provider's built-in Important folder as user-created.

Failure scenario

Gmail account with the Important label visible over IMAP (the default) plus any folder whose leaf is "Important" — realistically a nested label like Work/Important, since Gmail reserves the bare name. Both base-label to "Important"; [Gmail]/Important gets the parent-parenthesis form "Important ([Gmail])" — leaking the raw namespace container into the UI — next to "Important (Work)", inconsistent with every other Gmail built-in ([Gmail]/Starred via \Flagged renders "Starred - Gmail").

Suggested fix

Add "\\important" to SPECIAL_USE_ATTRIBUTES + a FolderRoleTest case. (Longer-term, the set should derive from a single attribute table — tracked separately.)

Origin: code review of PR #54 (drawer folder de-duplication). One-token fix. ## Problem `SPECIAL_USE_ATTRIBUTES` (`Folder.kt:60`) omits `\Important` (RFC 8457), which Gmail always advertises on `[Gmail]/Important` in LIST responses (per Google's IMAP extensions docs: `* LIST (\HasNoChildren \Important) "/" "[Gmail]/Important"`). So `isServerSpecial()` returns false and the de-dup pass treats the provider's built-in Important folder as user-created. ## Failure scenario Gmail account with the Important label visible over IMAP (the default) plus any folder whose leaf is "Important" — realistically a nested label like `Work/Important`, since Gmail reserves the bare name. Both base-label to "Important"; `[Gmail]/Important` gets the parent-parenthesis form **"Important ([Gmail])"** — leaking the raw namespace container into the UI — next to "Important (Work)", inconsistent with every other Gmail built-in (`[Gmail]/Starred` via `\Flagged` renders "Starred - Gmail"). ## Suggested fix Add `"\\important"` to `SPECIAL_USE_ATTRIBUTES` + a `FolderRoleTest` case. (Longer-term, the set should derive from a single attribute table — tracked separately.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#62