feat: add combined inbox view across connected mailboxes - #2087
Closed
elizabethburg wants to merge 2 commits into
Closed
elizabethburg wants to merge 2 commits into
elizabethburg wants to merge 2 commits into
Conversation
The repo's own pre-commit hook (oxlint --deny-warnings) currently fails on staging HEAD due to unrelated unused-import/unused-variable warnings in chat.ts and email-verification.ts, which blocks any commit to the repo, not just this branch. Fixed the flagged warnings: removed unused imports (ConnectionContext, createSimpleAuth, SimpleAuth, parseHeaders, groq) and an unused interface (ThreadRow) in chat.ts, prefixed a couple of genuinely-unused-but-kept variables with `_`, and dropped unused catch/callback error bindings across both files. No behavior changes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rno78tLTPRHVACcZ4EHmYJ
Adds a new "Combined Inbox" nav item that shows recent inbox threads from every connected mailbox in one merged, date-sorted list, so users with multiple accounts don't have to switch between them to scan for new mail. - New `mail.listAllThreads` tRPC procedure fans out to each of the user's tokened connections in parallel, tags each thread with its source account, and merges/sorts the results by received date. - Thread rows carry inline preview data (subject, sender, received date) already stored on the local thread cache, avoiding a second per-thread fetch. `getThreadsFromDB`/`queryThreads` in the ZeroDriver agent now surface `latestSubject`/`latestSender` (previously computed but discarded) alongside `latestReceivedOn`; the 5 near- identical row-mapping call sites in `queryThreads` are consolidated into one `mapThreadRow` helper. - New `/mail/combined` route + page renders the merged list; clicking a thread switches the active connection to its owning account (via the existing `connections.setDefault`) and opens it in the normal single-account thread view. - `cleanNameDisplay` (sender-name cleanup) is promoted from a private helper in `mail-list.tsx` to a shared `lib/utils.ts` export so the new page can reuse it. - Sidebar badge assignment in `app-sidebar.tsx` was indexing into the "Core" nav section by fixed array position (`items[0].items[3]` for Sent), which the new nav item would have silently shifted; changed to look up by item `id` instead so it's robust to reordering. Scope for this first pass: combined view covers the inbox folder only (no cross-account search or infinite pagination yet), and only the English locale string was added — other locales fall back to English until translated. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rno78tLTPRHVACcZ4EHmYJ
Author
|
Withdrawing this for now — the combined inbox view needs real design work before it's ready to propose upstream (doesn't match the app's existing list styling, and the account-merging needs more testing). Will reopen or resubmit once it's actually good. |
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
mail.listAllThreadstRPC procedure fans out to each of the user's connected (tokened) accounts in parallel, tags each thread with its source account, and merges/sorts by received date.connections.setDefault) and opens it in the normal single-account thread view.app-sidebar.tsx's nav-badge assignment indexed into the sidebar's "Core" section by fixed array position, which the new nav item would have silently broken — changed to look up by itemidinstead.chat.tsandemail-verification.ts) that were failing the repo's own--deny-warningspre-commit hook onstagingHEAD, unrelated to this feature but blocking any commit.Scope / known limitations for this first pass
navigation.sidebar.combined) was added; other locales will fall back to English until translated.Test plan
tsc --noEmitclean on all touched files (server + mail)oxlint --deny-warningsclean (full repo)react-router buildsucceeds🤖 Generated with Claude Code
https://claude.ai/code/session_01Rno78tLTPRHVACcZ4EHmYJ