- 19-02-SUMMARY.md created - STATE.md: progress 100%, decisions, session updated - ROADMAP.md: phase 19 marked complete - REQUIREMENTS.md: APPREG-01, APPREG-04, APPREG-05 marked complete
3.8 KiB
phase, plan, subsystem, tags, dependency_graph, tech_stack, key_files, decisions, metrics
| phase | plan | subsystem | tags | dependency_graph | tech_stack | key_files | decisions | metrics | |||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 19-app-registration-removal | 02 | ViewModels/UI |
|
|
|
|
|
|
Phase 19 Plan 02: Register/Remove App UI Summary
Register and Remove app commands wired into ProfileManagementViewModel with fallback instructions panel, DI registration, EN/FR localization, and 7 passing unit tests.
Tasks Completed
| # | Task | Commit | Status |
|---|---|---|---|
| 1 | ViewModel commands + DI + Localization | 42b5eda |
Done |
| 2 | Profile dialog XAML + ViewModel tests | 809ac86 |
Done |
What Was Built
ProfileManagementViewModel gained:
IAppRegistrationServiceconstructor injectionRegisterAppCommand/RemoveAppCommand(IAsyncRelayCommand)IsRegistering,ShowFallbackInstructions,RegistrationStatusobservable propertiesHasRegisteredAppcomputed propertyCanRegisterApp/CanRemoveAppguards (profile selected, AppId null/non-null, not busy)RegisterAppAsync: admin check → fallback panel or full registration → AppId persistenceRemoveAppAsync: app removal + MSAL clear + AppId null + persistenceOnIsRegisteringChangedpartial: notifies both commands on busy state change
ProfileManagementDialog.xaml:
- Height 750 (was 620)
- New Row 4: Register/Remove buttons, RegistrationStatus TextBlock, fallback instructions Border (6 steps)
BooleanToVisibilityConverteradded toWindow.Resources- Buttons row shifted from Row 4 to Row 5
Localization: 16 new keys in both Strings.resx and Strings.fr.resx (register/remove/fallback flow, all accented FR characters).
App.xaml.cs: IAppRegistrationService registered as singleton.
Tests: 7 unit tests, all passing — CanExecute guards, fallback on non-admin, AppId set on success, AppId cleared on remove.
Deviations from Plan
Auto-fixed Issues
1. [Rule 2 - Missing critical update] Updated ProfileManagementViewModelLogoTests to 5-param constructor
- Found during: Task 2
- Issue: Existing logo tests used the 4-param constructor which no longer exists after adding IAppRegistrationService
- Fix: Added
Mock<IAppRegistrationService>field and passed_mockAppReg.Objectas 5th param in all 3 constructor calls - Files modified: SharepointToolbox.Tests/ViewModels/ProfileManagementViewModelLogoTests.cs
- Commit:
809ac86
Self-Check: PASSED
All key files found. Both task commits verified (42b5eda, 809ac86). Full solution builds clean. 7/7 tests pass.