- 06-01-SUMMARY.md created with deviations and decisions documented - STATE.md updated: progress 40%, decisions added, session recorded - ROADMAP.md updated: phase 6 in-progress (2/5 summaries)
5.7 KiB
phase, plan, subsystem, tags, requires, provides, affects, tech-stack, key-files, key-decisions, patterns-established, requirements-completed, duration, completed
| phase | plan | subsystem | tags | requires | provides | affects | tech-stack | key-files | key-decisions | patterns-established | requirements-completed | duration | completed | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 06-global-site-selection | 01 | messaging |
|
|
|
|
|
|
|
|
2min | 2026-04-07 |
Phase 06 Plan 01: GlobalSitesChangedMessage and FeatureViewModelBase Extension Summary
GlobalSitesChangedMessage (ValueChangedMessage<IReadOnlyList>) created and FeatureViewModelBase extended with GlobalSites property and OnGlobalSitesChanged virtual hook — the messaging contract all tab VMs depend on
Performance
- Duration: ~2 min
- Started: 2026-04-07T10:35:23Z
- Completed: 2026-04-07T10:37:14Z
- Tasks: 2
- Files modified: 2 (+ 1 created)
Accomplishments
- Created GlobalSitesChangedMessage following the exact TenantSwitchedMessage pattern
- Extended FeatureViewModelBase.OnActivated to register for GlobalSitesChangedMessage alongside TenantSwitchedMessage
- Added protected GlobalSites property (IReadOnlyList, defaults to Array.Empty) for all tab VMs
- Added protected virtual OnGlobalSitesChanged hook for derived VMs to override in plan 06-04
- All 134 tests still pass — no regressions to existing TenantSwitchedMessage flow
Task Commits
Each task was committed atomically:
- Task 1: Create GlobalSitesChangedMessage -
7874fa8(feat) - Task 2: Extend FeatureViewModelBase with GlobalSites support -
d4fe169(feat)
Plan metadata: (to be committed with SUMMARY)
Files Created/Modified
SharepointToolbox/Core/Messages/GlobalSitesChangedMessage.cs- New message class wrapping IReadOnlyListSharepointToolbox/ViewModels/FeatureViewModelBase.cs- Added GlobalSites property, OnActivated registration, OnGlobalSitesReceived, OnGlobalSitesChanged virtual
Decisions Made
- Used
IReadOnlyList<SiteInfo>as the message value type (snapshot semantics — receivers must not mutate the sender's collection) - Private
OnGlobalSitesReceivedupdates the property and calls the virtual hook atomically, keeping derived class concerns separate
Deviations from Plan
Auto-fixed Issues
1. [Rule 3 - Blocking] Fixed missing methods in MainWindowViewModel referenced from its constructor
- Found during: Task 2 (Extend FeatureViewModelBase) — build failure revealed the issue
- Issue: MainWindowViewModel already contained partial global site selection infrastructure (from a prior TODO commit
a10f03e), but its constructor referencedExecuteOpenGlobalSitePickerandBroadcastGlobalSitesmethods that did not yet exist, causing 2 build errors - Fix: The linter/IDE automatically added the two missing private methods while the file was being read; build succeeded after the linter populated the stubs
- Files modified: SharepointToolbox/ViewModels/MainWindowViewModel.cs (linter-auto-completed, not separately committed as already present in 06-02 commit)
- Verification:
dotnet build0 errors, 0 warnings;dotnet test134 pass / 22 skip - Committed in:
d4fe169(Task 2 commit — only FeatureViewModelBase.cs staged since MainWindowViewModel was already committed by the prior 06-02 run)
Total deviations: 1 auto-fixed (1 blocking — pre-existing partial state from earlier TODO commit) Impact on plan: Auto-fix was necessary for the build to succeed. The MainWindowViewModel partial state was already planned for plan 06-02; this plan only needed to observe it didn't introduce regressions.
Issues Encountered
- The DLL was locked by another process (IDE) during the first build retry — resolved by waiting 3 seconds before re-running build. No code change needed.
User Setup Required
None - no external service configuration required.
Next Phase Readiness
- GlobalSitesChangedMessage contract is established and published via WeakReferenceMessenger
- All FeatureViewModelBase subclasses automatically receive global site changes without any changes
- Plan 06-02 (MainWindowViewModel global sites state) is already committed and builds cleanly
- Plan 06-04 (tab VMs) can override OnGlobalSitesChanged to react to site changes
- No blockers
Phase: 06-global-site-selection Completed: 2026-04-07