From be5edc203c2b4e6712260759cc313ae5e9ab71f8 Mon Sep 17 00:00:00 2001 From: PointStar Date: Tue, 12 May 2026 23:08:20 +0300 Subject: [PATCH] feat: in-app updater button + correct case-folder resolution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two related improvements: 1. About tab → "בדוק עדכונים" button. Calls ClickOnce's ApplicationDeployment.CurrentDeployment.CheckForDetailedUpdate + Update on background threads, so the user can pull a new release immediately without leaving Outlook — no PowerShell, no CleanOnlineAppCache dance. Status messages cover the four real outcomes: • not deployed via ClickOnce (F5 / dev install) → explicit error • on the latest version → green "already up to date" • update available → progress text, then "installed — restart Outlook" • download / manifest / generic exception → red, with reason 2. Case folder resolution now matches the server. The previous client logic used Case.name (the lawsuit title, e.g. "מונאס אריאל נ' ביטוח לאומי") which produced "47-מונאס אריאל נ ביטוח לאומי". But NetworkStorageIntegration's buildEntityFolderName uses the primary contact's name from Case.contactsIds[0] → server actually creates "47-אריאל מונאס" for the same case, so the two diverged and our uploads went to a phantom folder. New flow on case selection: a) EnsureCaseSubfoldersAsync (creates server's canonical folders) b) GetCase with select=contactsIds + networkStorageFolderPath c) GetContactAsync on contactsIds[0] → grab Name d) ResolveCaseFolderPath(case, contactName) → exact match e) Cache result on vm.ResolvedCaseFolderPath; AddInHost reads it instead of recomputing. ResolveCaseFolderPath fallback order is now (1) the integration's stored path, (2) -, (3) -, (4) the contact / case name alone — matching the server's buildEntityFolderName logic step by step. Tests: 39 passing. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../Dialogs/SettingsDialog.xaml | 13 +++- .../ViewModels/SaveAttachmentsViewModel.cs | 67 +++++++++++++----- .../ViewModels/SettingsViewModel.cs | 69 +++++++++++++++++++ src/OutlookAddin/Services/AddInHost.cs | 8 ++- 4 files changed, 137 insertions(+), 20 deletions(-) diff --git a/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml b/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml index 424bf0b..76080dc 100644 --- a/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml +++ b/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml @@ -100,7 +100,18 @@ - + + +