Repository navigation
feat(unified): let a single account turn on All mail / All unread / All starred - #66
Open
lucletoffe wants to merge 1 commit into
Open
lucletoffe wants to merge 1 commit into
lucletoffe wants to merge 1 commit into
Conversation
…ll starred The drawer hid the whole Unified section unless a second account (with cross-account on) or a merged group inbox fed it (#843), so a single account never reached the cross-folder views - although they span the inbox and every custom folder and repeat no single folder. Sieve-sorted mail could only be read folder by folder. Port the webmail's per-view toggles (enableCrossUnreadView, enableCrossStarredView, enableCrossAllView; off by default) to Settings > Layout. A turned-on view shows in the Unified section even when the section would otherwise stay hidden; "All inboxes" and the per-role rows keep the #843 rule. Alongside the section all three still show, as before. The toggles are labelled with the drawer rows' names: their `label_mobile` in each RN overlay is that language's `sidebar.unified_all_*` from the webmail catalog, so settings search lands on the row. Descriptions are the webmail's own. Co-Authored-By: Claude Opus 5.5 (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.
Problem
With a single account, the drawer never shows the Unified section (#843 rule in
lib/unified-section.ts: it needs a second account with cross-account on, or a merged group inbox). The cross-folder views - All unread, All starred, All mail - already exist (api/unified-inbox.ts,UnifiedInboxScreen) but are unreachable there.Unlike "All inboxes", those views are not a repeat of one folder for a single account: they span the inbox and every custom folder. When server-side filters (Sieve) sort mail into folders, there is no way on mobile to read it all in one list - you go folder by folder. The webmail covers this case with its per-view toggles (
enableCrossUnreadView/enableCrossStarredView/enableCrossAllView, Settings > Layout), which show the section with a single account.Change
settings-store: the three webmail toggles, same names, off by default - nothing changes for anyone who doesn't turn them on.lib/unified-section.ts:visibleCrossViews()(pure, tested). Alongside the unified section all three views still show, as before; without it, each turned-on view shows.SidebarDrawer: the Unified section renders when either applies. "All inboxes" and the per-role rows (All sent, All trash…) keep the #843 rule, so a single account gets no duplicate Inbox.LayoutSettings: three toggles under "Unified views across accounts", indexed by settings search. Labels aresettings.appearance.cross_*.label_mobilein the RN overlays, filled from each language's existingsidebar.unified_all_*webmail translation, so the search result and the row label match; descriptions reuse the webmail'ssettings.appearance.cross_*.description.Left out on purpose: the webmail's per-account folder picker (
allMailFolderIds) - the views keep the role-exclusion default (inbox + custom folders). And when the unified section is already shown (several accounts, or a group inbox), the toggles don't hide anything, to avoid removing rows existing users have today. Happy to make them authoritative there too, as in the webmail, if you prefer.Tests
src/lib/__tests__/unified-section.test.ts: 3 new cases.tsc --noEmitclean,npm run i18n:checkOK, full vitest suite green (3220 passed, 16 skipped).🤖 Generated with Claude Code