Extract Activity readout and show local time #108

Open
opened 2026-10-03 02:42:59 +00:00 by xavierk · 0 comments
Owner

Goal

Move activity data assembly out of tui.py into an Activity readout module, and display local time everywhere.

Scope

  • One entry: readout(conn, selection, now) → ActivityReadout. Selection carries view, measure, date and point. The local timezone is resolved inside the module.
  • Absorb _query_daily_graph_data, _query_hourly_graph_data, _query_local_day_graph_data, _query_local_hourly_graph_data, _query_live_graph_data and _query_drive_health.
  • Local time everywhere in TUI and CLI, with a timezone label:
    • Usage-history daily bars read local-day evidence (ADR 0010), never relabelled UTC day aggregates (CONTEXT.md).
    • The inspect readout keeps a secondary UTC line.
    • Remove hard-coded "UTC" labels (tui.py:327, 531, 544, 630–659, 1457–1500).
  • One time-formatting home. freshness_age_human moves or is reused.

Acceptance criteria

  • Readout tests use SQLite fixtures and no Textual, covering gaps, partial days, shared local-day evidence and timezone labels.
  • tui.py only draws readouts.
  • Existing Pilot tests pass unchanged in behaviour, except for UTC labels changing to local time.
## Goal Move activity data assembly out of `tui.py` into an **Activity readout** module, and display local time everywhere. ## Scope - One entry: `readout(conn, selection, now) → ActivityReadout`. Selection carries view, measure, date and point. The local timezone is resolved inside the module. - Absorb `_query_daily_graph_data`, `_query_hourly_graph_data`, `_query_local_day_graph_data`, `_query_local_hourly_graph_data`, `_query_live_graph_data` and `_query_drive_health`. - **Local time everywhere** in TUI and CLI, with a timezone label: - Usage-history daily bars read local-day evidence (ADR 0010), never relabelled UTC day aggregates (CONTEXT.md). - The inspect readout keeps a secondary UTC line. - Remove hard-coded "UTC" labels (`tui.py:327, 531, 544, 630–659, 1457–1500`). - One time-formatting home. `freshness_age_human` moves or is reused. ## Acceptance criteria - [ ] Readout tests use SQLite fixtures and no Textual, covering gaps, partial days, shared local-day evidence and timezone labels. - [ ] `tui.py` only draws readouts. - [ ] Existing Pilot tests pass unchanged in behaviour, except for UTC labels changing to local time.
xavierk added the ready-for-agent label 2026-10-03 02:42:59 +00:00
xavierk added a new dependency 2026-10-03 02:43:12 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: xavierk/Fenris#108