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:
@@ -819,19 +819,17 @@ class TestHistoricalSelectionIdentity:
|
||||
# Move from final local hour to the second 01:00 occurrence.
|
||||
await pilot.press(*(["left"] * 22))
|
||||
second_occurrence = str(app.query_one("#bar-readout").render())
|
||||
assert "01:00 -0500" in second_occurrence
|
||||
assert "America/New_York -0500" in second_occurrence
|
||||
assert "01:00 America/New_York -05:00" in second_occurrence
|
||||
assert "06:00 UTC" in second_occurrence
|
||||
|
||||
await pilot.press("left")
|
||||
first_occurrence = str(app.query_one("#bar-readout").render())
|
||||
assert "01:00 -0400" in first_occurrence
|
||||
assert "America/New_York -0400" in first_occurrence
|
||||
assert "01:00 America/New_York -04:00" in first_occurrence
|
||||
assert "05:00 UTC" in first_occurrence
|
||||
|
||||
await pilot.press("left")
|
||||
incomplete_hour = str(app.query_one("#bar-readout").render())
|
||||
assert "00:00 -0400" in incomplete_hour
|
||||
assert "00:00 America/New_York -04:00" in incomplete_hour
|
||||
assert "50% coverage · incomplete" in incomplete_hour
|
||||
finally:
|
||||
patcher.stop()
|
||||
|
||||
Reference in New Issue
Block a user