Skip to content

feat: Display formatted mailbox addresses (emailIdn) in UI layer#2784

Merged
FabianDevel merged 4 commits intomainfrom
copilot/display-formatted-mailbox-address
Feb 3, 2026
Merged

feat: Display formatted mailbox addresses (emailIdn) in UI layer#2784
FabianDevel merged 4 commits intomainfrom
copilot/display-formatted-mailbox-address

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 21, 2026

Internationalized domain names were displaying in punycode format (xn--mnchen-3ya.de) instead of Unicode (münchen.de). The backend provides email_idn field with the decoded representation.

Changes

Data Model

  • Added emailIdn field to Mailbox with @SerialName("email_idn")

Database Migration

  • Bumped schema version from 16 to 17
  • Added migration to copy email values to emailIdn for existing Mailbox records
  • Ensures existing users have populated emailIdn values when upgrading the app

UI Updates (13 locations)

  • Drawer/Menu: MailboxViewHolder, InvalidMailboxViewHolder, InvalidMailboxesAdapter, MailboxesHeaderViewHolder
  • Settings: SettingsFragment, SettingsMailboxesAdapter
  • Compose Components: AccountMailboxesDropdown, SelectedMailboxIndicator, SelectMailboxViewModel
  • Notifications: Channel group name, notification subtext

Example

// Before
text = mailbox.email  // "user@xn--mnchen-3ya.de"

// After
text = mailbox.emailIdn  // "user@münchen.de"

Technical logging and API interactions continue using mailbox.email for consistency.

Original prompt

The goal of this PR is to display the formatted version of the mailbox address (emailIdn) in the drawer, in the settings and other places.
Check for other possible places in the UI layer where this could be used

You can check what was done on iOS with this patch

From 314b8df27e11487d8030bd2de88bbe43f6863d42 Mon Sep 17 00:00:00 2001
From: Ambroise Decouttere ambroise.decouttere@infomaniak.com
Date: Wed, 21 Jan 2026 10:25:48 +0100
Subject: [PATCH] fix: Clean mail address in Settings


Mail/Views/Settings/Mailbox/MailboxSettingsView.swift | 2 +-
Mail/Views/Settings/SettingsView.swift | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Mail/Views/Settings/Mailbox/MailboxSettingsView.swift b/Mail/Views/Settings/Mailbox/MailboxSettingsView.swift
index 62ee40904..4ae124cfb 100644
--- a/Mail/Views/Settings/Mailbox/MailboxSettingsView.swift
+++ b/Mail/Views/Settings/Mailbox/MailboxSettingsView.swift
@@ -44,7 +44,7 @@ struct MailboxSettingsView: View {
}
}
.background(MailResourcesAsset.backgroundColor.swiftUIColor)

  •    .navigationTitle(mailboxManager.mailbox.email)
    
  •    .navigationTitle(mailboxManager.mailbox.emailIdn)
       .navigationBarTitleDisplayMode(.inline)
       .backButtonDisplayMode(.minimal)
       .matomoView(view: [MatomoUtils.View.settingsView.displayName, "Mailbox"])
    

