From ce6fb88e6e1508c3babe173f07705d4072169608 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 7 Oct 2026 08:53:55 +0100 Subject: [PATCH] feat: adopt shared dashboard freshness footer --- scripts/board.py | 3 ++- tests/test_board.py | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/board.py b/scripts/board.py index 4be0226..26beecc 100644 --- a/scripts/board.py +++ b/scripts/board.py @@ -1621,7 +1621,8 @@ def _fresh_span(fresh: dict, now_text: str, stale_text: str, panel = t_.orchestration_panel( "memory", "", "", CHECKIN_PROMPT, work_links=([{"label": snapshot["repo"], "href": repo_url}] if repo_url else []), - organ="memory") + organ="memory", refreshed_at=snapshot.get("generated"), + refresh_url=(repo_url + "/actions/workflows/knowledge_board.yml" if repo_url else None)) # One-tap mode needs the API's owner/repo and a place to turn it on; both # drop out with the repo identity, like every other GitHub-facing chip. owner, repo = snapshot.get("owner"), snapshot.get("repo") diff --git a/tests/test_board.py b/tests/test_board.py index 36a7b43..432de9b 100644 --- a/tests/test_board.py +++ b/tests/test_board.py @@ -32,6 +32,7 @@ def test_theme_finds_grouped_brain_from_outer_workspace(tmp_path, monkeypatch): brain_board.mkdir(parents=True) (brain_board / "_theme.py").write_text("GROUPED_THEME = True\n") monkeypatch.setenv("PYAUTO_ROOT", str(tmp_path)) + monkeypatch.delenv("PYAUTO_BRAIN", raising=False) monkeypatch.setattr(board, "MEMORY_HOME", tmp_path / "PyAutoMemory") monkeypatch.delitem(sys.modules, "_theme", raising=False) monkeypatch.setattr(sys, "path", sys.path.copy()) @@ -1167,3 +1168,13 @@ def test_orchestration_without_memory_remote_is_explicit(tmp_path): page = board.render(snap, "html") assert "Work repository unavailable in this snapshot." in page assert "https://github.com/None/None" not in page + + +def test_panel_refresh_uses_capture_not_ingest_date(tmp_path, monkeypatch): + theme = board.theme() + calls = [] + monkeypatch.setattr(theme, "orchestration_panel", lambda *a, **kw: calls.append(kw) or "") + snap = {**_snap_with_remote(tmp_path), "owner": "SomeOrg", "repo": "MemoryWork"} + board.render(snap, "html") + assert calls[0]["refreshed_at"] == snap["generated"] + assert calls[0]["refresh_url"] == "https://github.com/SomeOrg/MemoryWork/actions/workflows/knowledge_board.yml"