feat: Summarize an email#2899
Open
Elouan1411 wants to merge 22 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces an “AI message summary” action in the thread/message action sheets, adds UI to display the summary (with loading/error/retry states) inside a message item, and wires a backend call to fetch the summary based on the app language.
Changes:
- Add a new “Summarize” action to the bottom-sheet actions menu and introduce navigation plumbing (
isFromThreadList) to control its visibility. - Implement AI summary request flow, per-message summary state tracking, and rendering of loading/success/error UI in the thread message list.
- Add new API route/repository function for the summary endpoint plus localized strings and a new icon.
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/res/values/strings.xml | Adds English strings for summary UI/action. |
| app/src/main/res/values-sv/strings.xml | Adds Swedish strings for summary UI/action. |
| app/src/main/res/values-pt/strings.xml | Adds Portuguese strings for summary UI/action. |
| app/src/main/res/values-pl/strings.xml | Adds Polish strings for summary UI/action. |
| app/src/main/res/values-nl/strings.xml | Adds Dutch strings for summary UI/action. |
| app/src/main/res/values-nb/strings.xml | Adds Norwegian Bokmål strings for summary UI/action. |
| app/src/main/res/values-it/strings.xml | Adds Italian strings for summary UI/action. |
| app/src/main/res/values-fr/strings.xml | Adds French strings for summary UI/action. |
| app/src/main/res/values-fi/strings.xml | Adds Finnish strings for summary UI/action. |
| app/src/main/res/values-es/strings.xml | Adds Spanish strings for summary UI/action. |
| app/src/main/res/values-el/strings.xml | Adds Greek strings for summary UI/action. |
| app/src/main/res/values-de/strings.xml | Adds German strings for summary UI/action. |
| app/src/main/res/values-da/strings.xml | Adds Danish strings for summary UI/action. |
| app/src/main/res/navigation/main_navigation.xml | Adds isFromThreadList argument to the thread actions bottom sheet dialog. |
| app/src/main/res/layout/view_information_block.xml | Extends the information block layout with an AI animation container. |
| app/src/main/res/layout/item_message.xml | Adds a container/include for the AI banner within message items. |
| app/src/main/res/layout/bottom_sheet_actions_menu.xml | Adds a hidden “Summarize” action item. |
| app/src/main/res/drawable/ic_paragraph_shorten.xml | Adds an icon for the summarize action. |
| app/src/main/java/com/infomaniak/mail/utils/extensions/LanguageExt.kt | Adds helper to compute a backend-compatible language code. |
| app/src/main/java/com/infomaniak/mail/utils/ErrorCode.kt | Adds new AI-related error codes. |
| app/src/main/java/com/infomaniak/mail/ui/main/thread/ThreadState.kt | Adds per-message AI summary state storage + new AiProcessState. |
| app/src/main/java/com/infomaniak/mail/ui/main/thread/ThreadFragment.kt | Implements summarize/retry logic and triggers the API call. |
| app/src/main/java/com/infomaniak/mail/ui/main/thread/ThreadAdapter.kt | Renders AI summary states into the message item UI. |
| app/src/main/java/com/infomaniak/mail/ui/main/thread/PrintMailFragment.kt | Plumbs new adapter state map into printing flow. |
| app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/ThreadActionsBottomSheetDialog.kt | Wires “Summarize” action from thread actions sheet. |
| app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/MessageActionsBottomSheetDialog.kt | Wires “Summarize” action from message actions sheet. |
| app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/MailActionsBottomSheetDialog.kt | Adds onSummary() callback and visibility toggle for the summary action. |
| app/src/main/java/com/infomaniak/mail/ui/main/folder/ThreadListMultiSelection.kt | Passes isFromThreadList when opening thread actions from thread list multi-select. |
| app/src/main/java/com/infomaniak/mail/ui/main/folder/PerformSwipeActionManager.kt | Passes isFromThreadList when opening thread actions via swipe quick actions. |
| app/src/main/java/com/infomaniak/mail/MatomoMail.kt | Adds Matomo event name for Summary. |
| app/src/main/java/com/infomaniak/mail/data/api/ApiRoutes.kt | Adds /api/resume route helper. |
| app/src/main/java/com/infomaniak/mail/data/api/ApiRepository.kt | Adds aiSummary() API call method. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
402ba40 to
d387549
Compare
455b4b0 to
17f64d0
Compare
8325647 to
084dd2c
Compare
# Conflicts: # app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/MessageActionsBottomSheetDialog.kt
…e translation features
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.