dashboard: say how fresh it is, and hand over its own refresh - #265
Merged
Conversation
The Mind dashboard's failure mode is asymmetric. `dashboard_refresh.yml` self-heals a stale *render* on every push to main, but nothing self-heals a stale *prompt*: a task that ships without its prompt advancing to `complete/` keeps rendering as pickable backlog, and a human finds out by starting work that is already done. Two changes, both aimed at that. **A freshness banner** on both twins, above the counts: the generation date, one paragraph on why a fresh render is not a fresh backlog, and — in the same one-tap 📋 idiom as every task row — the whole reconcile-then-regenerate chore as a single copyable instruction (pull, run the lifecycle checks, decide which prompts are already done and why, write each record and retire its prompt, regenerate, push). The markdown page gets a `<details>` row; the HTML twin gets a real copy button and its own `.fresh` rule, since no other organ board carries one. **A widened drift detector.** `_FIX_PR_RE` caught only the `Fix: ... PR #n` idiom. The commoner signal is the prompt's own `Status:` header — the shipping session writes `shipped` / `superseded` / `absorbed` into it and leaves the file in `draft/`. `_done_status()` reads that off the parsed header and only when the status *opens* on a done-word, so a tracker reporting "phases 1-3 SHIPPED; phase 4 open" stays live work. Run against PyAutoMind it immediately surfaced two prompts a manual sweep had missed. Tests: shipped/superseded/absorbed statuses flag, partly-shipped ones do not, both twins carry the banner, and the HTML blurb renders its code spans while the copy payload keeps its markdown verbatim (`_prose` scopes the pre-existing assertion to rendered prose, which is what it was always about). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NcL3NFXVPW4xipE8wJfjSx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge this before the PyAutoMind twin (
PyAutoLabs/PyAutoMind#…, same branch name).dashboard_refresh.ymlrenders the Mind page with PyAutoBrain's default branch, so if the Mind side lands first its PR check reads the new banner as content drift and the self-heal onmaincommits it straight back out.Why
The Mind dashboard's failure mode is asymmetric.
dashboard_refresh.ymlself-heals a stale render on every push tomain, but nothing self-heals a stale prompt: a task that ships without its prompt advancing tocomplete/keeps rendering as pickable backlog, and a human finds out by starting work that is already done. That happened often enough to be the ask behind this change.What changed
A freshness banner on both twins, above the counts:
The markdown page gets a
<details>row; the HTML twin gets a real copy button and its own.freshrule, since no other organ board carries one.A widened drift detector.
_FIX_PR_REcaught only theFix: … PR #nidiom. The commoner signal is the prompt's ownStatus:header — the shipping session writesshipped/superseded/absorbedinto it and leaves the file indraft/._done_status()reads that off the parsed header, and only when the status opens on a done-word, so a tracker reportingphases 1-3 SHIPPED; phase 4 openstays live work. Run against PyAutoMind it immediately surfaced two spent prompts a manual sweep had missed.Validation
455 passed— the full Brain suite. New contract tests cover: shipped/superseded/absorbed statuses flag; partly-shipped ones do not; both twins carry the banner; and the HTML blurb renders its code spans while the copy payload keeps its markdown verbatim.That last one needed a scoping fix to a pre-existing test.
test_the_html_blurb_renders_its_code_spansasserted over the whole page, and a copy payload is a clipboard literal — the message a human pastes into a Claude chat — so it legitimately carries markdown the page must not render. A shared_prose()helper stripsdata-cmdattributes, which is what that assertion was always about.Generated by Claude Code