thunderbird / thunderbird/thunderbird-android

Refactor: Message Synchronization

Open
#8,834 0 comments 7 reactions 2 assignees View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.