From 1bcd9ab1d86b0391ecdd426f5dc9296291bc55e2 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Tue, 6 Oct 2026 15:11:16 +0100 Subject: [PATCH] feat: adopt shared dashboard orchestration panel --- AGENTS.md | 13 +++++++++++++ scripts/board.py | 18 +++++++++++++++++- tests/test_board.py | 26 ++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index b0e364e..d9060a0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -97,3 +97,16 @@ body and hands them to the human (sessions cannot create Discussions). Only the development flow — Mind prompt → `/start_dev` → `/create_issue` → one issue per task → PR — opens issues here. Why: `PyAutoMind/policy/community_surface.md`. + + +## Shared standards + +Before changing a shared interface, consult the applicable +[organism standard](https://github.com/PyAutoLabs/PyAutoBrain/blob/main/docs/standards.md) +on demand, identify affected consumers, and validate their adoption. Change +generated guidance at its canonical source and regenerate. + +For board changes, follow the applicable sizing, navigation and orchestration +standards and reuse Brain’s shared components. Keep domain data, prompt meaning +and approval boundaries with the board’s owner. + diff --git a/scripts/board.py b/scripts/board.py index 0b9b723..9773504 100644 --- a/scripts/board.py +++ b/scripts/board.py @@ -753,6 +753,18 @@ def _repo_url(snapshot: dict) -> str: return f"https://github.com/{owner}/{repo}" if owner and repo else "" +CHECKIN_PROMPT = ( + "Review the Memory knowledge board in this chat. Read PyAutoMemory/AGENTS.md, " + "its index and relevant domain indexes; then inspect the reading queue, digest " + "freshness, unresolved canonical keys and stub work. Read at most two or three " + "relevant pages after each index. Summarize priorities and propose one bounded " + "next step, retaining missing evidence as unknown. Apply my direction while " + "keeping the queue in view. Follow existing catch-up selection approval and " + "development workflow for writes; do not bulk-ingest papers, commit source " + "PDFs or post issues automatically." +) + + # The one-tap board family — the cross-board footer nav every board carries, # each board skipping its own entry. # @@ -1587,6 +1599,10 @@ def _fresh_span(fresh: dict, now_text: str, stale_text: str, repo_url = _repo_url(snapshot) github_link = (f' · ' "GitHub Page" if repo_url else "") + panel = t_.orchestration_panel( + "memory", "", "", CHECKIN_PROMPT, + work_links=([{"label": snapshot["repo"], "href": repo_url}] if repo_url else []), + organ="memory") # One-tap mode needs the API's owner/repo and a place to turn it on; both # drop out with the repo identity, like every other GitHub-facing chip. owner, repo = snapshot.get("owner"), snapshot.get("repo") @@ -1604,7 +1620,7 @@ def _fresh_span(fresh: dict, now_text: str, stale_text: str, {hero} -{t_.prompt_heading("memory")} +{panel}
{_catch_up_html(snapshot)}

markdown version{github_link}{onetap}

diff --git a/tests/test_board.py b/tests/test_board.py index 0b50928..36a7b43 100644 --- a/tests/test_board.py +++ b/tests/test_board.py @@ -1141,3 +1141,29 @@ def test_invalid_digest_is_escaped_and_never_given_to_browser_clock(tmp_path): assert '' not in html assert 'digest date is invalid or in the future' in html assert "data-last-digest='<" not in html + + +def test_orchestration_preview_targets_memory_and_preserves_paper_actions(tmp_path): + import html as html_module + + snap = {**_snap_with_remote(tmp_path), "owner": "SomeOrg", "repo": "MemoryWork"} + page = board.render(snap, "html") + preview = re.search(r'', + page, re.S).group(1) + assert html_module.unescape(preview) == ( + board.CHECKIN_PROMPT + "\n\nWork on GitHub:\n" + "- MemoryWork: https://github.com/SomeOrg/MemoryWork") + assert page.index('class="hero"') < page.index('id="orchestration-memory"') + assert page.index('id="orchestration-memory"') < page.index('id="catch-up"') + assert board.theme().prompt_heading("memory", heading_id="orchestration-memory-heading") in page + assert 'data-repo="SomeOrg/MemoryWork"' in page + assert board._EXTRA_JS in page + assert "https://github.com/SomeOrg/MemoryWork/issues/new?" in page + assert 'data-orchestration-copy' in page + + +def test_orchestration_without_memory_remote_is_explicit(tmp_path): + snap = {**_snap_with_remote(tmp_path), "owner": None, "repo": None} + page = board.render(snap, "html") + assert "Work repository unavailable in this snapshot." in page + assert "https://github.com/None/None" not in page