Plot live drive activity every three minutes #91
Notifications
Due Date
No due date set.
Blocks
Depends on
#92 Browse activity dates from the keyboard
xavierk/Fenris
#90 Show trustworthy local-day activity totals
xavierk/Fenris
Reference: xavierk/Fenris#91
Reference in New Issue
Block a user
Parent
Implement live daily drive activity, keyboard date navigation, and an endurance outlook
What to build
Open Fenris on the last three hours of measured written volume, updating from background collection targeted every three minutes. Keep both local-day totals visible, offer a read/write toggle, and let users inspect the measured volume and timestamp behind each point. This is a complete scheduler-to-collector-to-visible-graph slice; it consumes the local-day headline from the prior ticket and does not depend on historical date navigation.
All behavior follows the parent specification, including its precedence over conflicting earlier TUI requirements. The approved proof uses controlled acquisition and time through a real observation store into public TUI/CLI results; preserve the existing collector/reader ownership and no-fabrication rules.
Acceptance criteria
Blocked by
Implemented all acceptance criteria:
AC1: Cadence changed from 5min to 3min (CADENCE_DEFAULT_S=180, systemd OnUnitInactiveSec=3min, runit CADENCE=180). Freshness threshold updated to 450s. All docs updated (README, ADR 0003, acceptance criteria LC-2, redesign spec, CHANGELOG).
AC2: Rolling last-three-hours graph of interval written volume via _query_live_graph_data() reading raw samples. LiveActivityGraph widget renders as vertical bars with data-volume units (MB/GB/TB). Local-day totals remain visible.
AC3: Read/write toggle via w key. Arrow keys and click inspect individual points. Readout shows timestamps (UTC), both W/R volumes, elapsed seconds, and evidence state (gap, segment boundary, measured zero).
AC4: Graph reads only committed observation-store evidence via read-only SQLite connection. TUI never interrogates the device.
AC5: Each point uses actual elapsed timestamps from consecutive samples. No interpolation, zero-filling, or synthetic catch-up points. Gaps flagged when interval > 3x cadence.
AC6: Background collection continues when TUI closes (unchanged behavior — TUI is pure reader).
AC7: Visual glyphs distinguish zero (·), gap (░), segment boundary (░), and normal activity (█). Readout shows state labels.
AC8: 20 new tests via controlled acquisition fixtures (real temporary SQLite stores, synthetic samples). 734 total tests pass.
AC9: Constrained mode hides live graph. Grid layout updated for all pause/local-day/constrained combinations. Theme and reduced-motion preserved.
AC10: Cadence tests validate 3min constant and 450s freshness threshold.
Theme shortcut resolved per spec: t now returns to today/live. Theme selection via preferences file.