From 5686e16121975d0bd42aa0b7f6deb39e11b1903d Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 7 Oct 2026 19:36:01 +0100 Subject: [PATCH] fix: simplify Mind dashboard text and section order --- agents/conductors/intake/_intake.py | 284 +++++++++++----------------- tests/test_intake_dashboard.py | 96 +++++----- 2 files changed, 149 insertions(+), 231 deletions(-) diff --git a/agents/conductors/intake/_intake.py b/agents/conductors/intake/_intake.py index e3a54f41..ee92cc5c 100755 --- a/agents/conductors/intake/_intake.py +++ b/agents/conductors/intake/_intake.py @@ -1180,7 +1180,7 @@ def _clip(text: str, limit: int = 130) -> str: # work in hand. `complete/index.md` is where shipped work is read. # How deep the feed goes, and how much of it is on screen at once. The table # is a glance, not a log: ten rows answer "what has been happening?" without -# pushing the Epics below a scroll, and the rest is one tap away — so a quiet +# a long scroll, and the rest is one tap away — so a quiet # week still shows a fortnight of context and a busy one does not bury it. RECENT_MAX = 50 RECENT_PAGE = 10 @@ -1636,14 +1636,6 @@ def _pick_key(r: dict) -> tuple: # than a the start-dev skill, and it ends by naming both exits — sign off (retire the # prompt) or don't (file the follow-up) — because a review that stops at # "looks fine" leaves the row on the board forever. -HUMAN_REVIEW_BLURB = ( - "Shipped work waiting on **you** — tasks a human asked to check before " - "calling them done. Nothing lands here on its own: a task only gets a " - "review row when someone files one (`/intake` with `Type: human review`), " - "so an empty section means nothing has been flagged, not that nothing " - "shipped." -) - HUMAN_REVIEW_PAYLOAD = """\ Walk me through the completed work described in `{path}` so I can sign it off. @@ -1808,18 +1800,6 @@ def _epic_members(c: dict) -> dict: return groups -RECENT_BLURB = ( - "The {n} newest things to happen to the work in hand, newest first — " - "issued, filed, flagged for review. Every other section on this page is laid out by " - "state, which is exactly why none of them can answer \u201cwhat has been " - "happening?\u201d. Shipped work is not here: it is read from " - "`complete/index.md`, and a thousand records deep it would crowd out " - "everything anyone can still act on.") - -RECENT_PAGING_NOTE = ( - " Showing the newest {page}; \u2026 opens the next {page}.") - - def _dated(row: dict) -> str: """`— issued 2026-08-19`, the facet every live task row now carries. @@ -1833,14 +1813,6 @@ def _dated(row: dict) -> str: return f" — {event} {row['date']}" -def _recent_blurb(rows: list) -> str: - """The section's prose — the paging sentence only when there IS paging.""" - text = RECENT_BLURB.format(n=len(rows)) - if len(rows) > RECENT_PAGE: - text += RECENT_PAGING_NOTE.format(page=RECENT_PAGE) - return text - - RECENT_TABLE_HEAD = ["| Date | Event | Task |", "|------|-------|------|"] @@ -1915,14 +1887,14 @@ def _dashboard_navigation(c: dict) -> list: return [ {"label": "Start here", "href": "#start-here", "count": len({r["path"] for r in high + quick})}, + {"label": "Epics", "href": "#epics", "count": len(epics)}, {"label": "In flight", "href": "#in-flight", "count": c["issued_count"]}, {"label": "Planned", "href": "#planned", "count": len(c["planned"])}, {"label": "Backlog", "href": "#backlog", "count": c["total"] + len(c.get("human_review") or [])}, + {"label": "Recent", "href": "#recent", "count": len(c.get("recent") or [])}, {"label": "Pending release", "href": "#pending-release", "count": len(c.get("pending_release") or [])}, - {"label": "Recent", "href": "#recent", "count": len(c.get("recent") or [])}, - {"label": "Epics", "href": "#epics", "count": len(epics)}, ] @@ -1953,9 +1925,6 @@ def render_dashboard(c: dict) -> str: L += [ f"> **Last updated {c['generated']}.**", "", - _task_row("Refresh this page — reconcile finished prompts, " - "then regenerate", REFRESH_PAYLOAD), - "", "| Where | Count |", "|-------|------:|", ] @@ -1968,11 +1937,12 @@ def render_dashboard(c: dict) -> str: "prompt never advanced, so it still renders as backlog:", ""] L += [f"> - `{d}`" for d in c["drift"]] L += [""] - L += [_status_box_md(c["batch"]), ""] + if c["batch"] is not None: + L += [_status_box_md(c["batch"]), ""] L += ["## Start here", ""] # Epic members never appear in the pick lists or the work-type sections — - # they are worked in order through their epic (bottom of the page). + # they are worked in order through their epic below Start here. members = _epic_members(c) standalone = [r for r in records if not r.get("epic")] high = [r for r in standalone if r["priority"] == "high"] @@ -1988,9 +1958,42 @@ def render_dashboard(c: dict) -> str: L += _items([_bullet(r) for r in shown]) or ["- _(none right now)_"] L += [""] - L += ["## In flight", "", - "Issued — each has an open GitHub issue and usually a branch. The " - "full record for each is in [`active.md`](active.md).", ""] + known = {e["slug"] for e in c.get("epics") or []} + stray = [s for s in members if s not in known] + L += ["## Epics", ""] + if not c.get("epics") and not stray: + L += ["_(no epics)_", ""] + if c.get("epics") or stray: + L += [ + "Long-running multi-phase programmes. Each epic's 📋 prompt has " + "the assistant read its ledger, work out where it stands, and continue " + f"from the next logical point. {EPIC_ORDER_CAUTION} " + "Full record in [`epics.md`](epics.md).", ""] + for e in c.get("epics") or []: + rows = members.get(e["slug"], []) + head = f"{_summary_label(e.get('title') or e['slug'])}" + if e.get("ledger"): + head += f" — ledger: `{e['ledger']}`" + if e.get("status"): + head += f" — {_summary_label(_clip(e['status']))}" + resume = _task_row(head, _epic_prompt(e)) + if not rows: + L += _items([resume]) + [""] + continue + L += ["
", + f"{_summary_label(e.get('title') or e['slug'])}" + f" — {len(rows)} queued prompt(s), in order", ""] + L += _items([resume] + [_bullet(r) for r in rows]) + L += ["", "
", ""] + for slug in stray: + rows = members[slug] + L += ["
", + f"{_summary_label(slug)} — {len(rows)} " + "queued prompt(s) — ⚠️ not in `epics.md`", ""] + L += _items([_bullet(r) for r in rows]) + L += ["", "
", ""] + + L += ["## In flight", ""] flight = [] for r in c["in_flight"]: head = f"{_summary_label(r['title'])}" @@ -2004,8 +2007,6 @@ def render_dashboard(c: dict) -> str: L += _items(flight) or ["- _(nothing in flight)_"] L += [""] - L += _pending_release_section(c.get("pending_release") or []) - for key, heading, verb, blurb in ( ("planned", "Planned", "start", "Scoped but not started; some are not yet prompt " @@ -2026,19 +2027,10 @@ def render_dashboard(c: dict) -> str: L += _items(items) or ["- _(none)_"] L += ["", "", ""] - n_members = sum(len(v) for v in members.values()) - member_note = (f" **{n_members}** of them belong to an epic and are " - "listed only under [Epics](#epics) below." - if n_members else "") - L += [f"## Backlog", "", - f"**{c['total']}** unstarted prompts and " - f"**{len(c.get('human_review') or [])}** awaiting human review. " - "Unstarted prompts are sorted " - f"most-pickable first (priority, then size).{member_note}", ""] + L += ["## Backlog", ""] reviews = c.get("human_review") or [] L += ['', "
", - f"Human review — {len(reviews)}", "", - HUMAN_REVIEW_BLURB, ""] + f"Human review — {len(reviews)}", ""] L += _items([_task_row(_review_head(r), _review_payload(r)) for r in reviews]) or ["- _(nothing awaiting review)_"] L += ["", "
", ""] @@ -2059,49 +2051,10 @@ def render_dashboard(c: dict) -> str: if not recent: L += ["_(no recent activity)_", ""] if recent: - L += [_recent_blurb(recent), ""] L += _recent_pages(recent) L += ["", "_Dates come from each task's registry entry — " "`lifecycle.py dates` reports anything undated._", ""] - # Epics live at the bottom, whole: each epic's resume prompt sits with its - # queued member prompts, grouped and phase-ordered, so nobody picks a - # member standalone out of order from a work-type section above. - known = {e["slug"] for e in c.get("epics") or []} - stray = [s for s in members if s not in known] - L += ["## Epics", ""] - if not c.get("epics") and not stray: - L += ["_(no epics)_", ""] - if c.get("epics") or stray: - L += [ - "Long-running multi-phase programmes. Each epic's 📋 prompt has " - "the assistant read its ledger, work out where it stands, and continue " - f"from the next logical point. {EPIC_ORDER_CAUTION} " - "Full record in [`epics.md`](epics.md).", ""] - for e in c.get("epics") or []: - rows = members.get(e["slug"], []) - head = f"{_summary_label(e.get('title') or e['slug'])}" - if e.get("ledger"): - head += f" — ledger: `{e['ledger']}`" - if e.get("status"): - head += f" — {_summary_label(_clip(e['status']))}" - resume = _task_row(head, _epic_prompt(e)) - if not rows: - L += _items([resume]) + [""] - continue - L += ["
", - f"{_summary_label(e.get('title') or e['slug'])}" - f" — {len(rows)} queued prompt(s), in order", ""] - L += _items([resume] + [_bullet(r) for r in rows]) - L += ["", "
", ""] - for slug in stray: - rows = members[slug] - L += ["
", - f"{_summary_label(slug)} — {len(rows)} " - "queued prompt(s) — ⚠️ not in `epics.md`", ""] - L += _items([_bullet(r) for r in rows]) - L += ["", "
", ""] - # Hygiene is the page's only audit section: what a human should tidy, not # what to pick. Each flag class is its own count line + `
` list. blocks = [] @@ -2141,6 +2094,8 @@ def render_dashboard(c: dict) -> str: for i, block in enumerate(blocks): L += ([""] if i else []) + block + L += [""] + _pending_release_section(c.get("pending_release") or []) + boards = _board_links(c.get("home", "")) if boards: L += ["", "Boards: " + " · ".join(f"[{n}]({u})" for n, u in boards)] @@ -2179,14 +2134,6 @@ def render_dashboard(c: dict) -> str: # (see `_summary_label`) — and it is deliberately a suffix on the task line # rather than a real table column: the page is read on a phone, where a # five-column table wraps into unreadability. -PENDING_RELEASE_BLURB = ( - "Library PRs the ledger records as merged but not yet released, and the " - "in-flight tasks waiting on each. Rendered from the ledger — `active.md` " - "and the `complete/` records — never a live GitHub query; the Brain " - "board's `pending-release` search is the fresh view, this is what the Mind " - "believes.") - - def _pr_column(r: dict) -> str: """The `— PRs: Repo#N, Repo#N` suffix, plus the ledger's own badges.""" out = "" @@ -2205,7 +2152,7 @@ def _pr_column(r: dict) -> str: def _pending_release_section(groups: list) -> list: """Pending repositories, with a stable destination even when empty.""" - L = ["## Pending release", "", PENDING_RELEASE_BLURB, ""] + L = ["## Pending release", ""] if not groups: L += ["_(nothing pending release)_", ""] for g in groups: @@ -2329,20 +2276,13 @@ def record_row(r): work_links=[{"label": "Open Mind repository", "href": home}] if home else [], organ="mind", refreshed_at=c.get("refreshed_at"), refresh_url=home + "/actions/workflows/dashboard_refresh.yml" if home else None)) - H += ['
', - _html_task("Refresh this page — reconcile finished prompts, " - "then regenerate", REFRESH_PAYLOAD), - "
"] - if home: - H.append(f'

