Skip to content

Reports: show latest recorded activity time with offset - #404

Open
jay23606 wants to merge 1 commit into
HafidIdrissi:mainfrom
jay23606:pr-go/243-reports-add-a-last-recorded-time-indicat
Open

jay23606 wants to merge 1 commit into
HafidIdrissi:mainfrom
jay23606:pr-go/243-reports-add-a-last-recorded-time-indicat

Conversation

@jay23606

@jay23606 jay23606 commented Dec 6, 2026

Copy link
Copy Markdown

Problem

The HTML report shows generation time but has no indicator for the latest recorded activity, so an empty or old report does not show how current its data is.

Change

  • render_html now shows Latest recorded activity: <time with offset> in the report header, or No recorded activity in this period when nothing falls in the range.
  • The latest time is taken only from periods clipped to the report range (local midnight of the first day through the end of the last day). A period that runs past the last day counts as ending at that day's end, and a period entirely outside the range is ignored.
  • The indicator is labeled separately from the generation time. It does not use the file timestamp.

Testing

  • .venv/bin/python -m unittest tests.test_reporting.ReportingTests.test_latest_recorded_time_uses_latest_period_end_with_offset: passes with the fix.
  • .venv/bin/python -m unittest discover -s .pr-go/base/tests -t .pr-go/base -p test_reporting.py -k test_latest_recorded_time_uses_latest_period_end_with_offset: fails on the base commit with Latest recorded activity: 2026-07-20 08:00+00:00' not found.
  • .venv/bin/python -m unittest tests.test_reporting -v: passes.
  • .venv/bin/python -m unittest discover -v: OK (skipped=7).

Regression test: fails on base twice (/Latest recorded activity: 2026-07-20 08:00+00:00' not found/), passes on fix twice (.venv/bin/python -m unittest tests.test_reporting.ReportingTests.test_latest_recorded_time_uses_latest_period_end_with_offset)

Fixes #243

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reports: add a last-recorded-time indicator for historical context

1 participant