# Gap: Missing Dialogs and UI Components ## Priority-Ranked List ### CRITICAL — Safety Dialogs (prevent hardware damage) #### 1. RPM Safety Warning (`WCareOnRpmOn`) **Old behavior:** Shown when operator sets RPM > 0 but oil pump is not running. Three options: turn on oil pump + proceed, proceed without oil, cancel. **Trigger:** RPM setpoint change in BenchControlViewModel **MVVM:** Dialog returns enum (ProceedWithOil / ProceedWithout / Cancel) **Why critical:** Running the pump motor without oil circulation can cause bearing damage. #### 2. Oil Pump Confirmation (`WAcceptOilTurnOn`) **Old behavior:** Confirmation dialog before activating oil pump. Ensures operator confirms oil level and connections are ready. **Trigger:** Oil pump relay toggle in BenchControlViewModel **MVVM:** Simple confirm/cancel dialog #### 3. 27V Warning (`WAlert27v`) **Old behavior:** Warning when pump requires 27V power supply (some Ford variants). Alerts operator to switch power supply before proceeding. **Trigger:** Pump selection when pump definition indicates 27V requirement **MVVM:** Informational dialog with acknowledge button ### HIGH — Functional Dialogs #### 4. Ford Unlock Progress (`WUnlocker`) See `gap-ford-unlock-ui.md` for full spec. #### 5. COM Port / K-Line Selection (`KlineIDSelection`) **Old behavior:** Dropdown listing available FTDI devices by serial number. User selects which adapter to use for K-Line communication. **Current gap:** `KwpService.DetectKLinePort()` auto-detects the first FTDI device. No UI for manual selection when multiple adapters are connected. **Trigger:** K-Line connection attempt, or settings panel **MVVM:** ComboBox of detected FTDI serial numbers + Connect button #### 6. User Management (`WUsersManage`) **Old behavior:** Add/remove users, change passwords. User list displayed in a grid. **Current state:** `UserCheckDialog` handles auth only. `ConfigurationService.UpdateUsers()` exists but no UI invokes it for CRUD. **Trigger:** Admin menu or settings panel **MVVM:** DataGrid with add/edit/remove buttons. Hash or encrypt passwords before storage (see gap-missing-features.md). #### 7. Full Settings Panel (`WConfigPanel`) **Old behavior:** Comprehensive dialog for all settings: PID tuning, refresh rates, safety limits, encoder resolution, motor calibration, company info, log retention, language selection. **Current state:** `BenchParamConfigView` covers bench CAN parameter editing only. All other settings require hand-editing config.xml. **Trigger:** Settings button in toolbar **MVVM:** Tabbed dialog (General, Safety, PID, Company, Sensors, Language) ### MEDIUM — Utility Dialogs #### 8. Generic Confirmation (`WAskQuestion`) **Old behavior:** Reusable yes/no dialog with custom message. **Alternative:** WPF's built-in `MessageBox.Show` with `MessageBoxButton.YesNo`. Can be used directly in ViewModels via a dialog service abstraction. No custom dialog needed unless the app's visual theme demands it. #### 9. Generic Alert (`WGenericAlert`) **Old behavior:** Reusable info/warning dialog with custom message + icon. **Alternative:** Same as above — `MessageBox.Show` covers this. Implement a custom one only if visual consistency matters. ### MEDIUM — Missing Controls #### 10. Test Timer/Countdown (`TimerDisplay`) **Old behavior:** Visual countdown during conditioning and measurement phases. Shows remaining seconds in large digital font. **Current gap:** Phase progress is communicated via `VerboseMessage` text events but no dedicated countdown UI. **Implementation:** Either a UserControl with large text binding, or integrate into `TestDisplayView` with a progress ring. #### 11. Bit-Level Status Display (`BitDisplay` / `SingleBit`) **Old behavior:** Grid of toggleable bits showing pump status word state. Each bit shows label + green/red indicator based on PumpStatusDefinition. **Current state:** `StatusDisplayView` exists but may not render individual bits as toggle indicators. **Implementation:** ItemsControl with BitDisplay item template (colored circle + label per bit). #### 12. Searchable ComboBox (`FilteredComboBox`) **Old behavior:** Dropdown with text filtering for pump selection (100+ pumps). **Alternative:** Extended.Wpf.Toolkit's `AutoFilteredComboBox` may cover this. Or implement as a standard ComboBox with `IsTextSearchEnabled="True"` and `IsEditable="True"`. ### LOW — Display Controls #### 13. Temperature Display Widget (`TempDisplayer`) **Current state:** Temperature values are shown inline in the main UI. A dedicated widget is nice-to-have but not functionally missing. #### 14. Graphical Result Display (`GraphicResultDisplay` / `CustomChart`) **Current state:** `FlowmeterChartView` + `ReportChartRenderer` partially cover this. LiveChartsCore handles real-time visualization. The old custom chart control is superseded. ## Implementation Pattern All dialogs should follow the existing MVVM pattern: - `Views/Dialogs/XxxDialog.xaml` — pure XAML, no code-behind logic - `ViewModels/Dialogs/XxxViewModel.cs` — `[ObservableProperty]`, `[RelayCommand]` - Opened from parent ViewModel via a dialog service or `Window.ShowDialog()` - Results returned via ViewModel property, not code-behind event args