Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/dashboard_refresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ name: Dashboard Refresh
# latest PyPI release) and any dispatch that did not arrive.
# - workflow_dispatch: manual.
#
# The render is deterministic (the pages have no wall-clock stamp, and
# state.json's `updated` moves only when the feed's content does), so a night
# with no change commits nothing. The runner has no project-repo checkout and uses Brain only for presentation,
# Rendering the same captured inputs is deterministic. Each successful
# collection records its capture time in the orchestration panel; state.json
# `updated` still moves only when the feed content changes. The runner has no
# project-repo checkout and uses Brain only for presentation,
# so each instance's conductor survey is carried forward from the committed
# dashboard (the last local `bin/pyauto-eyes board`); the open critiques are
# read live from a checkout of PyAutoMind (public). The bot commit uses GITHUB_TOKEN, which never
Expand Down
19 changes: 17 additions & 2 deletions eyes/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ class InstanceView:
latest: str | None # latest released library version, None if unknown
context: context_mod.Context = field(default_factory=context_mod.Context)

captured_at: str | None = None # successful manifest collection, never figure evidence

@property
def behind(self) -> bool:
return self.freshness.startswith("behind")
Expand Down Expand Up @@ -132,6 +134,7 @@ def collect(
release_lookup=latest_release,
context_lookup=None,
previous=None,
captured_at=None,
):
"""Read every instance's manifest (and its latest release, when online).

Expand All @@ -140,6 +143,7 @@ def collect(
CLI); None skips it, carrying forward whatever ``previous`` (the
committed dashboard.md text) recorded.
"""
capture_time = captured_at or _utc_now()
sources = sources or {}
before = context_mod.recorded(previous) if previous else {}
views = []
Expand All @@ -156,7 +160,7 @@ def collect(
ctx = context_lookup(inst, checkout, prior)
else:
ctx = prior or context_mod.Context()
views.append(InstanceView(inst, man, error, latest, ctx))
views.append(InstanceView(inst, man, error, latest, ctx, capture_time if man else None))
return views


Expand Down Expand Up @@ -464,7 +468,18 @@ def render_html(views) -> str:
if owner_url:
work_links.append({"label": ORGAN_ROOT.name, "href": owner_url})
panel = shared.orchestration_panel(
"eyes", "", "", CHECKIN_PROMPT, work_links=work_links, organ="eyes"
"eyes",
"",
"",
CHECKIN_PROMPT,
work_links=work_links,
organ="eyes",
refreshed_at=(
min(v.captured_at for v in views)
if views and all(v.manifest and v.captured_at for v in views)
else None
),
refresh_url=(owner_url + "/actions/workflows/dashboard_refresh.yml") if owner_url else None,
)
rows = []
for v in views:
Expand Down
12 changes: 12 additions & 0 deletions tests/test_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,3 +371,15 @@ def test_empty_orchestration_reports_unavailable_without_inventing_a_repo(monkey
page = board.render_html([])
assert "Work repository unavailable in this snapshot." in page
assert "data-orchestration-copy" in page


def test_refresh_uses_successful_collection_not_figure_generation(registry_file, project):
instances = registry.load(registry_file)
views = board.collect(
instances, {"demo": project}, offline=True, captured_at="2026-10-07T09:00:00Z"
)
page = board.render_html(views)
assert 'data-refreshed-at="2026-10-07T09:00:00Z"' in page
assert board.render_html(views) == page
views[0].captured_at = None
assert "Last updated unavailable" in board.render_html(views)
Loading