diff --git a/heart/dashboard.py b/heart/dashboard.py index 77866b9f..ceda7397 100644 --- a/heart/dashboard.py +++ b/heart/dashboard.py @@ -1576,6 +1576,13 @@ def _render_html(board: Board) -> str: ) t_ = theme() hero = t_.hero(BOARD_KEY, "Dashboard", _LEDE) + # The way back from the Pages board to the repository front door; owner + # from the declared config surface (REPO_OWNERS), so the segment drops + # out on a tenant whose config does not list this repo. + repo_name = PAGES_URL.rstrip("/").rsplit("/", 1)[-1] + gh_owner = REPO_OWNERS.get(repo_name) + github_link = (f' · GitHub Page' if gh_owner else "") return f""" @@ -1586,7 +1593,7 @@ def _render_html(board: Board) -> str: {hero}

{word} · score {board.score}snapshot {_html.escape(board.ts)} · - {age} · markdown version

+ {age} · markdown version{github_link}

{stale_html} {reasons_html} {''.join(rows)}
diff --git a/tests/test_dashboard.py b/tests/test_dashboard.py index 191dd501..4a3cdec5 100644 --- a/tests/test_dashboard.py +++ b/tests/test_dashboard.py @@ -96,6 +96,13 @@ def test_html_is_self_contained(): red_reasons=["PyAutoLens: CI failure"]), fmt="html", now=FRESH_NOW) assert out.lstrip().startswith("") assert "RED" in out + # The header links the markdown twin and the repository front door. The + # expected owner comes from the same declared config surface the renderer + # reads (the tenant firewall keeps org literals out of organ code). + assert 'markdown version' in out + gh_owner = dashboard.REPO_OWNERS["PyAutoHeart"] + assert (f'GitHub Page') in out # No external ASSETS (renders anywhere, loads nothing remote): no src=, no # , no fetches. Inline