Commit Graph

1176 Commits

Author SHA1 Message Date
Burak Kaan Köse e816e87f61 Contacts management. 2026-03-01 21:07:10 +01:00
Burak Kaan Köse bdd32786d6 folder structure fixes 2026-03-01 16:23:28 +01:00
Burak Kaan Köse f35a4333f9 Fix initials showing in the background when the profile picture has transparent background. 2026-03-01 13:48:40 +01:00
Burak Kaan Köse 2c9351f551 Fixing some IsBusy corner cases. 2026-03-01 12:40:12 +01:00
Burak Kaan Köse 211faff750 Property change based updates on the mails for fast bulk operations. 2026-03-01 12:07:15 +01:00
Burak Kaan Köse 11158fe737 Remove redundant notification target. 2026-03-01 09:50:05 +01:00
Burak Kaan Köse 76e3b7289e Some issues with changing the app mode and notifications have been fixed. 2026-03-01 09:47:05 +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 0e742c7a8f Resolving warnings and treating warnings as errors in WinUI project. (#824) 2026-02-27 20:12:43 +01:00
Burak Kaan Köse d2fce5eee1 Add PR GitHub Actions workflow to build WinUI and run Core tests on Windows (#823) 2026-02-27 14:16:31 +01:00
Burak Kaan Köse 5c510fd7b0 Remove single entry and mode launch on ctrl press. 2026-02-27 11:00:25 +01:00
Burak Kaan Köse e1ce85698c Fix couple issues with starting mode. 2026-02-27 10:22:52 +01:00
Burak Kaan Köse 4b22608bc5 Badges are always creatd on wino mail. 2026-02-25 02:05:05 +01:00
Burak Kaan Köse 3a39266121 Simplified compoper and rendering logic through messages. 2026-02-25 01:41:48 +01:00
Burak Kaan Köse 5d46ea73db Route mail/calendar toasts to their respective app entries (#821) 2026-02-25 01:36:26 +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 c5a631da6f Grace period for local drafts. 2026-02-23 01:02:59 +01:00
Burak Kaan Köse 33672ab0aa Local draft resent and default app mode settings. 2026-02-22 17:55:57 +01:00
Burak Kaan Köse 311b3c77c8 Wino Calendar app entry. (#819)
* Double app entry.

* New icon for sys tray
2026-02-22 15:13:39 +01:00
Burak Kaan Köse 17ca32c537 Support large Outlook attachments via upload sessions when sending drafts (#814)
* Add Outlook large attachment upload sessions for send draft

* UI thread executino of draft busy state.

* Limit outlook attachment limit to max allowed per attachment.
2026-02-21 16:14:55 +01:00
Burak Kaan Köse 9d3f0bddde Add manual live ImapSynchronizer coverage tests (#818)
* Add manual live IMAP synchronizer tests

* Fixing build errors and testing.
2026-02-21 11:47:16 +01:00
Burak Kaan Köse 7f198bad92 Implement mail and calendar item synchronizer state (#815)
* Track pending sync operations per mail/calendar item

* Updated progressbar for in progress drafts
2026-02-21 10:53:39 +01:00
Burak Kaan Köse a912ada890 Fixing some messaging issues with calendar add/delete. 2026-02-20 10:03:16 +01:00
Burak Kaan Köse 317113a1b3 Fixing timezone issue with caldav. 2026-02-19 02:09:36 +01:00
Burak Kaan Köse 564cb0b16f Fix double init on calendar days. 2026-02-19 01:37:43 +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 7a13ae0ac8 Add manual live CalDAV service workflow tests (#816) 2026-02-18 13:44:58 +01:00
Burak Kaan Köse c8e1678e55 Fix HtmlPreviewVisitor regressions and add sanitization tests (#813) 2026-02-17 22:12:27 +01:00
Burak Kaan Köse f49d276f5a Add dedicated Wino.Mail.ViewModels.Tests coverage for WinoMailCollection (#812)
* Add WinoMailCollection tests in dedicated ViewModels test project

* Fix WinoMailCollection tests flattening without SelectMany
2026-02-17 15:45:29 +01:00
Burak Kaan Köse 05112d6a35 Dispatch WebView2 runtime toast notification on UI thread (#811) 2026-02-16 16:32:47 +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 31a7faeef9 Handle operation execution errors in rendering page. 2026-02-16 01:39:53 +01:00
Burak Kaan Köse dae7d046c4 Calendar metadata fetch after creating account. 2026-02-15 19:57:48 +01:00
Burak Kaan Köse d428a6ce7a Ignore local calendar applying changes to prevent duplicate operations. 2026-02-15 19:44:07 +01:00
Burak Kaan Köse ff25db3fea Add busy state support for calendar item view models (#810) 2026-02-15 19:26:06 +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 64b9bfc392 Flag changes for uid based imap sync 2026-02-14 13:22:16 +01:00
Burak Kaan Köse 744145be06 Refactored impa synchronization. 2026-02-14 12:52:17 +01:00
Burak Kaan Köse 4a0dcd2899 Remove old project files. 2026-02-13 20:45:55 +01:00
Burak Kaan Köse 92df726f34 Batch flip-view range updates for programmatic calendar navigation (#805)
* Batch calendar range updates during programmatic navigation

* Refine programmatic calendar navigation batching state
2026-02-13 14:37:24 +01:00
Burak Kaan Köse dbd5812c45 Fix null handling in WinoCalendarView date range updates (#806) 2026-02-13 10:58:25 +01:00
Burak Kaan Köse 884f000058 Calendar stuff. 2026-02-13 03:09:13 +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 96dcdc8e03 Auto sync trigger and cancellation support. 2026-02-11 14:50:59 +01:00
Burak Kaan Köse 96d2efb3f0 Remove semantic zoom support. 2026-02-11 14:50:48 +01:00
Burak Kaan Köse 37199d84cb Fixed the caching issue that causes mails to be not removed. Improved drag/drop. 2026-02-11 11:34:50 +01:00