From 4ecd201a88fdb3404891e96554e7b620cf699df8 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 8 Oct 2026 12:02:32 +0100 Subject: [PATCH] fix: standardize dashboard controls and remove redundant chrome --- heart/dashboard.py | 9 ++------- tests/test_dashboard.py | 4 ++-- tests/test_dashboard_disclosures.py | 2 +- tests/test_fix.py | 2 +- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/heart/dashboard.py b/heart/dashboard.py index ebe220bc..5ee5a03c 100644 --- a/heart/dashboard.py +++ b/heart/dashboard.py @@ -2377,13 +2377,8 @@ def _render_html(board: Board) -> str: if any(b["severity"] == severity for b in board.blockers) ) hero = t_.hero(BOARD_KEY, "Dashboard", navigation=navigation) - # 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 "") work_links = ([{"label": "Open Heart repository", "href": f"https://github.com/{gh_owner}/{repo_name}"}] if gh_owner else []) actions = _html_actions(board) @@ -2393,7 +2388,7 @@ def _render_html(board: Board) -> str: panel = t_.orchestration_panel( "heart", "Fix Heart systematically", "", (board.fix_plan or build_fix_plan(board))["prompt"], - work_links=work_links, copy_label="Fix Heart systematically", organ="heart", + work_links=work_links, organ="heart", refreshed_at=board.refreshed_at, refresh_url=(f"https://github.com/{gh_owner}/{repo_name}/actions/workflows/heart-health.yml" if gh_owner else None)) @@ -2420,7 +2415,7 @@ def _render_html(board: Board) -> str: Monitoring: {(board.monitoring or {}).get("status", "unknown").upper()} Release readiness: {word}

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

+ {age} · markdown version

{stale_html}

{_html.escape(board.vantage)} · {_html.escape(board.devbox_observed or ('no dev-box observation attached' if board.vantage == 'cloud snapshot' else 'observed on this dev box'))}

diff --git a/tests/test_dashboard.py b/tests/test_dashboard.py index 762e3311..ede643ad 100644 --- a/tests/test_dashboard.py +++ b/tests/test_dashboard.py @@ -103,8 +103,8 @@ def test_html_is_self_contained(): # it as an icon), so assert the href survives rather than the label text. assert 'href="dashboard.md"' in out gh_owner = dashboard.REPO_OWNERS["PyAutoHeart"] - assert (f'GitHub Page') in out + assert f'PyAutoHeart' in out + assert 'GitHub Page' not in out # No external ASSETS (renders anywhere, loads nothing remote): no src=, no # , no fetches. Inline