# Phase 14 Research: User Directory View ## What Exists (Phase 13 Deliverables) ### ViewModel Properties for Directory Browse - `IsBrowseMode` (bool) — toggles Search/Browse mode - `DirectoryUsers` (ObservableCollection) — raw directory list - `DirectoryUsersView` (ICollectionView) — filtered/sorted view, default sort DisplayName asc - `IsLoadingDirectory` (bool) — true while loading - `DirectoryLoadStatus` (string) — "Loading... X users" progress text - `IncludeGuests` (bool) — in-memory member/guest filter - `DirectoryFilterText` (string) — text filter on DisplayName, UPN, Department, JobTitle - `DirectoryUserCount` (int) — filtered count - `LoadDirectoryCommand` (IAsyncRelayCommand) — disabled while loading - `CancelDirectoryLoadCommand` (RelayCommand) — enabled only while loading ### Existing People-Picker (Search Mode) - `SearchQuery` → debounced Graph search → `SearchResults` dropdown - `AddUserCommand(GraphUserResult)` → `SelectedUsers` collection - `RemoveUserCommand(GraphUserResult)` → removes from SelectedUsers - `RunCommand` → `RunOperationAsync` → audits SelectedUsers against GlobalSites ### GAP: No SelectDirectoryUserCommand SC2 requires "selecting a user from directory list launches existing audit pipeline." Need a command that: 1. Takes a `GraphDirectoryUser` from the directory DataGrid 2. Converts it to `GraphUserResult` (same DisplayName + UPN) 3. Adds to `SelectedUsers` via existing `ExecuteAddUser` logic This is ViewModel work — needs to be done before the View XAML. ### Current View Structure (UserAccessAuditView.xaml) - Left panel (290px DockPanel): Users GroupBox + Options GroupBox + Buttons StackPanel - Right panel: Summary banners + Filter/Toggle row + DataGrid (ResultsView) - Status bar: ProgressBar + StatusMessage ### Available Converters - `BoolToVisibilityConverter` — true→Visible, false→Collapsed - `InverseBoolConverter` — inverts bool - `StringToVisibilityConverter` — non-empty→Visible, empty→Collapsed ### Localization - No directory.* keys exist — need to add ~10 keys for EN + FR ## Plan Breakdown 1. **14-01** (Wave 1): Add localization keys + `SelectDirectoryUserCommand` on ViewModel + code-behind event handler 2. **14-02** (Wave 2): Full XAML changes — mode toggle, conditional Search/Browse panels, directory DataGrid, loading UX