Skip to content

feat: add optional conversation reading pane - #317

Open
YunQue0912 wants to merge 11 commits into
maathimself:mainfrom
YunQue0912:feat/conversation-reading-pane
Open

YunQue0912 wants to merge 11 commits into
maathimself:mainfrom
YunQue0912:feat/conversation-reading-pane

Conversation

@YunQue0912

Copy link
Copy Markdown
Contributor

Summary

Adds an optional Gmail-style full conversation reading pane while preserving flat-message and expandable-list modes.

Closes #316.

Changes

  • Adds three persisted conversation display modes: off, expandable thread rows, and full reading pane.
  • Loads complete conversations across folders, including sent replies, with lazy message-body loading and animated expand/collapse.
  • Supports thread-wide read, archive, move, spam, snooze, delete, reply, and forward actions.
  • Handles deep links, notifications, cached-thread revalidation, single-message fallback, and read-state rollback.
  • Keeps the three conversation mode controls in one row across viewport sizes.

Testing

  • Backend: npm test (706 tests)
  • Backend: npm run lint
  • Frontend: npm test (1449 tests)
  • Frontend: npm run lint
  • Frontend: npm run build
  • git diff --check upstream/main...HEAD

Contributor License Agreement

By submitting this pull request I confirm that:

  • I have read and agree to the Contributor License Agreement.
  • My contribution is my own original work (or I have identified any
    third-party material and confirmed it is compatible with the CLA).
  • I have the right to submit this contribution under the terms of the CLA.

@maathimself

Copy link
Copy Markdown
Owner

Thanks for putting this together, and sorry for the delay. I am prioritizing reliability and stability over new features right now, so I am not going to merge new-feature work at the moment. I do not want to leave it hanging, so I am keeping it open for when I return to feature work, but please expect that to be a while. Appreciate the effort you put in.

maathimself added a commit that referenced this pull request Sep 21, 2026
A third threading mode: a selected row opens the whole conversation stacked in
the reading area, newest message open, the rest collapsed to a header (#316).

Collapsed costs nothing. A collapsed card issues no body request, mounts no
frame and creates no document, because an expanded body is a whole rendered
document and a thread can run to dozens of messages. Only what the reader has
opened is ever rendered, which is how Gmail and Thunderbird handle the same
problem. A body already fetched is kept, so collapsing and reopening does not
cost another round trip.

The thread endpoint already returned every message across folders, Sent replies
included and deduplicated by Message-ID preferring the INBOX copy, so the pane
needed no backend query and no scope parameter of its own.

conversationMode is the setting, and threadedView is now derived from it rather
than a second source of truth: it is what the list-loading code already consults
when deciding to request threaded results, and both grouping modes want it. That
left all six of those call sites untouched, and resolveConversationMode migrates
an install that only ever knew the old boolean. patchPreferences gained the key,
validated against the three known modes, since it stores an explicit allowlist
and would otherwise have dropped it silently, leaving the setting in
localStorage only.

Verified: the pane renders one card per message with only the newest open, only
that message fetches a body, opening a second renders a second body with both
open at once, and reopening a collapsed card does not refetch. The sent reply
appears in the thread, which is the part that needs the cross-folder fetch.

Design, and the conversation, conversationActions, conversationMode and
messageBody utilities with their tests, are from #317 by YunQue0912. The
components are rebuilt here against a MessagePane that moved a long way after
that branch was opened.

Co-authored-by: YunQue0912 <1721261724@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optional full conversation reading pane with configurable threading modes

2 participants