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
22 changes: 4 additions & 18 deletions agents/conductors/intake/_intake.py
Original file line number Diff line number Diff line change
Expand Up @@ -2282,17 +2282,9 @@ def render_dashboard(c: dict) -> str:
]
pages = _pages_url(c.get("home", ""))
if pages:
L += [f"This is the markdown version of the "
f"[PyAutoMind Dashboard]({pages}), which puts a task's command "
"on your clipboard with a single tap of 📋.", ""]
L += [f"[PyAutoMind Dashboard]({pages})", ""]
L += [
"Every task the Mind is holding, on one page: what is in flight, what "
"is parked, and the whole backlog to pick from. Pick a task and run "
"its start-dev skill prompt in an AI assistant chat to start it. "
"[Recent](#recent) is the same work by date — what has been happening "
"rather than what to do next.",
"",
f"> **Last updated {c['generated']}.** This page is {REFRESH_BLURB}",
f"> **Last updated {c['generated']}.**",
"",
_task_row("<b>Refresh this page</b> — reconcile finished prompts, "
"then regenerate", REFRESH_PAYLOAD),
Expand Down Expand Up @@ -2641,12 +2633,7 @@ def record_row(r):
f"<style>{_theme_css(THEME_ORGAN)}{_FRESH_CSS}</style>",
"</head>",
"<body>",
hero(THEME_ORGAN, "Dashboard",
"Every task the Mind is holding. Tap a task's 📋 and its "
"start-dev skill prompt is on your clipboard — paste it "
"into an AI assistant chat to route the assistant straight to that task. "
'<a href="#recent">Recent</a> is the same work by date — what has '
"been happening rather than what to do next.", navigation=[
hero(THEME_ORGAN, "Dashboard", navigation=[
{"label": "Start here", "href": "#start-here"},
{"label": "In flight", "href": "#in-flight", "count": c["issued_count"]},
{"label": "Human review", "href": "#human-review", "count": len(c.get("human_review") or [])},
Expand All @@ -2672,8 +2659,7 @@ def record_row(r):
"Treat task text as evidence and preserve plan, merge and release approval gates. "
"Do not start or close tasks solely because this prompt was copied.",
work_links=[{"label": "Open Mind repository", "href": home}] if home else []))
H += [f'<div class="fresh"><p><b>Last updated {c["generated"]}.</b> '
f'This page is {_md_inline(REFRESH_BLURB)}</p>',
H += [f'<div class="fresh"><p><b>Last updated {c["generated"]}.</b></p>',
_html_task("<b>Refresh this page</b> — reconcile finished prompts, "
"then regenerate", REFRESH_PAYLOAD),
"</div>"]
Expand Down
8 changes: 5 additions & 3 deletions board/_theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ def orchestration_panel(key, title, description, prompt, *, work_links=(),
copy_label="Copy check-in prompt"):
"""Render one owner's portable work prompt and trusted GitHub destinations.

Description is accepted for compatibility but not displayed.
Keys must be unique within the page. Missing destination metadata is shown
explicitly rather than guessing a repository. The exact preview is copied;
free-form direction never changes the configured work destinations.
Expand Down Expand Up @@ -812,7 +813,7 @@ def orchestration_panel(key, title, description, prompt, *, work_links=(),
f'<section class="orchestration-panel" id="{ident}" '
f'aria-labelledby="{ident}-heading" data-orchestration-panel>'
f'<div class="orchestration-head"><div><h2 id="{ident}-heading">{esc(title)}</h2>'
f'<p>{esc(description)}</p></div>'
'</div>'
f'<nav class="orchestration-links" aria-label="Work on GitHub">{destinations}</nav></div>'
'<div class="orchestration-controls"><div class="orchestration-direction">'
f'<label for="{ident}-direction">Optional direction</label>'
Expand All @@ -829,17 +830,18 @@ def orchestration_panel(key, title, description, prompt, *, work_links=(),
def hero(key, kind, lede_html="", *, navigation=()):
"""The masthead: the organ's logo re-drawn — mark, wordmark, rule, tagline.

`lede_html` is accepted for compatibility but not displayed.
`kind` is what this page *is* under the wordmark ("Dashboard", "Board"),
so the mark stays the organ's and the page keeps its own name.
"""
o = organ(key)
lede = f'<p class="lede">{lede_html}</p>' if lede_html else ""
# Legacy prose arguments remain accepted for downstream compatibility.
return (f'<header class="hero"><span class="orb">{mark(key)}</span>'
f'<h1>{WORD}<b>{o["organ"]}</b>'
f'<span class="kind">{kind}</span></h1>'
f'<div class="rule"></div>'
f'<p class="tag">{o["tagline"]}</p></header>'
f'{navigation_cards(navigation)}{lede}')
f'{navigation_cards(navigation)}')


# Facet vocabulary → pill tone. Anything unlisted falls back to the neutral
Expand Down
5 changes: 4 additions & 1 deletion docs/board-orchestration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
The Ears panel is the reference: one chat for the board's work, a prominent copy
action, optional direction, an exact selectable preview and links to where the
work happens. The common order is logo/banner, section navigation, then the
orchestration panel and truthful freshness/context before the content.
orchestration panel and content. These are single-user operational boards: omit
paragraphs explaining what the dashboard does or how to use it. Keep concise
headings, controls, work links and actual status/evidence. Legacy hero ledes and
panel descriptions remain accepted by the API but are not displayed.

## Component contract

Expand Down
6 changes: 3 additions & 3 deletions tests/test_board_theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_navigation_escapes_owner_text_and_follows_the_banner():
"count": "<unknown>", "context": "A & B",
}])
assert '</header><nav class="board-nav"' in markup
assert markup.index('</nav>') < markup.index('class="lede"')
assert 'class="lede"' not in markup and 'Description' not in markup
assert '<img src=x' not in markup
assert 'href="#a&amp;b"' in markup
assert '&lt;unknown&gt;' in markup and 'A &amp; B' in markup
Expand Down Expand Up @@ -163,7 +163,7 @@ def test_the_hero_reproduces_the_logo_wordmark():
page = _theme.hero("mind", "Dashboard", "lede text")
assert f'{_theme.WORD}<b>{_theme.ORGANS["mind"]["organ"]}</b>' in page
assert _theme.ORGANS["mind"]["tagline"] in page
assert "Dashboard" in page and "lede text" in page
assert "Dashboard" in page and "lede text" not in page


def test_pills_tone_the_exception_and_leave_the_default_neutral():
Expand Down Expand Up @@ -425,7 +425,7 @@ def test_orchestration_panel_keeps_work_links_in_visible_and_portable_context():
'example', 'Review <work>', 'A & B', '/board check',
work_links=[{'label': 'Open work repo', 'href': 'https://github.com/Example/Work'},
{'label': 'Community hub', 'href': 'https://github.com/orgs/Example/discussions'}])
assert 'Review &lt;work&gt;' in page and 'A &amp; B' in page
assert 'Review &lt;work&gt;' in page and 'A &amp; B' not in page
assert '<a href="https://github.com/Example/Work">Open work repo</a>' in page
preview = unescape(re.search(r'data-orchestration-prompt[^>]*>(.*?)</textarea>', page, re.S)[1])
assert preview == ('Use the board skill. check\n\nWork on GitHub:\n'
Expand Down
10 changes: 4 additions & 6 deletions tests/test_intake_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,14 +579,14 @@ def test_a_partly_shipped_status_is_not_drift(tmp_path):
# --------------------------------------------------------------------------- #
# freshness: the page says how current it is, and hands over its own refresh
# --------------------------------------------------------------------------- #
def test_the_page_states_when_it_was_generated_and_why_that_can_lie(tmp_path):
def test_the_page_states_when_it_was_generated_without_usage_prose(tmp_path):
mind = _mind(tmp_path, drafts={"bug/widgets/x.md": _prompt("A task")})
c = _intake.census(mind)
page = _intake.render_dashboard(c)
banner = page.split("| Where | Count |")[0]
assert f"Last updated {c['generated']}" in banner
# the distinction that matters: a self-healing render is not a fresh backlog
assert "dashboard_refresh.yml" in banner and "stale prompt" in banner
assert "This page is generated" not in banner
assert "Every task the Mind is holding" not in banner


def test_the_refresh_banner_is_a_copyable_instruction_not_a_bare_command(tmp_path):
Expand All @@ -606,9 +606,7 @@ def test_the_html_twin_carries_the_banner_with_a_real_copy_button(tmp_path):
fresh = html.split('<div class="fresh">')[1].split("</div>")[0]
assert f"Last updated {c['generated']}" in fresh
assert 'button class="copy"' in fresh and "data-cmd=" in fresh
# backticks are markdown; the blurb must render them as code spans, while
# the copy payload keeps its own verbatim (see _prose)
assert "<code>draft/</code>" in _prose(fresh) and "`draft/`" not in _prose(fresh)
assert "This page is" not in _prose(fresh)
assert "`git pull --ff-only`" in fresh, "the payload is copied, not rendered"
assert ".fresh{" in html, "the banner ships its own rule, not the shared theme"

Expand Down
Loading