From 20fc9b1211095bcaf7a9f1a38157cb4d94b6d399 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 31 Aug 2026 19:13:18 +0000 Subject: [PATCH] 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 --- scripts/board.py | 7 ++++++- tests/test_board.py | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/board.py b/scripts/board.py index b325efa..805ffb1 100644 --- a/scripts/board.py +++ b/scripts/board.py @@ -1160,6 +1160,11 @@ def _fresh_span(fresh: dict, now_text: str, stale_text: str, hero = t_.hero(BOARD_KEY, "Dashboard", _LEDE) stats = t_.stats((t["pages"], "Pages"), (f"{pct}%", "Cited"), (t["todo"], "To cite"), (t["queued"], "Queued")) + # The way back from the Pages board to the repository front door; the + # segment drops out when the snapshot carries no owner/repo. + repo_url = _repo_url(snapshot) + github_link = (f' · ' + "GitHub Page" if repo_url else "") return f""" @@ -1169,7 +1174,7 @@ def _fresh_span(fresh: dict, now_text: str, stale_text: str, {hero} {stats} -

markdown version

+

markdown version{github_link}

arXiv inbox (suggested overnight — un-acted papers lapse after {inbox_actions.INBOX_WINDOW_DAYS} days)

{inbox_block} diff --git a/tests/test_board.py b/tests/test_board.py index 8059406..3bdb1f4 100644 --- a/tests/test_board.py +++ b/tests/test_board.py @@ -143,6 +143,10 @@ def test_work_queue_prompts_reference_the_documented_workflow(tmp_path): def test_paper_links_and_issue_actions(tmp_path): html = board.render(_snap_with_remote(tmp_path), "html") + # the header links the markdown twin and the repository front door + assert 'markdown version' in html + assert ('GitHub Page') in html # ref'd paper → its abstract page; bare title → an arXiv title search assert "https://arxiv.org/abs/2406.01234" in html assert ("https://arxiv.org/search/?searchtype=title&query=Title%20One" @@ -209,6 +213,8 @@ def test_badge_shape(tmp_path): def test_html_is_self_contained(tmp_path): out = board.render(board.collect(_tree(tmp_path)), "html") assert out.lstrip().startswith("") + # no repo identity in this snapshot → the GitHub Page segment drops out + assert "GitHub Page" not in out assert "src=" not in out and "