From ad48852530abebc215602f3d16d28f9aeda975c0 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 7 Oct 2026 08:53:31 +0100 Subject: [PATCH] feat: add shared dashboard freshness footer --- agents/conductors/cortex/_cortex.py | 12 +-- agents/conductors/intake/_intake.py | 12 ++- board/_board.py | 9 ++- board/_theme.py | 101 +++++++++++++++++++++++++- docs/board-orchestration.md | 64 +++++++++++++++- tests/board_freshness_browser.cjs | 50 +++++++++++++ tests/render_orchestration_fixture.py | 2 + tests/test_board_theme.py | 44 ++++++++++- tests/test_cortex_conductor.py | 14 ++++ tests/test_intake_dashboard.py | 5 +- tests/test_prompt_budget.py | 2 + 11 files changed, 296 insertions(+), 19 deletions(-) create mode 100644 tests/board_freshness_browser.cjs diff --git a/agents/conductors/cortex/_cortex.py b/agents/conductors/cortex/_cortex.py index cf294d9e..e6317120 100644 --- a/agents/conductors/cortex/_cortex.py +++ b/agents/conductors/cortex/_cortex.py @@ -71,6 +71,7 @@ sys.path.insert(0, str(BRAIN_HOME / "board")) from _theme import ( # noqa: E402 JS as _THEME_JS, boards_footer, css as _theme_css, hero, orchestration_panel, pills, stats, + normalize_refresh_stamp, ) # The organ-cockpit feed contract (board/_state.py, state.json v1) — the same # constructor the Brain board uses, so this renderer cannot write a feed the @@ -294,6 +295,7 @@ def census(root: Path) -> dict: "root": str(root), "home": _home(root), "generated": _dt.date.today().isoformat(), + "refreshed_at": _now().strftime("%Y-%m-%dT%H:%M:%SZ"), "checkin": checkin, "problems": problems, "projects": projects, @@ -658,11 +660,9 @@ def render_dashboard_html(c: dict) -> str: orchestration_panel( "cortex", "Check in on the science", "Review projects and runs together, then record what you have learned.", - checkin_payload(c), work_links=work_links, copy_label=CHECKIN_LABEL, organ="cortex"), - # One line, deliberately: the `--check` normaliser drops it whole so - # a date change is not drift. - f'

Last updated ' - f'{c["generated"]}.

', + checkin_payload(c), work_links=work_links, copy_label=CHECKIN_LABEL, organ="cortex", + refreshed_at=c.get("refreshed_at") if not c.get("problems") else None, + refresh_url=home + "/actions/workflows/dashboard_refresh.yml" if home else None), ] if home: H.append(f'

' @@ -734,7 +734,7 @@ def keep(line: str) -> bool: return not (line.startswith("