feat: add account-local conversation engine and native conversation reader - #409
feat: add account-local conversation engine and native conversation reader#409Dragonk wants to merge 25 commits into
Conversation
|
I'm going to close this rather than merge it, for two reasons:
Thank you. |
|
Thank you for the clear explanation. I understand that the decision is about product direction and the long-term maintenance burden, not the quality of the implementation. I also acknowledge that I should have opened an issue before starting a change of this scope. For context, this is not only an experimental branch anymore: my partner and I are already using this implementation in production, and the account-local conversation model plus the native reader have solved real threading problems for our mix of mail accounts. Before I treat a maintained fork as the permanent path, would you be open to a separate, implementation-free discussion about the product direction for conversations? In particular, it would help to know whether:
I am not asking you to reopen or merge this PR. I would just like to establish whether there is any acceptable upstream path before investing further in splitting or simplifying the work. Thanks again for taking the time to review the scope and explain the decision. |
Summary
This PR adds an account-local Conversation Engine and a native conversation reader while retaining provider-native thread membership as the authoritative source for visible Reader cards.
Development history was consolidated into five logical implementation commits plus one durable CI-validation commit; the original integration branch remains preserved.
Why
MailFlow needs stable conversation identity without allowing messages from different managed accounts to merge. This change addresses:
Architecture
ConversationandLogicalMessageidentity is per email account, within the owning user boundary.User-facing behavior
The Grouping and Reader preferences are independent:
Grouping changes the list only; Reader changes the right pane only.
Desktop parent rows expand/collapse and navigate to the newest target. On mobile, multi-message parents expand/collapse only, singleton rows open directly, and child rows navigate to the exact physical message. Parent gestures act on thread scope; child gestures act on message scope. Opening a target marks only that copy read, preserving unread sibling state.
Mail rendering
MessageDetailContentkeeps classic MessagePane and Conversation Reader content consistent.Performance
The regression coverage includes the release-blocking browser guard:
/api/mail/threaddetail requests during initial render;The PostgreSQL CI gate additionally runs the repository’s 10k, 50k, and 100k scale/EXPLAIN harness.
Database / migrations
The PR adds migrations 0051–0062 after current upstream migration 0050:
CI validates both a fresh migration through
0062_conversation_account_identityand a real upgrade: it builds the actual current upstreammainschema through0050_message_sender, verifies it, then applies this PR’s migration runner through 0062 against the same PostgreSQL database. Populated legacy and 0061→0062 account-identity fixtures are also required.Testing
GitHub Actions on GitHub-hosted Ubuntu runners validates:
Exact run results are recorded by the required GitHub checks for the final PR SHA.
Real-device UAT
Manual UAT previously passed on desktop browser and mobile device/browser. It covered:
This manual UAT is distinct from the automated CI coverage above.
Screenshots
Desktop
Grouped conversation list + Conversation Reader
Expanded 1 message
New setting
Mobile
Expanded thread list
Conversation Reader
Reviewer notes
Please focus review on: