159 Commits

Author SHA1 Message Date
Burak Kaan Köse 59d9cf4eea Consume Wino.Mail.Contracts package 2026-03-16 12:12:13 +01:00
Burak Kaan Köse 37c1bd3f62 Sign in , out ,register. 2026-03-16 01:33:27 +01:00
Burak Kaan Köse 44be3eb4f7 Some UI changes on settings. 2026-03-09 00:28:10 +01:00
Burak Kaan Köse 8548257878 Fix udate update notes. 2026-03-08 18:40:43 +01:00
Burak Kaan Köse d9da326f0a Rename database. 2026-03-08 16:28:41 +01:00
Burak Kaan Köse e4a224bd68 Emaıl templates. 2026-03-08 15:48:11 +01:00
Burak Kaan Köse 15400d4096 Improved keyboad shortcuts. 2026-03-08 13:21:42 +01:00
Burak Kaan Köse ebc35c3de8 Event creation. 2026-03-07 17:13:48 +01:00
Burak Kaan Köse 09f1cee3a5 Remove sqlite base64 contact store from AccountContact. 2026-03-07 11:43:56 +01:00
Burak Kaan Köse e94cce451f Event compose implementation. 2026-03-07 01:46:07 +01:00
Burak Kaan Köse 3d6763770e merged 2026-03-06 03:43:06 +01:00
Burak Kaan Köse aaa6e8a2c9 Removed migrations. New onboarding screen and wizard like steps. 2026-03-06 03:42:08 +01:00
Burak Kaan Köse db5ecd60e4 New startup window. 2026-03-05 10:12:03 +01:00
Burak Kaan Köse 5b3739c6cf Add snooze support for calendar reminders (toast UI, service, DB) (#825)
* Filter reminder snooze options by default reminder

* Some updates.

* Fixing empty welcome page issue and attendee loading.

* Icon system for notifications and snooze options etc.
2026-03-04 00:12:52 +01:00
Burak Kaan Köse d45d3faa89 Whats new implementation. 2026-03-02 00:44:29 +01:00
Burak Kaan Köse e816e87f61 Contacts management. 2026-03-01 21:07:10 +01:00
Burak Kaan Köse 2040d4abce Optimize mail fetching with batch DB queries and in-memory caching (#827)
* perf: batch-load folders, accounts, and contacts in FetchMailsAsync

Replace the sequential per-mail property-loading loop with a three-step
batch pre-load strategy, eliminating the N+1 DB call pattern that was
the main bottleneck when building the mail list with threading enabled.

Changes:
- Pre-seed the folder cache from MailListInitializationOptions.Folders
  so that the most common folders (inbox, sent, etc.) never trigger a DB
  lookup at all.
- Load all accounts in a single GetAccountsAsync() call instead of one
  GetAccountAsync() call per mail (typically 1–5 accounts total).
- Fetch all sender contacts in a single SQL IN(...) query via the new
  GetContactsByAddressesAsync() method instead of one query per address.
- Property assignment is now fully synchronous (no awaits in the loop)
  since all data is pre-loaded into plain Dictionary<K,V>.
- Thread-expansion follows the same pattern: new folder IDs are loaded
  in parallel via Task.WhenAll; new contact addresses are batch-fetched
  with a second IN(...) query.
- Also apply batch pre-loading to GetMailItemsAsync (used by merge-inbox
  sync path) which had the same sequential issue.
- Remove the now-unused LoadAssignedPropertiesWithCacheAsync helper and
  the ConcurrentDictionary dependency it required.
- Tighten GetMailsByThreadIdsAsync to skip the Id NOT IN clause entirely
  when the exclusion set is empty.

https://claude.ai/code/session_018bqahGc6zi95JJhc2aARKS

* test: add MailFetchingTests with correctness and performance coverage

Adds integration tests for MailService.FetchMailsAsync that exercise the
full real-service stack (MailService → FolderService / AccountService /
ContactService) backed by the shared in-memory SQLite helper.

Four tests are included:

• ExpandsSiblingsOutsidePage – proves thread expansion fetches mails that
  fall beyond the initial SQL page (6 mails, page=4, expects 6 returned).

• NeverExpandsSiblings – proves threading is truly opt-in; with
  CreateThreads=false the result exactly matches the raw page size.

• ResolvesFromAllThreeSources – verifies contact resolution for a known
  contact (from the AccountContact table), an unknown sender (ad-hoc
  fallback), and a self-sent mail (built from account metadata).

• 1000Mails_70Threads_CompletesWithinBudget – the performance scenario:
  1 000 mails (70 threads × 7 + 510 standalone), 40 rotating sender
  addresses (20 with DB contacts). Times and reports two scenarios:
    - Default first-page fetch (100 mails) + expansion of one partial
      thread (expects > 100 mails returned).
    - Full load of all 1 000 mails with threading enabled (expects
      exactly 1 000 mails returned, all 70 threads intact, < 5 s).

  Elapsed times for both scenarios are written to xUnit test output so
  they appear in CI logs and can be tracked across builds.

https://claude.ai/code/session_018bqahGc6zi95JJhc2aARKS

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-01 09:14:02 +01:00
Burak Kaan Köse d51f4a7a23 Add SQLite indexes and enable foreign key enforcement (#820) 2026-02-24 11:08:46 +01:00
Burak Kaan Köse 79a81710f0 Improving thread mapping for all synchronizers. 2026-02-23 01:51:44 +01:00
Burak Kaan Köse 317113a1b3 Fixing timezone issue with caldav. 2026-02-19 02:09:36 +01:00
Burak Kaan Köse ab0810f710 Fixing the delta sync for caldav. 2026-02-18 20:43:10 +01:00
Burak Kaan Köse fec49ce6f8 Proper cleanup of account on the UI when its deleted. 2026-02-16 01:56:22 +01:00
Burak Kaan Köse 2baa87daeb Add IMAP local calendar operation tests using in-memory DB (#807)
* Add IMAP local calendar operation handler tests

* Fix tests.

* Fix calendar item show as not updating.

* Create one default calendar for local calendar accounts.
2026-02-15 18:40:32 +01:00
Burak Kaan Köse 42e51571a8 Bunch of calendar implementation thing. 2026-02-15 11:27:30 +01:00
Burak Kaan Köse acf0f649e8 CalDav synchronizer, new IMAP setup/edit page. 2026-02-15 02:20:18 +01:00
Burak Kaan Köse 744145be06 Refactored impa synchronization. 2026-02-14 12:52:17 +01:00
Burak Kaan Köse e936c431a2 Search improvements. 2026-02-12 18:57:55 +01:00
Burak Kaan Köse b01fa4e4ba Event details page improvements, calendar item update source. 2026-02-12 18:04:29 +01:00
Burak Kaan Köse 52ee5f1d8a UI visuals for mail calendar items, calendar reminders. 2026-02-11 01:49:29 +01:00
Burak Kaan Köse 870a5e2bf6 Calendar - mail mapping. 2026-02-10 21:35:55 +01:00
Burak Kaan Köse 0999c71578 Contacts, thread animation and image preview control improvements. 2026-02-09 22:39:30 +01:00
Burak Kaan Köse 1747ed84a8 Disable logging synchronizer exceptions to sentry. 2026-02-08 19:43:13 +01:00
Burak Kaan Köse 5bfa61a218 Create sub folder, delete folder, storage settings, some ui adjustments on threads. 2026-02-07 19:47:21 +01:00
Burak Kaan Köse d28de50ec6 Fixing outlook attachments, re-using compose page and some additional fixes on the mime headers for outlook. 2026-02-07 13:10:57 +01:00
Burak Kaan Köse 4374d19ac2 Threading improvements. 2026-02-06 20:13:44 +01:00
Burak Kaan Köse 071f1c9786 Refactored all synchronizers to deal with some of the chronic issues. 2026-02-06 01:18:12 +01:00
Burak Kaan Köse 0eba778158 Mail update source. 2026-01-27 21:21:04 +01:00
Burak Kaan Köse f8333aab10 Single isntances and some updates shit. 2026-01-06 11:11:37 +01:00
Burak Kaan Köse 3d07328f47 Calendar invitations for Mail part of the app. 2026-01-05 00:21:07 +01:00
Burak Kaan Köse 4603b1fb14 Calendar attachments. 2026-01-03 23:59:37 +01:00
Burak Kaan Köse 9877656eea RSVP options. 2026-01-03 19:33:36 +01:00
Burak Kaan Köse a64627e7d6 Reminders. 2026-01-01 15:02:40 +01:00
Burak Kaan Köse 2056a2d783 Handle deleted events. 2025-12-30 23:32:00 +01:00
Burak Kaan Köse 72e43e4b7a Recalculate recurrences when a new event added. 2025-12-30 08:51:50 +01:00
Burak Kaan Köse 0519bf86b3 I dont know some improvements on reacting calendar changes. 2025-12-29 23:13:32 +01:00
Burak Kaan Köse 8613e92b31 Fixed the display date of the calendar items. Created test project for core library, included tests for recurring calendar events. 2025-12-29 14:10:09 +01:00
Burak Kaan Köse 014b5aa671 Initial integration. 2025-12-26 20:46:48 +01:00
Burak Kaan Köse f6e94e89c9 Fixing an issue where DeleteAsync calls expect PK. 2025-12-25 17:21:23 +01:00
Burak Kaan Köse 8a68fafedf Fixed an issue with loading mails with infinite scroll. 2025-12-15 21:06:13 +01:00
Maicol Battistini beb3bf9d1d feat: S/MIME signing and encryption (#693)
* feat: add S/MIME certificate management

- Introduced `ISmimeCertificateService` interface for managing S/MIME certificates.
- Implemented `SmimeCertificateService` class to handle certificate operations.
- Updated `WinoPage` enum to include `SignatureAndEncryptionPage`.
- Added resource entries in `resources.json` for S/MIME related messages.
- Created `SignatureAndEncryptionPage` view and logic for user interaction.
- Modified configuration files to integrate the new service and page.
- Updated project files to include necessary dependencies for certificate management.

* refactor(SmimeCertificateService): ♻️ Use constant for certificate name

Refactored the `SmimeCertificateService` to replace the hardcoded string "Wino Mail Certificate" with a constant `CertificateFriendlyName`. This change enhances code maintainability by centralizing the definition of the certificate's friendly name.

• Introduced a constant for the certificate's friendly name.
• Updated the certificate retrieval and import logic to use the new constant.

* feat(alias):  Add S/Mime certificate selection for every alias

Added new properties and methods in `MailAccountAlias` to manage signing and encryption certificates, including their thumbprints. This enhancement allows for better handling of S/Mime certificates within the application.

• Introduced new properties for signing and encryption certificates.
• Updated `resources.json` with new translations for S/Mime certificates.
• Enhanced `AliasManagementPageViewModel` to include a dependency on the S/Mime certificate service and updated alias loading methods.
• Modified `AliasManagementPage.xaml` to include ComboBox controls for selecting certificates.
• Implemented methods in `AliasManagementPage.xaml.cs` to handle certificate selection from dropdowns.

This change improves the user experience by allowing users to select and manage their S/Mime certificates directly within the alias management interface.

* feat(mail):  Add S/MIME support and file picker updates

Enhanced the `MailRenderModel` class by adding a new property `IsSmimeSigned` to indicate if an email is S/MIME signed. The constructor has been updated to accept `MailRenderingOptions`.

Updated the file selection logic in `DialogServiceBase` to replace the `FolderPicker` with a `FileSavePicker`, streamlining the process of saving files. Removed unnecessary commented code and added logic to handle file extensions.

In `MailRenderingPageViewModel`, a new property `IsSmimeSigned` reflects the S/MIME status of the current render model, along with a new method `ShowSmimeCertificateInfoAsync` to display S/MIME certificate details.

Added a `HyperlinkButton` in `MailRenderingPage.xaml` to indicate S/MIME status, which is only visible for signed emails, providing a tooltip and command for more information.

In `MimeFileService`, implemented logic to detect S/MIME signatures in messages and exclude S/MIME signature parts from attachments.

* refactor(viewmodel): ♻️ Replace dialog service messages

Refactored the `SignatureAndEncryptionPageViewModel.cs` to replace calls to `_dialogService.ShowMessageAsync` with `_dialogService.InfoBarMessage`. This change improves the handling of success messages during certificate import and removal processes.

* feat(mail):  Add S/MIME encryption indicator

Implemented support for S/MIME email handling in the MailRenderingPageViewModel. This includes the addition of a new property to check if an email is encrypted and updates to methods for displaying S/MIME certificate information.

A new column was added in the MailRenderingPage.xaml to indicate if an email is encrypted, along with updated tooltips and commands. The MimeFileService was also modified to detect S/MIME encryption and to exclude S/MIME signature certificates during attachment processing.

* fix: Added missing property

* feat: Added S/Mime decryption and signing verification and improvements

* i18n(resources): 🌐 Add S/MIME translation strings

Added new translation strings for S/MIME functionalities in `resources.json`, including messages for signatures and certificates in both English and Italian. The code has been updated to utilize these new translation strings, enhancing the application's internationalization.

Updated `MailRenderingPageViewModel.cs` to use the new translation strings for signature and certificate messages, improving code readability and consistency with translations. Additionally, the tooltips for S/MIME signing and encryption buttons in `MailRenderingPage.xaml` have been updated to use the new translation strings, enhancing the user experience for Italian-speaking users.

* fix: Extract body from MultipartSigned message

* feat(smime):  Enhance S/MIME certificate handling

Updated the `SmimeCertificateService` to improve the loading of PKCS12 certificate collections by adding `X509KeyStorageFlags.DefaultKeySet` and `X509KeyStorageFlags.Exportable` for better key management.

In `ComposePageViewModel`, imported necessary namespaces for S/MIME certificate handling and added a new dependency for `ISmimeCertificateService`. Implemented logic in `OpenAttachmentAsync` to load alias certificates and manage message signing and encryption based on user-selected certificates.

This change enhances the security and flexibility of email handling within the application.

* feat: Replaced Smime encryption certificate combobox with checkbox

Cert selection is useless for encryption

* feat: Added S/Mime togglebuttons when composing an email

* i18n(translations): 🌐 Add new composer translations

Added new translation strings for composer features, including themes, text formatting, and S/MIME signing and encryption options. Updated button labels to utilize these new strings, enhancing the application's internationalization.

Additionally, removed an obsolete string related to S/MIME certificate file information.

* Example for relay command and fix settings pages runtime error

* refactor(viewmodel): ♻️ Update certificate import/export commands

Refactored the certificate import and export commands in the `SignatureAndEncryptionPageViewModel`. Changed methods from `async void` to `async Task` for better error handling and tracking of asynchronous operations. Added `[RelayCommand]` attributes to improve adherence to the MVVM pattern.

Updated the XAML file to bind buttons directly to the new command methods, removing the need for event handlers. This enhances separation of concerns and simplifies the code.

Removed obsolete event handlers from the code-behind file, streamlining the implementation.

* fix: export folderPath parameter contains file name

* fix: QRESYNC initial modseq should be 1 (#734)

* Fix typo in reorder accounts dialog (#754)

* fix: Missing commas in translations files

* fix: merge issues

* Fix mege conflicts.

* Some more conflict fixes.

* Fixing context.

* Fixing saving file with suggested file name.

---------

Co-authored-by: Aleh Khantsevich <aleh.khantsevich@gmail.com>
Co-authored-by: Konstantin Shkel <null+github@pcho.la>
Co-authored-by: Cas Cornelissen <cas.cornelissen@onefinity.io>
Co-authored-by: Burak Kaan Köse <bkaankose@outlook.com>
2025-11-23 20:56:57 +01:00