From aa65546fb11b6cc0768f9a3d1ae4109946f9fcf5 Mon Sep 17 00:00:00 2001 From: PointStar Date: Mon, 11 May 2026 15:37:39 +0300 Subject: [PATCH] feat(settings): add first-run Settings dialog and ribbon entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SettingsDialog (WPF, RTL): General tab (URL/username/API key/locale) + About tab; PasswordBox-bound API key, Test Connection probe, Save/Cancel - SettingsViewModel: loads from SettingsManager + DpapiCredentialStore, Test Connection spins a transient HttpClient + EspoCrmClient and reports 401 vs network failures separately; Save persists then signals dialog close - Ribbon: second "הגדרות" button in Marcus-Law group; "File to EspoCRM" now offers to open Settings inline when not configured - AddInHost.LaunchSettings tears down and rebuilds CRM/filing/retry stack so new credentials take effect immediately (CrmClientChanged event) - Tag .taskmaster/tasks/tasks.json: Task #3 in-review with implementation notes (was already locally modified) Core/UI/Tests green (38 tests passing); VSTO host project still requires VS Installer Repair to compile locally. Co-Authored-By: Claude Opus 4.7 (1M context) --- .taskmaster/tasks/tasks.json | 5 +- .../Dialogs/SettingsDialog.xaml | 93 ++++++++++ .../Dialogs/SettingsDialog.xaml.cs | 44 +++++ src/OutlookAddin.UI/OutlookAddin.UI.csproj | 4 + .../ViewModels/SettingsViewModel.cs | 169 ++++++++++++++++++ src/OutlookAddin/Ribbon/ExplorerRibbon.cs | 5 + src/OutlookAddin/Ribbon/ExplorerRibbon.xml | 7 + src/OutlookAddin/Services/AddInHost.cs | 50 +++++- 8 files changed, 371 insertions(+), 6 deletions(-) create mode 100644 src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml create mode 100644 src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml.cs create mode 100644 src/OutlookAddin.UI/ViewModels/SettingsViewModel.cs diff --git a/.taskmaster/tasks/tasks.json b/.taskmaster/tasks/tasks.json index b40fac9..160f915 100644 --- a/.taskmaster/tasks/tasks.json +++ b/.taskmaster/tasks/tasks.json @@ -35,8 +35,9 @@ "dependencies": [ 2 ], - "status": "pending", - "subtasks": [] + "status": "in-review", + "subtasks": [], + "implementationNotes": "Implemented 2026-05-11 (commits e527aa8, 14ed1f6). Deltas from spec: (1) Used MessageBox for summary instead of UWP toast — simpler, can upgrade later. (2) Tests written under OutlookAddin.Tests/Services/ rather than /Core/. (3) Dialog placed in OutlookAddin.UI/Dialogs/ rather than /Views/. (4) Retry queue keeps items on disk after max attempts (3) instead of moving to failed/ — operator can inspect in retry-queue/ folder. (5) MailItem extraction lives in OutlookAddin/Services/MailItemExtractor.cs (host project, since Outlook interop). Build verified for Core/UI/Tests (38 tests green); host project requires VS Installer Repair to compile (VSTO targets still missing on dev machine). Outstanding: first-run settings dialog for credential entry — host shows \"תוסף עדיין לא מוגדר\" if creds.dat absent." }, { "id": 4, diff --git a/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml b/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml new file mode 100644 index 0000000..6fc1d34 --- /dev/null +++ b/src/OutlookAddin.UI/Dialogs/SettingsDialog.xaml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +