Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ The copyable dashboard prompt points here. Current status cards are not a
historical activity ledger.

The dashboard uses Brain's shared hero/panel, registry and state validator.
Its organ disclosures stay visible as a grid, without another outer disclosure
or duplicate organ navigation. Each expanded organ has at most three concise
rows. `scripts/overview.js` is inlined at render time and refreshes published
Its organ disclosures stay visible as a grid, without another outer disclosure.
The shared organ-link footer sits below the grid. Each expanded organ has at most
three concise rows. `scripts/overview.js` is inlined at render time and refreshes published
feeds without replacing open disclosures or prompt controls.

## Editing rules
Expand Down
2 changes: 2 additions & 0 deletions scripts/organism_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ def _render_html(snapshot: dict) -> str:
refresh_url=(f"https://github.com/{owner}/PyAutoScientist/actions/workflows/organism_board.yml" if owner else None))
from project_resources import render_html as render_projects
projects_html = render_projects(snapshot["project_resources"]) if "project_resources" in snapshot else ""
footer = t.boards_footer(t.board_links(f"https://{owner.lower()}.github.io", BOARD_KEY), BOARD_KEY) if owner else ""
rows = []
for row in snapshot.get("boards") or []:
key = row.get("key", row["name"].lower())
Expand All @@ -286,6 +287,7 @@ def _render_html(snapshot: dict) -> str:
<h2 id="dashboards-heading">Dashboards</h2>
<div id="dashboards" class="organ-grid" aria-label="Organ summaries">{''.join(rows)}</div>
<noscript><p>Publication snapshot. Open an organ for its latest evidence.</p></noscript>
{footer}
<script type="application/json" id="scientist-snapshot">{data}</script>
<script>{t.JS}</script><script>{script}</script></body></html>"""

Expand Down
11 changes: 11 additions & 0 deletions tests/test_organism_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,14 @@ def test_structured_heart_status_does_not_parse_the_headline():
snap = _snap('Monitoring RED · release STALE')
next(row for row in snap['boards'] if row['name'] == 'Heart')['feed'] = {'status': 'red'}
assert ob.heart_word(snap) == 'RED'


def test_organ_footer_is_below_cards_and_uses_instance_host():
page = ob.render(_snap(), "html")
footer = re.search(r'<ul class="boards">(.*?)</ul>', page, re.S)
assert footer is not None
assert page.index('id="dashboards"') < footer.start()
assert 'data-organ="brain"' in footer.group(1)
assert 'data-organ="organism"' not in footer.group(1)
assert 'https://someorg.github.io/PyAutoBrain/' in footer.group(1)
assert 'pyautolabs.github.io' not in footer.group(1)
Loading