Plot live drive activity every three minutes #91

Closed
opened 2026-09-17 10:33:43 +00:00 by xavierk · 1 comment
Owner

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

  • Both systemd and runit default to the three-minute collection target. Update shared cadence/freshness semantics, shipped definitions, affected acceptance contracts, and user documentation together; preserve serialization and bounded collection failure behavior.
  • The normal opening dashboard shows a rolling last-three-hours graph of interval written volume, with both local-day read/write totals visible. Data-volume units are primary, not MB/s.
  • The read/write toggle and clickable equivalent switch the plotted measurement while preserving the view and both daily figures. Point inspection exposes actual timestamps, timezone, measured volume, and evidence state.
  • The graph reads only committed observation-store evidence. It refreshes as new readings arrive; the TUI never interrogates the device or creates an independent sampler.
  • Each point includes activity between compatible readings. Use actual elapsed timestamps rather than pretending delayed runs are exact three-minute samples; do not interpolate catch-up points, fill unknown slots with zero, or draw a continuous measured series across unavailable evidence.
  • Closing the TUI leaves background collection running. Verify subsequent collection and reopening reveal the intervening evidence; preserve reboot/monitoring continuity and the distinction between quit and deliberate pause.
  • Measured zero, the first-reading state, partial intervals, stale evidence, failed collection, pauses, and store faults remain visibly distinguishable in the new live view.
  • Drive controlled readings through the real collector/store into the headless TUI and verify visible plotted/readout values. Do not force widget focus merely to make advertised point inspection or toggle controls work.
  • Verify the normal terminal view and constrained textual/reflow fallback preserve totals, units, evidence states, and controls; retain theme and reduced-motion behavior.
  • Use existing scheduler/control tests for cadence and focused controlled platform probes where needed. State any unavailable platform verification; do not claim host-service changes or package releases as part of this ticket without their appropriate authorization.

Blocked by

## Parent [Implement live daily drive activity, keyboard date navigation, and an endurance outlook](https://git.bongbetic.com/xavierk/Fenris/issues/88) ## 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 - [ ] Both systemd and runit default to the three-minute collection target. Update shared cadence/freshness semantics, shipped definitions, affected acceptance contracts, and user documentation together; preserve serialization and bounded collection failure behavior. - [ ] The normal opening dashboard shows a rolling last-three-hours graph of interval written volume, with both local-day read/write totals visible. Data-volume units are primary, not MB/s. - [ ] The read/write toggle and clickable equivalent switch the plotted measurement while preserving the view and both daily figures. Point inspection exposes actual timestamps, timezone, measured volume, and evidence state. - [ ] The graph reads only committed observation-store evidence. It refreshes as new readings arrive; the TUI never interrogates the device or creates an independent sampler. - [ ] Each point includes activity between compatible readings. Use actual elapsed timestamps rather than pretending delayed runs are exact three-minute samples; do not interpolate catch-up points, fill unknown slots with zero, or draw a continuous measured series across unavailable evidence. - [ ] Closing the TUI leaves background collection running. Verify subsequent collection and reopening reveal the intervening evidence; preserve reboot/monitoring continuity and the distinction between quit and deliberate pause. - [ ] Measured zero, the first-reading state, partial intervals, stale evidence, failed collection, pauses, and store faults remain visibly distinguishable in the new live view. - [ ] Drive controlled readings through the real collector/store into the headless TUI and verify visible plotted/readout values. Do not force widget focus merely to make advertised point inspection or toggle controls work. - [ ] Verify the normal terminal view and constrained textual/reflow fallback preserve totals, units, evidence states, and controls; retain theme and reduced-motion behavior. - [ ] Use existing scheduler/control tests for cadence and focused controlled platform probes where needed. State any unavailable platform verification; do not claim host-service changes or package releases as part of this ticket without their appropriate authorization. ## Blocked by - [Show trustworthy local-day activity totals](https://git.bongbetic.com/xavierk/Fenris/issues/90)
xavierk added the ready-for-agent label 2026-09-17 10:33:43 +00:00
xavierk added a new dependency 2026-09-17 10:34:07 +00:00
xavierk added a new dependency 2026-09-17 10:34:08 +00:00
Author
Owner

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.

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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: xavierk/Fenris#91