Skip to content

feat: Summarize an email#2899

Open
Elouan1411 wants to merge 22 commits into
protected/ai-actionsfrom
summary
Open

feat: Summarize an email#2899
Elouan1411 wants to merge 22 commits into
protected/ai-actionsfrom
summary

Conversation

@Elouan1411
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 7, 2026 14:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread app/src/main/res/navigation/main_navigation.xml
Comment thread app/src/main/java/com/infomaniak/mail/utils/ErrorCode.kt Outdated
Comment thread app/src/main/java/com/infomaniak/mail/data/api/ApiRepository.kt Outdated
@Elouan1411 Elouan1411 force-pushed the summary branch 7 times, most recently from 402ba40 to d387549 Compare May 8, 2026 07:04
@Elouan1411 Elouan1411 marked this pull request as draft May 8, 2026 09:14
@Elouan1411 Elouan1411 marked this pull request as ready for review May 8, 2026 09:20
@Elouan1411 Elouan1411 force-pushed the summary branch 3 times, most recently from 455b4b0 to 17f64d0 Compare May 12, 2026 11:57
@Elouan1411 Elouan1411 changed the base branch from main to protected/ai-actions May 12, 2026 12:29
@Elouan1411 Elouan1411 force-pushed the summary branch 2 times, most recently from 8325647 to 084dd2c Compare May 13, 2026 08:36
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants