fix(dashboard): remove duplicative Open PRs card & make memory-consolidation display live (#26)#2702
Merged
rysweet merged 3 commits intoJul 6, 2026
Conversation
…olidation display live (#26) Two surgical dashboard component fixes. FIX 1 — Remove the duplicative Overview "Open PRs" card. Overview → Health carried both a plain "Open PRs" list and the richer "Merge Readiness" card. Everything Open PRs showed (number, title, URL) is a strict subset of Merge Readiness (which also reports CI rollup, base allow-list, objective merge-gate verdict, blocker, judge kind), so it was removed cleanly rather than folded: its markup (part_00.rs), its client renderer (part_01.rs), and its /api/activity -> open_prs data producer (one fewer `gh pr list` per Overview refresh) in activity.rs. Merge Readiness is now the single Overview PR surface; the separate Pull Requests -> Readiness tab (/api/prs) and the /api/merge-readiness payload (its own independent open_prs array) are untouched. FIX 2 — Make the memory-consolidation display live. The "Last Memory Compaction" statistic derived from the modification time of retired JSON snapshot files (memory_records.json / evidence_records.json) that are no longer written, so it stayed frozen while consolidation ran (~30 consolidate-memory actions / 30 min; episodic memory grew 756 -> 1088 in a day). memory_metrics() now sources consolidation freshness from the live consolidate-memory OODA action stream — the same newest-first cycle-report reader the Activity tab uses (#2697) — scanning outcomes for action_kind == "consolidate-memory" (the canonical Display form persist_cycle_report writes). last_consolidation is now the newest live action timestamp; a new recent_consolidation_activity {count,last} reports the live stream; the Memory card renders it so it visibly advances as memory grows. Fails closed to null (-> "Not tracked yet") with no legacy-file or directory-mtime fallback. Per-type counts were already live via get_statistics(). Reconciles with the Activity/Goals live-read fixes (#2697 / #2695). Hermetic tests: activity() no longer emits open_prs; the Open PRs card/markup/ renderer are gone; Merge Readiness is retained; last_consolidation and recent_consolidation_activity reflect injected live consolidate-memory reports, advance as newer reports arrive, fail closed to null with no history, and never leak raw action text. Docs updated (dashboard.md, index.md, new reference page). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…26) `mkdocs build --strict` fails when a docs page is absent from `nav`. Register the new reference/dashboard-overview-health-and-live-memory.md page in the nav's Dashboard reference group so the strict doc build passes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ained (#26) The structural Playwright spec still asserted the removed Overview "Open PRs" card was visible, failing e2e-dashboard after the card was deleted. Replace the "renders open pull requests" test with one asserting the card and its `#open-prs-list` render target are absent (toHaveCount(0)) while the retained Merge Readiness card remains visible — the single Overview PR surface. Drop the now-dead `open_prs` mock fixture from MOCK_ACTIVITY and add a `mergeReadinessCard` page-object locator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📊 Coverage Summary
Coverage data from CI run. Test files matching |
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.
Summary
Two surgical dashboard component fixes for issue #26.
Fix 1 — Remove the duplicative Overview "Open PRs" card
Overview → Health carried two overlapping PR cards: a plain Open PRs list and the richer Merge Readiness card. Everything Open PRs showed (number, title, URL) is a strict subset of Merge Readiness (which also reports CI rollup, base allow-list, objective merge-gate verdict, blocker reason, judge kind), so it carried no unique useful info and was removed cleanly rather than folded:
index_html/part_00.rs) — the#open-prs-listcard<div>.index_html/part_01.rs) — the block readingd.open_prs.activity.rs) — thegh pr list --author @mehalf of thetokio::join!and the/api/activity→open_prskey (one fewerghsubprocess per Overview refresh).Merge Readiness is now the single Overview PR surface. The separate Pull Requests → Readiness tab (
/api/prs,pr_readiness.rs) and the/api/merge-readinesspayload (its own independentopen_prsarray) are untouched. The TUI standalone "Open PRs: N" count stat is intentionally left in place (not a duplicative card).Fix 2 — Make the memory-consolidation display live
The Last Memory Compaction statistic derived from the mtime of retired JSON snapshot files (
memory_records.json/evidence_records.json) that are no longer written, so it stayed frozen while consolidation ran (~30consolidate-memoryactions / 30 min; episodic memory grew 756 → 1088 in a day).memory_metrics()now sources consolidation freshness from the liveconsolidate-memoryOODA action stream — the same newest-first cycle-report reader the Activity tab uses (#2697) — scanning outcomes foraction_kind == "consolidate-memory"(the canonicalDisplayformpersist_cycle_reportwrites via.to_string()):last_consolidationis now the newest live action timestamp (not a file mtime).recent_consolidation_activity {count, last}on/api/memoryreports the live stream; the Memory card renders it so it visibly advances as memory grows.null(→ "Not tracked yet") with no legacy-file or directory-mtime fallback.get_statistics().Reconciles with the Activity/Goals live-read fixes (#2697 / #2695).
Tests (hermetic)
activity()no longer emitsopen_prs; the Open PRs card/markup/renderer are gone; Merge Readiness card +fetchMergeReadiness+ its ownd.open_prs(from/api/merge-readiness) retained.last_consolidationandrecent_consolidation_activityreflect injected liveconsolidate-memorycycle reports, advance when a newer report arrives, fail closed to null with no history, and never leak raw action text.Notes
--no-verify; all pre-commit + pre-push gates green locally (fmt, clippy--releaseand--all-targets --all-features --locked, race-subset tests, full lib test suite: 7493 passed).origin/main(branch already at tip; no rebase needed).dashboard.md,index.md, newreference/dashboard-overview-health-and-live-memory.md.Fixes #26
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com