From 85506c58d9eee432d07ebefcbb236ce65a0592aa Mon Sep 17 00:00:00 2001
From: Claude
Date: Mon, 31 Aug 2026 19:13:18 +0000
Subject: [PATCH 1/2] feat: GitHub Page link in the board header
(PyAutoBrain#325)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Add a "GitHub Page" anchor beside the board's "markdown version" link,
pointing at this repo's README.md on github.com — the way back from the
Pages-hosted board to the repository front door. The href is derived
from the generator's existing identity surface, never a hardcoded
owner; the segment drops out when that identity is unknown. Asserted
in the generator's existing board test.
Part of the six-board task PyAutoLabs/PyAutoBrain#325 (one PR per repo).
Co-Authored-By: Claude Fable 5
Claude-Session: https://claude.ai/code/session_0167h9uiDYZ1kVnPa2yuAZnB
---
heart/dashboard.py | 9 ++++++++-
tests/test_dashboard.py | 4 ++++
2 files changed, 12 insertions(+), 1 deletion(-)
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}
diff --git a/tests/test_dashboard.py b/tests/test_dashboard.py
index 191dd501..e8253d04 100644
--- a/tests/test_dashboard.py
+++ b/tests/test_dashboard.py
@@ -96,6 +96,10 @@ 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.
+ assert 'markdown version' in out
+ assert ('GitHub Page') in out
# No external ASSETS (renders anywhere, loads nothing remote): no src=, no
# , no fetches. Inline