' - f'{link("dashboard.md", "markdown version")} · ' - f'{link("README.md", "GitHub Page")}

') if c.get("drift"): H += ['

⚠️ Needs lifecycle reconciliation — draft prompts ' "whose body records a fix PR (done, never advanced):

", ""] - H.append(_status_box_html(c["batch"])) + if c["batch"] is not None: + H.append(_status_box_html(c["batch"])) H += ['

Start here

'] members = _epic_members(c) @@ -2371,9 +2311,45 @@ def h2(title, src): prefix = f'' if anchor else "" return prefix + f"

{title}{a}

" - H += [h2("In flight", "active.md"), - '

Issued — each has an open GitHub issue and ' - "usually a branch.

"] + known = {e["slug"] for e in c.get("epics") or []} + stray = [s for s in members if s not in known] + H += [h2("Epics", "epics.md")] + if not c.get("epics") and not stray: + H.append('

(no epics)

') + if c.get("epics") or stray: + H += [ + '

Long-running multi-phase programmes — 📋 ' + "copies a prompt that works out where the epic stands from its " + f"ledger and continues it from the next logical point. " + f"{EPIC_ORDER_CAUTION}

"] + for e in c.get("epics") or []: + rows = members.get(e["slug"], []) + text = f"{_summary_label(e.get('title') or e['slug'])}" + if e.get("ledger"): + text += (f' — ledger: ' + f"{_attr(e['ledger'])}") + if e.get("status"): + text += (f' — ' + f'{_summary_label(_clip(e["status"]))}') + resume = _html_task(text, _epic_prompt(e)) + if not rows: + H.append(resume) + continue + H += ["
", + f"{_summary_label(e.get('title') or e['slug'])} — " + f"{len(rows)} queued prompt(s), in order", + resume] + H += [record_row(r) for r in rows] + H += ["
"] + for slug in stray: + rows = members[slug] + H += ["
", + f"{_summary_label(slug)} — {len(rows)} queued " + "prompt(s) — ⚠️ not in epics.md"] + H += [record_row(r) for r in rows] + H += ["
"] + + H += [h2("In flight", "active.md")] for r in c["in_flight"]: text = link(r["path"], _summary_label(r["title"])) if r["issue_no"]: @@ -2388,23 +2364,6 @@ def h2(title, src): if not c["in_flight"]: H.append('

