refactor(tui): extract Activity readout and show local time
Move activity data assembly out of tui.py into activity_readout, behind readout(conn, selection, now). Dashboard and fenris-monitor enable now show local time with a timezone label, inspected points keep a secondary UTC line, and the legacy UTC-relabelled day and hour branches are gone. Time formatting (including freshness_age_human) lives in timefmt. Hour offsets now render as +05:30 to match day labels.
This commit is contained in:
@@ -624,6 +624,7 @@ class TestCollectorIntegration:
|
||||
assert summary["activity_state"] in ("incomplete", "so_far")
|
||||
conn.close()
|
||||
|
||||
from fenris.activity_readout import selected_local_day
|
||||
from fenris.status import read_status
|
||||
from fenris.tui import FenrisTuiApp
|
||||
|
||||
@@ -634,7 +635,9 @@ class TestCollectorIntegration:
|
||||
Path(store), second_at, query_services=False
|
||||
) as (reader, _):
|
||||
assert reader is not None
|
||||
app._render_local_day(reader)
|
||||
app._render_local_day(*selected_local_day(
|
||||
reader, app._activity_selection, second_at,
|
||||
))
|
||||
visible = str(app.query_one("#local-day").render())
|
||||
assert "2026-09-02" in visible
|
||||
assert "Asia/Kolkata +05:30" in visible
|
||||
|
||||
Reference in New Issue
Block a user