docs(13-02): complete User Directory ViewModel plan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dev
2026-04-08 16:08:59 +02:00
parent 4ba4de6106
commit df6f4949a8
140 changed files with 2862 additions and 74 deletions

View File

@@ -10,7 +10,7 @@ files_modified:
- SharepointToolbox/ViewModels/Tabs/StorageViewModel.cs
- SharepointToolbox/ViewModels/Tabs/DuplicatesViewModel.cs
- SharepointToolbox/ViewModels/Tabs/UserAccessAuditViewModel.cs
- SharepointToolbox/App.xaml.cs
# Note: App.xaml.cs does NOT need changes — DI container auto-resolves IBrandingService for ViewModel constructors
autonomous: true
requirements:
- BRAND-05
@@ -103,7 +103,8 @@ Each ViewModel has:
PermissionsViewModel has two constructors: full (DI) and test (internal, omits export services).
UserAccessAuditViewModel also has two constructors.
The other 3 ViewModels (Search, Storage, Duplicates) have a single constructor each.
StorageViewModel also has two constructors (test constructor at line 151).
The other 2 ViewModels (Search, Duplicates) have a single constructor each.
DI registrations in App.xaml.cs:
```csharp
@@ -136,7 +137,7 @@ But each ViewModel registration must now resolve IBrandingService in addition to
3. Modify the DI constructor to accept `IBrandingService brandingService` parameter and assign `_brandingService = brandingService;`.
4. For ViewModels with a test constructor (PermissionsViewModel, UserAccessAuditViewModel): add `IBrandingService? brandingService = null` as the last parameter, assign `_brandingService = brandingService!;`. Using `null!` is acceptable because test constructors are only used in tests where branding is not exercised. Alternatively, create a no-op implementation — but `null!` matches existing pattern where `_htmlExportService = null` is already used in test constructors.
4. For ViewModels with a test constructor (PermissionsViewModel, UserAccessAuditViewModel, StorageViewModel): add `IBrandingService? brandingService = null` as the last parameter, assign `_brandingService = brandingService!;`. Using `null!` is acceptable because test constructors are only used in tests where branding is not exercised. Alternatively, create a no-op implementation — but `null!` matches existing pattern where `_htmlExportService = null` is already used in test constructors. **Verify that existing test files for all 3 ViewModels still compile after the constructor changes.**
5. Modify `ExportHtmlAsync()` — add branding assembly BEFORE the WriteAsync call:
```csharp