Mapare UI ↔ Operații documentate. Status implementare şi TODO-uri pentru a alinia UI la documentație.
Documentație: ChargingMonitoring.md
| File | Status | Alignment | TODO |
|---|---|---|---|
MeterChargeRecordTabView.swift |
✅ Exists | Good | Document timeout handling |
ChargeRecordSheetView.swift |
✅ Exists | Fair | Add measurement count UI |
ChargeSessionCompletionSheetView.swift |
✅ Exists | Fair | Show isolation interval |
BatteryCheckpointEditorSheetView.swift |
✅ Exists | Good | Add stdDev visualization |
MeterChargeRecordTabView
├─ [Start recording button]
├─ [Live power graph]
├─ [Energy counter (Wh)]
├─ [Duration counter]
└─ [Stop recording button]
└─ ChargeRecordSheetView
├─ [Completion details]
├─ [Battery checkpoints]
├─ [Charger selection]
└─ [Save/discard]
Invariant validation display
Measurement monitoring
Isolation visualization
Documentație: CapacityMeasurement.md
| File | Status | Alignment | TODO |
|---|---|---|---|
ChargeSessionDetailView.swift |
✅ Exists | Poor | Add capacity learning |
ChargedDeviceSettingsView.swift |
✅ Exists | Poor | Show measured vs rated capacity |
| — | ❌ Missing | — | Battery health indicator |
| — | ❌ Missing | — | Capacity trend graph |
ChargeSessionDetailView
├─ [Session info: date, duration, energy]
├─ [Device/charger info]
└─ [Checkpoint list]
Capacity learning indicator
Battery health display
Measured capacity: 2950 mAh
Rated capacity: 3000 mAh
Health: 98% ✓
Multiple measurement history
Documentație: ChargeCurveIsolation.md
| File | Status | Alignment | TODO |
|---|---|---|---|
ChargeRecordSheetView.swift |
✅ Exists | Fair | Add isolation visualization |
TimeSeriesChart.swift |
✅ Exists | Good | Highlight isolated region |
ChargeRecordSheetView
├─ [Total energy]
├─ [Duration]
└─ [Checkpoints]
Isolated interval visualization
Power (W)
20├──────────────────────
│ NOISE (discarded)
10├──────┐
│ ISOLATED REGION ████████
5├──────┘
│ NOISE (discarded)
0└──────────────────────
Detection feedback
Noise estimation
Documentație: ChargeCurveStorage.md
| File | Status | Alignment | TODO |
|---|---|---|---|
ChargedDeviceSessionsView.swift |
✅ Exists | Good | Show compression status |
ChargeSessionDetailView.swift |
✅ Exists | Good | Show sample count |
ChargedDeviceSessionsView
├─ [Session list (sorted by date)]
└─ [Each row: date, duration, energy]
Compression indicator
Sync status
Storage estimate
Documentație: ConsumptionMeasurement.md
| File | Status | Alignment | TODO |
|---|---|---|---|
ConsumptionMonitorView.swift |
✅ Exists | Good | Strengthen predictions |
TimeSeriesChart.swift |
✅ Exists | Good | Add interval selection |
ConsumptionMonitorView
├─ [Meter selection]
├─ [Active session card]
├─ [Live metrics (Power, Energy, Time)]
├─ [Aggregation duration selector (300s default)]
├─ [Inventory list]
└─ [Saved sessions]
Tail trimming improvements
Power (W)
20├──────────────────
│ ◄─ drag start
│ [selected region]
10├──────────────────► drag end
│
0 └──────────────────
10:00 10:30 11:00
Prediction display
Measured (10:00–10:30): 12.5W avg
Predict next 30 min: 12.5Wh ±2.5Wh (80% confidence)
Predict next 24h: 300Wh ±120Wh (40% confidence ⚠️)
Statistics card
Total Energy: 12.5 Wh
Avg Power: 25 W
Peak Power: 32 W
Min Power: 15 W
Variance (σ): ±3.2 W
Measurement #: 1800 samples
Measurement discard confirmation
Documentație: IdleConsumptionMeasurement.md
Status: ❌ MISSING
IdleConsumptionSetupView
┌─────────────────────────────┐
│ Measure Idle Consumption │
├─────────────────────────────┤
│ Device: [iPhone 15 ▼] │
│ Charger: [USB-C 20W ▼] │
│ Battery: [100% ✓] │
├─────────────────────────────┤
│ [Start measurement] │
└─────────────────────────────┘
IdleConsumptionMonitorView
┌──────────────────────────────┐
│ Recording idle consumption...│
├──────────────────────────────┤
│ Power (W) 5 W │
│ Trend: ↘ (stabilizing) │
│ │
│ Time elapsed: 00:15:32 │
│ │
│ Status: ✓ Idle detected │
│ (power < 5W, stable) │
│ │
│ [Confirm] [Discard] │
└──────────────────────────────┘
IdleConsumptionReviewView
┌──────────────────────────────┐
│ Idle Profile (Adjust) │
├──────────────────────────────┤
│ Power (W) │
│ 5 ├───────────────── │
│ │ ◄─ slide to adjust │
│ 0 │ ████████████► idle │
│ └──────────────────── │
│ 10:15 10:45 │
│ │
│ Idle Power: 0.25 W │
│ Duration: 30 min │
│ Confidence: 85% ✓ │
│ │
│ [Save profile] [Retry] │
└──────────────────────────────┘
DeviceIdleProfilesView
┌──────────────────────────────┐
│ Idle Profiles │
├──────────────────────────────┤
│ iPhone 15: │
│ └─ USB-C 20W: 0.25 W │
│ └─ MagSafe: 0.20 W │
│ │
│ iPad Pro: │
│ └─ USB-C 30W: 0.45 W │
│ │
│ [Measure new] [Edit] │
└──────────────────────────────┘
ChargeSessionCompletionSheetView
MeterChargeRecordTabView
ChargedDeviceSettingsView
Documentație: - Operations.md - CloudKitSync.md - BluetoothDiscovery.md
| Component | UI File | Status |
|---|---|---|
| BT Discovery | SidebarMeterCardView.swift |
✅ Good |
| Connection | MeterHomeTabView.swift |
✅ Good |
| CloudKit sync | (implicit) | ✅ Good |
CloudKit sync status display
Connection retry display
Discovery throttling indicator
| Operation | Documentație | UI Status | Alignment | Priority |
|---|---|---|---|---|
| Charging Monitoring | ✅ | ✅ Impl | Fair | Medium |
| Capacity Learning | ✅ | ⚠️ Partial | Poor | High |
| Curve Isolation | ✅ | ✅ Impl | Fair | Medium |
| Curve Storage | ✅ | ✅ Impl | Good | Low |
| Consumption Meas. | ✅ | ✅ Impl | Good | Low |
| Idle Consumption | ✅ | ❌ Missing | — | High |
| Cloud Sync | ✅ | ✅ Impl | Good | Low |
| BT Discovery | ✅ | ✅ Impl | Good | Low |
ChargingMonitoring.md, etc.)Example comment in code:
swift
// See: Documentation/API Reference/ChargingMonitoring.md
// MUST: recordMeasurement fails if sessionState < active
if !session.isActive {
throw SessionError.invalidState
}
// DOCUMENTED in code for traced invariants