diff --git a/Mail/Views/Settings/SettingsView.swift b/Mail/Views/Settings/SettingsView.swift
index b0fc8f734..01065c762 100644
--- a/Mail/Views/Settings/SettingsView.swift
+++ b/Mail/Views/Settings/SettingsView.swift
@@ -63,7 +63,7 @@ struct SettingsView: View {
Group {
SettingsSectionTitleView(title: myKSuite.isFree ? "my kSuite" : "my kSuite+")

  •                    SettingsSubMenuCell(title: myKSuiteMailbox.email) {
    
  •                    SettingsSubMenuCell(title: myKSuiteMailbox.emailIdn) {
                           MailboxSettingsView(mailboxManager: mailboxManager)
                       }
    

@@ -97,7 +97,7 @@ struct SettingsView: View {
ForEachMailboxView(userId: currentUser.value.id,
excludedMailboxIds: [myKSuiteMailbox?.mailboxId ?? 0]) { mailbox in
if let mailboxManager = accountManager.getMailboxManager(for: mailbox) {

  •                        SettingsSubMenuCell(title: mailbox.email) {
    
  •                        SettingsSubMenuCell(title: mailbox.emailIdn) {
                               MailboxSettingsView(mailboxManager: mailboxManager)
                           }
                       }
    

--
2.50.1 (Apple Git-155)

From d0150aa6d7696a4ec19e38a436bd615fcd31beb1 Mon Sep 17 00:00:00 2001
From: Ambroise Decouttere ambroise.decouttere@infomaniak.com
Date: Wed, 21 Jan 2026 12:01:03 +0100
Subject: [PATCH] fix: Clean mail address


Mail/Views/Menu Drawer/MailboxManagement/MailboxCell.swift | 2 +-
Mail/Views/New Message/Select Mailbox/AccountMailboxCell.swift | 2 +-
Mail/Views/Settings/General/SettingsNotificationsView.swift | 2 +-
MailNotificationServiceExtension/NotificationService.swift | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Mail/Views/Menu Drawer/MailboxManagement/MailboxCell.swift b/Mail/Views/Menu Drawer/MailboxManagement/MailboxCell.swift
index 91dc3d43d..d6c9f45b4 100644
--- a/Mail/Views/Menu Drawer/MailboxManagement/MailboxCell.swift
+++ b/Mail/Views/Menu Drawer/MailboxManagement/MailboxCell.swift
@@ -76,7 +76,7 @@ struct MailboxCell: View {
navigationDrawerState.close()
}
.mailFloatingPanel(isPresented: $isShowingLockedView) {

  •        LockedMailboxView(email: mailbox.email)
    
  •        LockedMailboxView(email: mailbox.emailIdn)
       }
    
    }
    }
    diff --git a/Mail/Views/New Message/Select Mailbox/AccountMailboxCell.swift b/Mail/Views/New Message/Select Mailbox/AccountMailboxCell.swift
    index e6670dd04..45db1564b 100644
    --- a/Mail/Views/New Message/Select Mailbox/AccountMailboxCell.swift
    +++ b/Mail/Views/New Message/Select Mailbox/AccountMailboxCell.swift
    @@ -33,7 +33,7 @@ struct AccountMailboxCell: View {
    }
    } label: {
    Label {
  •            Text(mailbox.email)
    
  •            Text(mailbox.emailIdn)
           } icon: {
               if selectedMailbox?.mailboxId == mailbox.mailboxId {
                   MailResourcesAsset.check.swiftUIImage
    

diff --git a/Mail/Views/Settings/General/SettingsNotificationsView.swift b/Mail/Views/Settings/General/SettingsNotificationsView.swift
index ce43840bc..7f8b6da6a 100644
--- a/Mail/Views/Settings/General/SettingsNotificationsView.swift
+++ b/Mail/Views/Settings/General/SettingsNotificationsView.swift
@@ -92,7 +92,7 @@ struct SettingsNotificationsView: View {
subscribedTopics?.removeAll { $0 == mailbox.notificationTopicName }
}
...


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Display formatted mailbox address in the UI Display formatted mailbox addresses (emailIdn) in UI layer Jan 21, 2026
@PhilippeWeidmann
Copy link
Copy Markdown
Member

@copilot bump migration scheme, copy value of email to emailIdn in migration

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 21, 2026

@copilot bump migration scheme, copy value of email to emailIdn in migration

Done in 1bf4b76. Bumped schema version from 16 to 17 and added migration to copy email to emailIdn for all existing Mailbox records.

@PhilippeWeidmann PhilippeWeidmann changed the title Display formatted mailbox addresses (emailIdn) in UI layer feat: Display formatted mailbox addresses (emailIdn) in UI layer Jan 21, 2026
@PhilippeWeidmann PhilippeWeidmann force-pushed the copilot/display-formatted-mailbox-address branch from 1bf4b76 to e002377 Compare January 21, 2026 12:26
@PhilippeWeidmann PhilippeWeidmann marked this pull request as ready for review January 21, 2026 12:37
@PhilippeWeidmann PhilippeWeidmann removed their request for review January 22, 2026 09:31
@PhilippeWeidmann PhilippeWeidmann force-pushed the copilot/display-formatted-mailbox-address branch from e002377 to 0b9eaf6 Compare January 22, 2026 09:34
@PhilippeWeidmann PhilippeWeidmann force-pushed the copilot/display-formatted-mailbox-address branch 2 times, most recently from 624c5f6 to 5efff8b Compare January 29, 2026 10:35
@PhilippeWeidmann PhilippeWeidmann marked this pull request as draft January 29, 2026 10:47
@PhilippeWeidmann PhilippeWeidmann marked this pull request as ready for review January 29, 2026 12:20
Copilot AI and others added 4 commits February 3, 2026 13:06
…ddresses

Co-authored-by: PhilippeWeidmann <5843044+PhilippeWeidmann@users.noreply.github.com>
Co-authored-by: PhilippeWeidmann <5843044+PhilippeWeidmann@users.noreply.github.com>
…tion

Co-authored-by: PhilippeWeidmann <5843044+PhilippeWeidmann@users.noreply.github.com>
@FabianDevel FabianDevel force-pushed the copilot/display-formatted-mailbox-address branch from 48384c8 to ab4cda4 Compare February 3, 2026 12:06
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 3, 2026

@FabianDevel FabianDevel merged commit 7ad58ab into main Feb 3, 2026
7 checks passed
@FabianDevel FabianDevel deleted the copilot/display-formatted-mailbox-address branch February 3, 2026 12:21
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.

3 participants