thunderbird / thunderbird/thunderbird-android

[ML 0.5/MVI.02.5] Initial Implementation of DeleteMessages Orchestration Flow

Open
#10,517 0 comments 0 reactions 1 assignee View on GitHub

@rafaeltonholo is already working on this.

Since Feb 10, 2026.

tb-team type: enhancement
Dominant language
Kotlin
Stars
14k
Forks
2.8k
Avg merge
3d 3h
Merged PRs (30d)
57

Description

Description

Implement the DeleteMessages use case from scratch. This component orchestrates sub-use cases (MoveMessages, UpdateMessageFlags) and providers to execute the message deletion logic.

Goal

Develop a robust, reactive orchestrator that manages the complex deletion state machine using a Flow pipeline, ensuring high maintainability and compliance with single-exit-point constraints.

Acceptance Criteria

  • Implements the DeleteMessages interface using Flow transformation operators (e.g., flatMapConcat).
  • Successfully branches between "Soft Delete" and "Hard Delete" paths using the LocalDeleteOperationDecider.
  • Triggers removeMessageNotification for all targeted messages.
  • Emits all specific DeleteMessagesOutcome states as defined in the sealed interface.
  • Testing: Unit tests using Fakes (orchestration tests) to verify that the Flow emits the correct sequence of DeleteMessagesOutcome states for both Soft and Hard delete paths.

Technical Requirements

  • Must utilize the MoveMessages and UpdateMessageFlags flows to build the execution chain.
  • Must satisfy Detekt's return-count and complexity rules.
  • Error outcomes from sub-flows must be mapped to DeleteMessagesOutcome.Error and terminate the stream gracefully.

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.