From 93218b0953aaec944e3bb3d5e2969feb3a5cca0d Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 3 Apr 2026 10:22:07 +0200 Subject: [PATCH] docs(04-09): complete BulkMembers, BulkSites, and FolderStructure ViewModels + Views plan - SUMMARY.md: 9 files created, 2 auto-fixed deviations documented - STATE.md: position advanced to plan 09 of 10, 2 new decisions recorded - ROADMAP.md: phase 4 progress updated to 9/10 summaries --- .planning/ROADMAP.md | 2 +- .planning/STATE.md | 20 +-- .../04-09-SUMMARY.md | 133 ++++++++++++++++++ 3 files changed, 145 insertions(+), 10 deletions(-) create mode 100644 .planning/phases/04-bulk-operations-and-provisioning/04-09-SUMMARY.md diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md index 573db5c..15e943d 100644 --- a/.planning/ROADMAP.md +++ b/.planning/ROADMAP.md @@ -138,5 +138,5 @@ Phases execute in numeric order: 1 → 2 → 3 → 4 → 5 | 1. Foundation | 8/8 | Complete | 2026-04-02 | | 2. Permissions | 7/7 | Complete | 2026-04-02 | | 3. Storage and File Operations | 8/8 | Complete | 2026-04-02 | -| 4. Bulk Operations and Provisioning | 8/10 | In Progress| | +| 4. Bulk Operations and Provisioning | 9/10 | In Progress| | | 5. Distribution and Hardening | 0/? | Not started | - | diff --git a/.planning/STATE.md b/.planning/STATE.md index e679a93..a55eb71 100644 --- a/.planning/STATE.md +++ b/.planning/STATE.md @@ -3,15 +3,15 @@ gsd_state_version: 1.0 milestone: v1.0 milestone_name: milestone status: executing -stopped_at: Completed 04-bulk-operations-and-provisioning-04-08-PLAN.md -last_updated: "2026-04-03T08:20:22.554Z" -last_activity: 2026-04-03 — Plan 04-04 complete — BulkMemberService with Graph API and CSOM fallback +stopped_at: Completed 04-bulk-operations-and-provisioning-04-09-PLAN.md +last_updated: "2026-04-03T08:33:00.000Z" +last_activity: 2026-04-03 — Plan 04-09 complete — BulkMembersViewModel + BulkSitesViewModel + FolderStructureViewModel + Views progress: total_phases: 5 completed_phases: 3 total_plans: 33 - completed_plans: 31 - percent: 65 + completed_plans: 32 + percent: 68 --- # Project State @@ -26,9 +26,9 @@ See: .planning/PROJECT.md (updated 2026-04-02) ## Current Position Phase: 4 of 5 (Bulk Operations and Provisioning) — IN PROGRESS -Plan: 4 of 10 in phase 04 — BulkMemberService complete +Plan: 9 of 10 in phase 04 — BulkMembersViewModel + BulkSitesViewModel + FolderStructureViewModel + Views complete Status: Executing Phase 4 plans -Last activity: 2026-04-03 — Plan 04-04 complete — BulkMemberService with Graph API and CSOM fallback +Last activity: 2026-04-03 — Plan 04-09 complete — three CSV bulk-operation ViewModels and Views Progress: [██████░░░░] 65% @@ -175,6 +175,8 @@ Recent decisions affecting current work: - [Phase 04-bulk-operations-and-provisioning]: Example CSV files placed in Resources/ and registered as EmbeddedResource — accessible via Assembly.GetManifestResourceStream without file system dependency - [Phase 04-bulk-operations-and-provisioning]: SitePickerDialog.SelectedUrls.FirstOrDefault() used for single-site transfer selection — avoids new dialog variant while reusing existing dialog - [Phase 04-bulk-operations-and-provisioning]: EnumBoolConverter added for RadioButton-to-enum binding (TransferMode); ConverterParameter=EnumValueName pattern established for future ViewModels +- [Phase 04-bulk-operations-and-provisioning 04-09]: BulkMembersViewModel passes _currentProfile.ClientId to AddMembersAsync — IBulkMemberService interface requires clientId for Graph API authentication; plan code omitted this parameter +- [Phase 04-bulk-operations-and-provisioning 04-09]: Duplicate standalone converter files (EnumBoolConverter.cs etc.) removed — already defined in IndentConverter.cs which is the established project pattern for all converters ### Pending Todos @@ -187,6 +189,6 @@ None yet. ## Session Continuity -Last session: 2026-04-03T08:20:14.108Z -Stopped at: Completed 04-bulk-operations-and-provisioning-04-08-PLAN.md +Last session: 2026-04-03T08:33:00.000Z +Stopped at: Completed 04-bulk-operations-and-provisioning-04-09-PLAN.md Resume file: None diff --git a/.planning/phases/04-bulk-operations-and-provisioning/04-09-SUMMARY.md b/.planning/phases/04-bulk-operations-and-provisioning/04-09-SUMMARY.md new file mode 100644 index 0000000..dc3b4cd --- /dev/null +++ b/.planning/phases/04-bulk-operations-and-provisioning/04-09-SUMMARY.md @@ -0,0 +1,133 @@ +--- +phase: 04-bulk-operations-and-provisioning +plan: 09 +subsystem: ui +tags: [wpf, mvvm, community-toolkit, datagrid, csv, bulk-operations] + +requires: + - phase: 04-bulk-operations-and-provisioning + provides: IBulkMemberService, IBulkSiteService, IFolderStructureService, ICsvValidationService, BulkResultCsvExportService, ConfirmBulkOperationDialog +provides: + - BulkMembersViewModel with CSV import/validate/preview/confirm/execute/retry/export flow + - BulkSitesViewModel with same flow for site creation + - FolderStructureViewModel with site URL + library inputs + folder CSV flow + - BulkMembersView XAML + code-behind wiring ConfirmBulkOperationDialog + - BulkSitesView XAML + code-behind + - FolderStructureView XAML + code-behind with SiteUrl and LibraryTitle TextBox inputs +affects: [04-10] + +tech-stack: + added: [] + patterns: + - FeatureViewModelBase pattern extended for CSV-based bulk tabs (same as Phase 2/3 VMs) + - ShowConfirmDialog Func wired in code-behind — dialog factory pattern preserving VM testability + +key-files: + created: + - SharepointToolbox/ViewModels/Tabs/BulkMembersViewModel.cs + - SharepointToolbox/ViewModels/Tabs/BulkSitesViewModel.cs + - SharepointToolbox/ViewModels/Tabs/FolderStructureViewModel.cs + - SharepointToolbox/Views/Tabs/BulkMembersView.xaml + - SharepointToolbox/Views/Tabs/BulkMembersView.xaml.cs + - SharepointToolbox/Views/Tabs/BulkSitesView.xaml + - SharepointToolbox/Views/Tabs/BulkSitesView.xaml.cs + - SharepointToolbox/Views/Tabs/FolderStructureView.xaml + - SharepointToolbox/Views/Tabs/FolderStructureView.xaml.cs + modified: [] + +key-decisions: + - "BulkMembersViewModel passes _currentProfile.ClientId to AddMembersAsync — IBulkMemberService signature requires clientId for Graph API authentication; plan code omitted this parameter" + - "Duplicate standalone converter files (EnumBoolConverter.cs, StringToVisibilityConverter.cs, ListToStringConverter.cs) removed — these classes already exist in IndentConverter.cs which is the established project pattern" + +patterns-established: + - "Bulk tab pattern: ImportCsvCommand -> ParseAndValidate -> PreviewRows ObservableCollection -> ShowConfirmDialog Func -> RunOperationAsync -> HasFailures -> RetryFailedCommand + ExportFailedCommand" + - "FolderStructureViewModel overrides TenantProfile with site URL for new ClientContext — established pattern from StorageViewModel/SearchViewModel" + +requirements-completed: + - BULK-02 + - BULK-03 + - BULK-04 + - BULK-05 + - FOLD-01 + - FOLD-02 + +duration: 15min +completed: 2026-04-03 +--- + +# Phase 4 Plan 9: BulkMembersViewModel + BulkSitesViewModel + FolderStructureViewModel + Views Summary + +**Three CSV bulk-operation tabs with import/validate/preview/confirm/execute/retry/export flows, each wired to its respective service via FeatureViewModelBase pattern** + +## Performance + +- **Duration:** 15 min +- **Started:** 2026-04-03T08:18:00Z +- **Completed:** 2026-04-03T08:33:00Z +- **Tasks:** 2 (committed together per plan spec) +- **Files modified:** 9 created + +## Accomplishments +- Three ViewModels following identical CSV bulk-operation flow with service-specific execution logic +- Three XAML Views with DataGrid preview, localization bindings, and ConfirmBulkOperationDialog wiring +- FolderStructureView adds site URL and library title TextBox inputs not in other bulk tabs +- Build verified clean (warnings only, no errors) after fixing pre-existing duplicate converter issue + +## Task Commits + +1. **Tasks 1+2: ViewModels + Views** - `fcd5d1d` (feat) — all 9 files in single commit per plan spec + +## Files Created/Modified +- `SharepointToolbox/ViewModels/Tabs/BulkMembersViewModel.cs` - Bulk Members tab VM with Graph/CSOM member add flow +- `SharepointToolbox/ViewModels/Tabs/BulkSitesViewModel.cs` - Bulk Sites tab VM for site creation +- `SharepointToolbox/ViewModels/Tabs/FolderStructureViewModel.cs` - Folder Structure tab VM with site URL + library inputs +- `SharepointToolbox/Views/Tabs/BulkMembersView.xaml` - Bulk Members XAML with DataGrid preview +- `SharepointToolbox/Views/Tabs/BulkMembersView.xaml.cs` - Code-behind wiring ShowConfirmDialog +- `SharepointToolbox/Views/Tabs/BulkSitesView.xaml` - Bulk Sites XAML +- `SharepointToolbox/Views/Tabs/BulkSitesView.xaml.cs` - Code-behind wiring ShowConfirmDialog +- `SharepointToolbox/Views/Tabs/FolderStructureView.xaml` - Folder Structure XAML with site/library inputs +- `SharepointToolbox/Views/Tabs/FolderStructureView.xaml.cs` - Code-behind wiring ShowConfirmDialog + +## Decisions Made +- BulkMembersViewModel passes `_currentProfile.ClientId` to `AddMembersAsync` — the IBulkMemberService interface requires this for Graph API client creation; the plan code omitted it, requiring adaptation. +- Duplicate standalone converter files removed — EnumBoolConverter.cs, StringToVisibilityConverter.cs, ListToStringConverter.cs were untracked files from a previous plan session that duplicated classes already in IndentConverter.cs. + +## Deviations from Plan + +### Auto-fixed Issues + +**1. [Rule 3 - Blocking] Fixed duplicate converter class definitions blocking compilation** +- **Found during:** Task 1 (first build verification) +- **Issue:** Three untracked standalone converter files (EnumBoolConverter.cs, StringToVisibilityConverter.cs, ListToStringConverter.cs) duplicated classes already defined in IndentConverter.cs, causing CS0101 errors +- **Fix:** Deleted the three standalone files; IndentConverter.cs remains the single source of all converter classes (established project pattern) +- **Files modified:** Deleted SharepointToolbox/Views/Converters/EnumBoolConverter.cs, StringToVisibilityConverter.cs, ListToStringConverter.cs +- **Verification:** Build produces 0 errors (only pre-existing CS8602 nullable warnings in CsvValidationService) +- **Committed in:** fcd5d1d (Task 1+2 commit) + +**2. [Rule 1 - Bug] BulkMembersViewModel passes clientId to AddMembersAsync** +- **Found during:** Task 1 implementation +- **Issue:** Plan code called `_memberService.AddMembersAsync(ctx, _validRows, progress, ct)` but IBulkMemberService signature requires `string clientId` parameter after ctx +- **Fix:** Call site updated to `_memberService.AddMembersAsync(ctx, _currentProfile.ClientId, _validRows, progress, ct)` +- **Files modified:** SharepointToolbox/ViewModels/Tabs/BulkMembersViewModel.cs +- **Verification:** Build compiles clean +- **Committed in:** fcd5d1d (Task 1+2 commit) + +--- + +**Total deviations:** 2 auto-fixed (1 blocking, 1 bug) +**Impact on plan:** Both fixes necessary for correctness. No scope creep. + +## Issues Encountered +None beyond the two auto-fixed items above. + +## User Setup Required +None - no external service configuration required. + +## Next Phase Readiness +- All three bulk-operation ViewModels and Views complete +- Plan 04-10 (DI registration + MainWindow wiring) can now register and integrate these Views +- No blockers + +--- +*Phase: 04-bulk-operations-and-provisioning* +*Completed: 2026-04-03*