Technical Documentation: Settings - System Status
Architecture


This screen gathers low-level OS metrics from the Go Backend using the gopsutil library. Data is refreshed every 5 seconds to provide near-real-time feedback.
Technical Details
- File Path: lib/screens/settings_screen.dart (System Tab)
- Data Source: GET /api/system/status
- Metric Tracking:
- CPU: Percentage of total cycles across all cores.
- RAM: Byte-precise usage (Used/Available/Total).
- Disk: Usage stats for the primary / partition.
- Thermal: Sensor data from /sys/class/thermal.
Implementation Details
- Polling Loop: Employs a StreamBuilder or periodic Timer to fetch metrics from the backend.
- Visual Gauges: Uses custom-drawn circular progress indicators to represent percentage-based metrics.
- Error States: If the backend cannot reach the hardware-level metrics (e.g., during a node failure), the UI displays "Unavailable" badges for affected gauges.