Origin: code review of PR #54 (drawer folder de-duplication). Transient/cosmetic.
Problem
The de-dup suffix combines drawerAccount with a folders list from a separately-lagging StateFlow (MailboxViewModel: folders = drawerAccount.flatMapLatest { … observeFolders(account.id) … }, so folders' first emission after a switch requires a Room query round-trip), and FolderDrawer never checks folder.accountId against drawerAccount?.id (FolderDrawer.kt:83).
Failure scenario
Gmail account A with colliding Drafts labels shown in the open drawer; user picks Outlook account B in the AccountSwitcher: drawerAccount emits B immediately while folders still holds A's list until B's Room query emits — frames in that gap render A's [Gmail]/Drafts as "Drafts - Outlook". Self-corrects on the next emission. (The pre-#54 label derived from the folder alone and was immune to this desync.)
Suggested fix
Derive the provider label from the folders' own accountId (look the account up from the rendered list's owner) — or skip the provider-suffix branch while folders.firstOrNull()?.accountId != drawerAccount?.id.
Origin: code review of PR #54 (drawer folder de-duplication). Transient/cosmetic.
## Problem
The de-dup suffix combines `drawerAccount` with a `folders` list from a separately-lagging StateFlow (`MailboxViewModel`: `folders = drawerAccount.flatMapLatest { … observeFolders(account.id) … }`, so `folders`' first emission after a switch requires a Room query round-trip), and `FolderDrawer` never checks `folder.accountId` against `drawerAccount?.id` (`FolderDrawer.kt:83`).
## Failure scenario
Gmail account A with colliding Drafts labels shown in the open drawer; user picks Outlook account B in the AccountSwitcher: `drawerAccount` emits B immediately while `folders` still holds A's list until B's Room query emits — frames in that gap render A's `[Gmail]/Drafts` as **"Drafts - Outlook"**. Self-corrects on the next emission. (The pre-#54 label derived from the folder alone and was immune to this desync.)
## Suggested fix
Derive the provider label from the folders' own `accountId` (look the account up from the rendered list's owner) — or skip the provider-suffix branch while `folders.firstOrNull()?.accountId != drawerAccount?.id`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Origin: code review of PR #54 (drawer folder de-duplication). Transient/cosmetic.
Problem
The de-dup suffix combines
drawerAccountwith afolderslist from a separately-lagging StateFlow (MailboxViewModel:folders = drawerAccount.flatMapLatest { … observeFolders(account.id) … }, sofolders' first emission after a switch requires a Room query round-trip), andFolderDrawernever checksfolder.accountIdagainstdrawerAccount?.id(FolderDrawer.kt:83).Failure scenario
Gmail account A with colliding Drafts labels shown in the open drawer; user picks Outlook account B in the AccountSwitcher:
drawerAccountemits B immediately whilefoldersstill holds A's list until B's Room query emits — frames in that gap render A's[Gmail]/Draftsas "Drafts - Outlook". Self-corrects on the next emission. (The pre-#54 label derived from the folder alone and was immune to this desync.)Suggested fix
Derive the provider label from the folders' own
accountId(look the account up from the rendered list's owner) — or skip the provider-suffix branch whilefolders.firstOrNull()?.accountId != drawerAccount?.id.