Commit Graph

109 Commits

Author SHA1 Message Date
Dev
158aab96b2 feat(01-04): SessionManager singleton holding all ClientContext instances
- SessionManager owns all ClientContexts; callers must not store references
- IsAuthenticated(tenantUrl) returns false before auth, true after GetOrCreateContextAsync
- ClearSessionAsync disposes ClientContext and removes state (idempotent for unknown tenants)
- GetOrCreateContextAsync validates null/empty TenantUrl and ClientId (ArgumentException)
- MsalClientFactory.GetCacheHelper() added — exposes helper for PnP tokenCacheCallback wiring
- 8 unit tests pass, 1 interactive-login test skipped (integration-only)
2026-04-02 12:25:01 +02:00
Dev
02955199f6 feat(01-04): MsalClientFactory with per-clientId PCA and MsalCacheHelper
- Creates one IPublicClientApplication per ClientId (never shared)
- Persists token cache to configurable directory (default: %AppData%\SharepointToolbox\auth\msal_{clientId}.cache)
- SemaphoreSlim(1,1) prevents duplicate creation under concurrent calls
- CacheDirectory property exposed for test injection
- 4 unit tests: same-instance, different-instance, concurrent, AppData path
2026-04-02 12:22:54 +02:00
Dev
1c532d1f6b feat(01-05): add Serilog integration tests and App.xaml.cs LogPanelSink comment
- LoggingIntegrationTests: verifies Serilog writes rolling log file with correct content
- LogPanelSink structural smoke test: confirms type implements ILogEventSink
- App.xaml.cs: added comment for LogPanelSink DI registration deferred to plan 01-06
2026-04-02 12:18:02 +02:00
Dev
a287ed83ab feat(01-05): implement TranslationSource singleton + EN/FR resx files
- TranslationSource singleton with INotifyPropertyChanged indexer binding
- PropertyChanged fires with string.Empty on culture switch (signals all bindings refresh)
- Missing key returns [key] placeholder (prevents null in WPF bindings)
- Strings.resx with 27 Phase 1 UI string keys (EN)
- Strings.fr.resx with same 27 keys stubbed with EN text (FR completeness Phase 5)
- Strings.Designer.cs ResourceManager for dotnet build compatibility
- SharepointToolbox.csproj updated with EmbeddedResource metadata
2026-04-02 12:16:57 +02:00
Dev
ac3fa5c8eb feat(01-03): SettingsRepository and SettingsService with write-then-replace
- AppSettings model: DataFolder + Lang with camelCase JSON serialization
- SettingsRepository: SemaphoreSlim write lock + write-then-replace (tmp→validate→move)
- SettingsService: GetSettings/SetLanguage/SetDataFolder; SetLanguage validates en/fr only
- All 8 SettingsServiceTests pass; all 18 Unit tests pass
2026-04-02 12:12:02 +02:00
Dev
769196dabe feat(01-03): ProfileRepository and ProfileService with write-then-replace
- ProfileRepository: SemaphoreSlim write lock + write-then-replace (tmp→validate→move)
- ProfileRepository: camelCase JSON serialization matching existing schema
- ProfileService: CRUD operations (Add/Rename/Delete) with validation
- All 10 ProfileServiceTests pass (round-trip, missing file, corrupt JSON, concurrency, schema check)
2026-04-02 12:10:56 +02:00
Dev
c2978016b0 feat(01-02): add SharePointPaginationHelper, ExecuteQueryRetryHelper, LogPanelSink
- SharePointPaginationHelper: async iterator with ListItemCollectionPosition loop (bypasses 5k limit); RowLimit=2000; [EnumeratorCancellation] for correct WithCancellation support
- ExecuteQueryRetryHelper: exponential backoff on 429/503/throttle; surfaces retry events via IProgress<OperationProgress>; max 5 retries
- LogPanelSink: custom Serilog ILogEventSink writing color-coded entries to RichTextBox via Dispatcher.InvokeAsync for thread safety
2026-04-02 12:06:39 +02:00
Dev
ddb216b1fb feat(01-02): add Core models and WeakReferenceMessenger messages
- TenantProfile (plain class, mutable, fields match JSON schema: Name/TenantUrl/ClientId)
- OperationProgress (record with Indeterminate factory, used by all feature services via IProgress<T>)
- TenantSwitchedMessage (ValueChangedMessage<TenantProfile>, broadcast-ready)
- LanguageChangedMessage (ValueChangedMessage<string>, broadcast-ready)
2026-04-02 12:05:27 +02:00
Dev
f469804810 feat(01-01): create WPF solution with Generic Host entry point and NuGet packages
- SharepointToolbox.slnx solution with WPF project
- net10.0-windows target, PublishTrimmed=false, StartupObject set
- App.xaml StartupUri removed, App demoted from ApplicationDefinition to Page
- App.xaml.cs: [STAThread] Main with Host.CreateDefaultBuilder + Serilog rolling file
- All NuGet packages: CommunityToolkit.Mvvm 8.4.2, MSAL 4.83.3, PnP.Framework 1.18.0, Serilog 4.3.1
- Build: 0 errors, 0 warnings
2026-04-02 12:00:47 +02:00