Redesign Home screen with device summary and scanner status

Adds a responsive Home screen combining the notification list with a
device summary panel and ARP scanner status, visible side-by-side on
wide screens and stacked on narrow ones.

Backend:
- New GET /api/devices/summary endpoint returning registered device
  counts and "seen in last 24h / 7 days" breakdowns by registration
  status
- Migration 07 adds indexes on (is_registered) and (last_seen,
  is_registered) so summary queries use index range scans instead of
  full table scans

Frontend:
- HomeScreen replaces NotificationList, embedding notifications,
  device summary card, and ArpScannerCard in a LayoutBuilder-driven
  two-column (≥700 px) or single-column layout
- ArpScannerCard extracted to a shared public widget reused by both
  HomeScreen and StatusScreen
- Nav rail entry renamed to "Home" with home icon

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-05-28 19:10:08 -04:00
co-authored by Claude Sonnet 4.6
parent dc8f47e66d
commit 251d8a479e
13 changed files with 802 additions and 367 deletions
+22
View File
@@ -0,0 +1,22 @@
class DeviceSummary {
final int totalRegistered;
final int seenLastDayRegistered;
final int seenLastDayUnregistered;
final int seenLastWeekRegistered;
final int seenLastWeekUnregistered;
const DeviceSummary({
required this.totalRegistered,
required this.seenLastDayRegistered,
required this.seenLastDayUnregistered,
required this.seenLastWeekRegistered,
required this.seenLastWeekUnregistered,
});
DeviceSummary.fromJson(Map<String, dynamic> json)
: totalRegistered = json['total_registered'] as int,
seenLastDayRegistered = json['seen_last_day_registered'] as int,
seenLastDayUnregistered = json['seen_last_day_unregistered'] as int,
seenLastWeekRegistered = json['seen_last_week_registered'] as int,
seenLastWeekUnregistered = json['seen_last_week_unregistered'] as int;
}