(nothing in flight)

') - groups = c.get("pending_release") or [] - H += ['' + h2("Pending release", "active.md"), - f'

{_md_inline(PENDING_RELEASE_BLURB)}

'] - if not groups: - H.append('

(nothing pending release)

') - if groups: - for g in groups: - H.append(f"

{_summary_label(g['lib'])}

") - items = [f'
  • {pr["label"]} ' - f'{_summary_label(pr["source"])}
  • ' - for pr in g["prs"]] - items += [f'
  • ⏸ waiting: {link(row["path"], _summary_label(row["title"]))}' - "
  • " for row in g["gated"]] - H.append("") - for key, heading, verb in (("planned", "Planned", "start"),): rows = c[key] H += [h2(heading, f"{key}.md"), "
    ", @@ -2424,17 +2383,10 @@ def h2(title, src): H.append('

    (none)

    ') H.append("
    ") - n_members = sum(len(v) for v in members.values()) - member_note = (f" {n_members} of them belong to an epic and are listed " - "only under Epics below." if n_members else "") - H += [h2("Backlog", "draft").replace("/blob/main/draft", "/tree/main/draft"), - f'

    {c["total"]} unstarted prompts and ' - f'{len(c.get("human_review") or [])} awaiting human review. ' - f"Unstarted prompts are sorted most-pickable first (priority, then size).{member_note}

    "] + H += [h2("Backlog", "draft").replace("/blob/main/draft", "/tree/main/draft")] reviews = c.get("human_review") or [] H += ['
    ', - f'Human review — {len(reviews)}', - f'

    {_md_inline(HUMAN_REVIEW_BLURB)}

    '] + f'Human review — {len(reviews)}'] for r in reviews: text = link(r["path"], _summary_label(r["title"])) text += pills(*(_summary_label(x) for x in @@ -2461,9 +2413,7 @@ def h2(title, src): if not recent: H.append('

    (no recent activity)

    ') if recent: - # Render authored inline markup instead of literal backticks. - H += [f'

    {_summary_label(_recent_blurb(recent))}

    ', - ''] + H += ['
    '] for i, r in enumerate(recent): # Every row ships in the DOM; the ones past the first page start # hidden, so revealing them is a flag flip rather than a re-render @@ -2483,43 +2433,21 @@ def h2(title, src): H += [f''] - known = {e["slug"] for e in c.get("epics") or []} - stray = [s for s in members if s not in known] - H += [h2("Epics", "epics.md")] - if not c.get("epics") and not stray: - H.append('

    (no epics)

    ') - if c.get("epics") or stray: - H += [ - '

    Long-running multi-phase programmes — 📋 ' - "copies a prompt that works out where the epic stands from its " - f"ledger and continues it from the next logical point. " - f"{EPIC_ORDER_CAUTION}

    "] - for e in c.get("epics") or []: - rows = members.get(e["slug"], []) - text = f"{_summary_label(e.get('title') or e['slug'])}" - if e.get("ledger"): - text += (f' — ledger: ' - f"{_attr(e['ledger'])}") - if e.get("status"): - text += (f' — ' - f'{_summary_label(_clip(e["status"]))}') - resume = _html_task(text, _epic_prompt(e)) - if not rows: - H.append(resume) - continue - H += ["
    ", - f"{_summary_label(e.get('title') or e['slug'])} — " - f"{len(rows)} queued prompt(s), in order", - resume] - H += [record_row(r) for r in rows] - H += ["
    "] - for slug in stray: - rows = members[slug] - H += ["
    ", - f"{_summary_label(slug)} — {len(rows)} queued " - "prompt(s) — ⚠️ not in epics.md"] - H += [record_row(r) for r in rows] - H += ["
    "] + groups = c.get("pending_release") or [] + H += ['' + h2("Pending release", "active.md")] + if not groups: + H.append('

    (nothing pending release)

    ') + if groups: + for g in groups: + H.append(f"

    {_summary_label(g['lib'])}

    ") + items = [f'
  • {pr["label"]} ' + f'{_summary_label(pr["source"])}
  • ' + for pr in g["prs"]] + items += [f'
  • ⏸ waiting: {link(row["path"], _summary_label(row["title"]))}' + "
  • " for row in g["gated"]] + H.append("
      " + "".join( + items or ["
    • (no PR recorded — the gate names this library " + "only)
    • "]) + "
    ") footer = boards_footer(dict(_board_links(home)), THEME_ORGAN) if footer: diff --git a/tests/test_intake_dashboard.py b/tests/test_intake_dashboard.py index 0672ec4c..bef6e843 100644 --- a/tests/test_intake_dashboard.py +++ b/tests/test_intake_dashboard.py @@ -188,7 +188,7 @@ def test_in_flight_links_the_registry_issue_and_its_live_status(tmp_path): mind = _mind(tmp_path, active={"widget_rework.md": _prompt("Widget rework")}, registries={"active.md": ACTIVE_MD}) - flight = _page(mind).split("## In flight")[1].split("## Pending release")[0] + flight = _page(mind).split("## In flight")[1].split("## Planned")[0] assert ('' "issue #42") in flight, \ "the link must be the matched URL, not the field's trailing prose" @@ -216,7 +216,7 @@ def test_parked_prompt_still_in_active_is_not_listed_in_flight(tmp_path): }, ) page = _page(mind) - flight = page.split("## In flight")[1].split("## Pending release")[0] + flight = page.split("## In flight")[1].split("## Planned")[0] assert "gadget_polish.md" in flight assert "widget_rework.md" not in flight, \ "a parked prompt must not double-list as in flight" @@ -231,7 +231,7 @@ def test_in_flight_prompt_with_no_registry_row_claims_no_issue(tmp_path): body = _prompt("Orphan task") + \ "\nFollow-up to https://github.com/ExampleOrg/Widgets/issues/7 (unrelated).\n" mind = _mind(tmp_path, active={"orphan.md": body}) - flight = _page(mind).split("## In flight")[1].split("## Pending release")[0] + flight = _page(mind).split("## In flight")[1].split("## Planned")[0] assert "Orphan task" in flight assert "issues/7" not in flight @@ -273,7 +273,7 @@ def test_task_row_is_one_line_with_no_repeated_label(tmp_path): def test_in_flight_copy_block_targets_the_active_prompt(tmp_path): mind = _mind(tmp_path, active={"widget_rework.md": _prompt("Widget rework")}) - flight = _page(mind).split("## In flight")[1].split("## Pending release")[0] + flight = _page(mind).split("## In flight")[1].split("## Planned")[0] assert "\nUse the start-dev skill. active/widget_rework.md\n" in flight @@ -312,7 +312,8 @@ def test_copy_details_never_swallow_the_next_row(tmp_path): def _html(mind: Path) -> str: from copy_contract import assert_portable_copy_payloads page = _intake.render_dashboard_html(_intake.census(mind)) - assert_portable_copy_payloads(page) + if 'data-cmd="' in page: + assert_portable_copy_payloads(page) return page @@ -454,12 +455,11 @@ def test_check_on_a_missing_dashboard_is_drift(tmp_path): """ -def test_epics_section_sits_at_the_bottom_with_a_resume_prompt(tmp_path): - """Epics group at the bottom — after the Backlog, so members and their - programme read as one unit rather than scattering through the page.""" +def test_epics_section_follows_start_here_with_a_resume_prompt(tmp_path): + """Epics follow Start here, with their members and resume prompt together.""" mind = _mind(tmp_path, registries={"epics.md": _EPICS}) page = _page(mind) - assert page.index("## Backlog") < page.index("## Epics") + assert page.index("## Start here") < page.index("## Epics") < page.index("## In flight") epics = page.split("## Epics")[1] assert "JAX inference programme" in epics assert "PROGRAMME.md" in epics @@ -488,7 +488,8 @@ def test_epic_members_leave_the_pick_lists_and_work_type_sections(tmp_path): }) page = _page(mind) epics_at = page.index("## Epics") - body, epics = page[:epics_at], page[epics_at:] + flight_at = page.index("## In flight") + body, epics = page[:epics_at] + page[flight_at:], page[epics_at:flight_at] assert "Phase one" not in body and "Phase two" not in body assert "Standalone thing" in body # Grouped under the epic, phase order, with the resume prompt first and @@ -497,8 +498,7 @@ def test_epic_members_leave_the_pick_lists_and_work_type_sections(tmp_path): < epics.index("Phase one") < epics.index("Phase two") assert "2 queued prompt(s), in order" in epics assert "in order through the epic" in epics - # The Backlog header points at where the members went. - assert "belong to an epic" in body + assert "belong to an epic" not in body def test_phaseless_members_sort_after_phased_by_filename(tmp_path): @@ -588,29 +588,22 @@ def test_the_page_states_when_it_was_generated_without_usage_prose(tmp_path): 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): +def test_redundant_refresh_prompt_is_removed(tmp_path): mind = _mind(tmp_path, drafts={"bug/widgets/x.md": _prompt("A task")}) banner = _page(mind).split("| Where | Count |")[0] - assert "📋" in banner, "the banner uses the same one-tap idiom as a task row" - for step in ("lifecycle.py record", "git pull --ff-only", - "pyauto-brain intake --apply dashboard"): - assert step in banner, step - assert "never hand-edit" in banner.lower() + assert "Refresh this page" not in banner + assert "lifecycle.py record" not in banner -def test_the_html_twin_carries_the_banner_with_a_real_copy_button(tmp_path): +def test_html_retains_update_button_without_redundant_refresh_prompt(tmp_path): mind = _mind(tmp_path, drafts={"bug/widgets/x.md": _prompt("A task")}) c = _intake.census(mind) c['home'] = 'https://github.com/Example/Mind' html = _intake.render_dashboard_html(c) - fresh = html.split('
    ')[1].split("
    ")[0] - assert 'Last updated' not in fresh assert f'data-refreshed-at="{c["refreshed_at"]}"' in html assert '/actions/workflows/dashboard_refresh.yml' in html - assert 'button class="copy"' in fresh and "data-cmd=" in 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" + assert 'Refresh this page' not in html + assert '
    ' not in html def test_no_epics_file_renders_an_empty_destination(tmp_path): @@ -625,8 +618,8 @@ def test_html_sections_link_their_markdown_source(tmp_path): for src in ("active.md", "epics.md", "planned.md"): assert f'/blob/main/{src}" title="Markdown version" aria-label="Markdown version">GitHub Page' in html + # Redundant header links are removed; section source icons remain. + assert '/blob/main/README.md">GitHub Page' not in html # --------------------------------------------------------------------------- # @@ -696,11 +689,11 @@ def test_recent_is_newest_first(tmp_path): (r["date"] for r in rows), reverse=True) -def test_recent_sits_after_the_backlog_and_before_the_epics(tmp_path): +def test_recent_sits_after_backlog_and_before_pending_release(tmp_path): mind = _recent_mind(tmp_path) (mind / "epics.md").write_text(_EPICS, encoding="utf-8") page = _page(mind) - assert page.index("## Backlog") < page.index("## Recent") < page.index("## Epics") + assert page.index("## Backlog") < page.index("## Recent") < page.index("## Pending release") def test_an_undated_task_is_absent_rather_than_sorted_to_the_bottom(tmp_path): @@ -753,8 +746,7 @@ def test_a_date_in_another_fields_prose_does_not_count_as_a_date(tmp_path): def test_the_html_twin_carries_the_same_feed_with_real_copy_buttons(tmp_path): html = _intake.render_dashboard_html(_intake.census(_recent_mind(tmp_path))) assert "

    Recent" in html - assert html.index("Backlog") < html.index("

    Recent") < html.index("

    Epics") \ - if "

    Epics" in html else True + assert html.index("

    Backlog") < html.index("

    Recent") < html.index("

    Pending release") assert '

    ' in html assert 'data-cmd="Use the start-dev skill. active/sprocket_calibration.md"' in html @@ -764,7 +756,7 @@ def test_a_live_row_wears_its_date_where_the_task_is(tmp_path): than against one issued in May, so the date rides on the row too — not only down in the Recent feed.""" page = _page(_recent_mind(tmp_path)) - flight = page.split("## In flight")[1].split("## Pending release")[0] + flight = page.split("## In flight")[1].split("## Planned")[0] assert "issued 2026-08-19" in flight assert "flywheel-balance" not in page assert "filed 2026-07-01" in page.split("## Planned")[1].split("## Backlog")[0] @@ -849,11 +841,10 @@ def _prose(html: str) -> str: return re.sub(r'data-cmd="[^"]*"', "data-cmd=\"\"", html) -def test_the_html_blurb_renders_its_code_spans(tmp_path): - """The blurb is shared with the markdown page; its backticks would - otherwise print literally here.""" +def test_recent_explanatory_blurb_is_removed(tmp_path): html = _prose(_intake.render_dashboard_html(_intake.census(_many(tmp_path, 80)))) - assert "complete/index.md" in html + assert "complete/index.md" not in html + assert "newest things to happen" not in html assert "`complete/index.md`" not in html @@ -1070,7 +1061,7 @@ def test_human_review_section_renders_empty_rather_than_vanishing(tmp_path): page = _page(_mind(tmp_path, drafts={"feature/widgets/a.md": _prompt("A")})) section = page.split('')[1].split("feature")[0] assert "_(nothing awaiting review)_" in section - assert "nothing has been flagged, not that nothing shipped" in section + assert "nothing has been flagged, not that nothing shipped" not in section def test_human_review_body_may_name_its_shipped_pr_without_reading_as_drift( @@ -1100,8 +1091,7 @@ def test_human_review_renders_on_the_html_twin(tmp_path): section = html.split('
    ')[1].split("
    ")[0] assert "Check the widget rollout" in section assert "so I can sign it off" in section - # The blurb's markdown must not print literally on a page that renders HTML. - assert "**you**" not in html and "you" in html + assert "Shipped work waiting on" not in section # --------------------------------------------------------------------------- # @@ -1151,8 +1141,8 @@ def test_button_appears_once_collected_is_stamped(tmp_path): def test_a_reviewed_batch_disappears_from_the_box(tmp_path): mind = _mind(tmp_path, batches={"2026-09-02-pm.md": DEV_RECORD_REVIEWED}) - assert "No batch in flight." in _page(mind) - assert "No batch in flight." in _html(mind) + assert "No batch in flight." not in _page(mind) + assert "No batch in flight." not in _html(mind) def test_a_review_file_on_disk_closes_the_slot_without_a_reviewed_at_key(tmp_path): @@ -1162,13 +1152,13 @@ def test_a_review_file_on_disk_closes_the_slot_without_a_reviewed_at_key(tmp_pat "2026-09-03-pm.md": DEV_RECORD_COLLECTED, "reviews/2026-09-03-pm.md": "# Batch review 2026-09-03-pm\n", }) - assert "No batch in flight." in _page(mind) + assert "No batch in flight." not in _page(mind) -def test_empty_mind_renders_the_fixture(tmp_path): +def test_empty_mind_omits_batch_placeholder(tmp_path): mind = _mind(tmp_path) - assert "No batch in flight." in _page(mind) - assert "No batch in flight." in _html(mind) + assert "No batch in flight." not in _page(mind) + assert "No batch in flight." not in _html(mind) def test_batch_box_md_and_html_agree_on_slugs_and_the_review_url(tmp_path): @@ -1205,7 +1195,7 @@ def test_in_flight_rows_link_every_pr_key_labelled_by_repo(tmp_path): mind = _mind(tmp_path, active={"widget_rework.md": _prompt("Widget rework")}, registries={"active.md": PR_LEDGER_ACTIVE}) - flight = _page(mind).split("## In flight")[1].split("## Pending release")[0] + flight = _page(mind).split("## In flight")[1].split("## Planned")[0] for label, url in (("Widgets#7", "https://github.com/ExampleOrg/Widgets/pull/7"), ("Gadgets#8", "https://github.com/ExampleOrg/Gadgets/pull/8"), ("widgets_workspace#9", @@ -1225,7 +1215,7 @@ def test_the_older_single_line_comma_form_of_a_pr_key_still_links(tmp_path): "- status: shipped\n" "- library-pr: https://github.com/ExampleOrg/Widgets/pull/7, " "https://github.com/ExampleOrg/Gadgets/pull/8\n")}) - flight = _page(mind).split("## In flight")[1].split("## Pending release")[0] + flight = _page(mind).split("## In flight")[1].split("## Planned")[0] assert "Widgets#7" in flight and "Gadgets#8" in flight @@ -1250,7 +1240,7 @@ def test_a_pending_release_badge_is_read_from_the_ledger_not_github(tmp_path): active={"widget_rework.md": _prompt("Widget rework"), "gadget_polish.md": _prompt("Gadget polish")}, registries={"active.md": PENDING_ACTIVE}) - flight = _page(mind).split("## In flight")[1].split("## Pending release")[0] + flight = _page(mind).split("## In flight")[1].split("## Planned")[0] assert "⏳ pending release: Widgets" in flight assert "⏸ waiting on Widgets's release" in flight @@ -1274,7 +1264,7 @@ def test_pending_release_groups_the_prs_and_the_tasks_waiting_on_them(tmp_path): assert "Decoys" not in section, \ "the appended Original prompt is not the record's own fields" assert "⏸ waiting: [Gadget polish]" in section - assert "never a live GitHub query" in section + assert "never a live GitHub query" not in section def test_an_empty_pending_release_section_keeps_its_destination(tmp_path): @@ -1409,10 +1399,10 @@ def test_seven_navigation_counts_and_nested_review(tmp_path): nav = re.search(r'