thunderbird / thunderbird/thunderbird-android
Refactor: Message Synchronization
Open
@rafaeltonholo is already working on this.
Since Apr 29, 2025.
type: enhancement
- Dominant language
- Kotlin
- Stars
- 14k
- Forks
- 2.8k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 57
Description
🎯The objective
The goal of this project is to automatically fetch messages from the server when the user expects this to happen.
- When opening a folder for viewing
- When scrolling down the message list and reaching the end of the downloaded messages
🎒Resources
ℹ️ List all relevant resources like BugZilla meta bugs, Figma files, Notion links and other files.
🦮Rules of the Road
🟢In Scope
- Find and implement synchronization related quick wins that would increase perception of stability for users
- Revise internal database to make it easier (TBD define) to synchronize messages with the remote server
- Consider alignment with iOS database
- Consider encryption and data safety
- Create KMP module with SQLDelight or Exposed that allows structured access to the database (do a spike to determine the right path forward). Likely we won't use the ORM version, but instead raw database access.
- Add a KMP module that builds a layer on top to abstract the actual queries into the email operations we need
- Migration mechanism to support changes to the new database
- Develop a strategy to move from old to new database model - this is a critical component, make sure we provide mitigations for dataloss.
- Various refactoring to adapt TfA to use the new database. This will likely be a substantial amount of work.
- Move away from key/value store to a more relational model. Existing code around message list/compose will be difficult here.
- TBD define this more closely after the first spike
- Elaborate testing strategy to minimize dataloss risks
🔴Out of Scope
Technical Considerations
-
Consider writing an exporter for email before we roll out the new database to production, this way we can pre-empt any database dataloss by asking users to backup.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.