thunderbird / thunderbird/thunderbird-android
[ML 0.5/MVI.02.5] Initial Implementation of DeleteMessages Orchestration Flow
Open
@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
DeleteMessagesinterface using Flow transformation operators (e.g.,flatMapConcat). - Successfully branches between "Soft Delete" and "Hard Delete" paths using the
LocalDeleteOperationDecider. - Triggers
removeMessageNotificationfor all targeted messages. - Emits all specific
DeleteMessagesOutcomestates as defined in the sealed interface. - Testing: Unit tests using Fakes (orchestration tests) to verify that the Flow emits the correct sequence of
DeleteMessagesOutcomestates for both Soft and Hard delete paths.
Technical Requirements
- Must utilize the
MoveMessagesandUpdateMessageFlagsflows to build the execution chain. - Must satisfy Detekt's return-count and complexity rules.
- Error outcomes from sub-flows must be mapped to
DeleteMessagesOutcome.Errorand terminate the stream gracefully.
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.