Skip to content

fix(dashboard): remove duplicative Open PRs card & make memory-consolidation display live (#26)#2702

Merged
rysweet merged 3 commits into
mainfrom
feat/issue-26-two-dashboard-component-fixes-1-remove-the-duplica
Jul 6, 2026
Merged

fix(dashboard): remove duplicative Open PRs card & make memory-consolidation display live (#26)#2702
rysweet merged 3 commits into
mainfrom
feat/issue-26-two-dashboard-component-fixes-1-remove-the-duplica

Conversation

@rysweet

@rysweet rysweet commented Jul 6, 2026

Copy link
Copy Markdown
Owner

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:

  • Markup (index_html/part_00.rs) — the #open-prs-list card <div>.
  • Client renderer (index_html/part_01.rs) — the block reading d.open_prs.
  • Data producer (activity.rs) — the gh pr list --author @me half of the tokio::join! and the /api/activityopen_prs key (one fewer gh subprocess 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-readiness payload (its own independent open_prs array) 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 (~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 via .to_string()):

  • last_consolidation is now the newest live action timestamp (not a file mtime).
  • New recent_consolidation_activity {count, last} on /api/memory 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).

Tests (hermetic)

  • activity() no longer emits open_prs; the Open PRs card/markup/renderer are gone; Merge Readiness card + fetchMergeReadiness + its own d.open_prs (from /api/merge-readiness) retained.
  • last_consolidation and recent_consolidation_activity reflect injected live consolidate-memory cycle reports, advance when a newer report arrives, fail closed to null with no history, and never leak raw action text.
  • Live episodic count reflects the cognitive store and grows as episodes are stored.

Notes

  • Additive/surgical; no --no-verify; all pre-commit + pre-push gates green locally (fmt, clippy --release and --all-targets --all-features --locked, race-subset tests, full lib test suite: 7493 passed).
  • Off latest origin/main (branch already at tip; no rebase needed).
  • Docs updated: dashboard.md, index.md, new reference/dashboard-overview-health-and-live-memory.md.

Fixes #26

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

rysweet and others added 3 commits July 6, 2026 18:22
…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>
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

📊 Coverage Summary

Generated by cargo llvm-cov --workspace --summary-only (nightly, excluding test files)

Module Lines Covered Coverage
Total 146216 121889 83.4%

Coverage data from CI run. Test files matching tests?/ are excluded from line counts.

@rysweet rysweet merged commit f27afa0 into main Jul 6, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant