Skip to content

feat: Mind graph page, live cognitive metrics, and system analysis#335

Merged
CalebisGross merged 3 commits intomainfrom
feat/mind-graph-page
Mar 21, 2026
Merged

feat: Mind graph page, live cognitive metrics, and system analysis#335
CalebisGross merged 3 commits intomainfrom
feat/mind-graph-page

Conversation

@CalebisGross
Copy link
Copy Markdown
Collaborator

@CalebisGross CalebisGross commented Mar 21, 2026

Summary

  • Mind page: New dashboard tab with D3.js force-directed graph visualization of the memory association network. Nodes sized by salience, colored by source/tone/significance/state. Includes 2-hop neighborhood focus, client-side search with pulse animation, concept click-through, network stats (clusters, orphans, avg degree), and edge legend for all 6 relation types.
  • Live cognitive metrics: Enriched activity drawer events showing real data from consolidation cycles (transitions, patterns extracted, duration), dream cycles (replayed, strengthened, insights), encoding (concepts, associations), patterns, and abstractions. Events are clickable — navigate to relevant Explore tab.
  • System Analysis: Dynamic text brief on the Tools page that interprets all metrics and gives actionable insight into how mnemonic is performing. Honest about what's below target, explains why, tells you what to do.
  • New KPIs: Network Density (association connectivity) and Retrieval Performance (query volume + latency) added to Research Analytics.
  • Cognitive Agents panel: Shows what each agent has produced (encoding count/rate, consolidation cycles/merges, dream insights/links, abstraction principles/axioms).
  • Embedding backfill: New POST /api/v1/embeddings/backfill endpoint + UpdateEmbedding store method for re-embedding memories that failed initial embedding.
  • Backend fixes: Expanded ConsolidationCompleted event (5 new fields from CycleReport), fixed 4 missing WS subscriptions, new retrieval stats endpoint.

Also includes the Tools page research analytics redesign (KPI cards with deltas, expandable session rows).

Test plan

  • make build && make test && make check pass
  • Dashboard loads at http://127.0.0.1:9999/
  • Mind tab renders graph with real memory data
  • Tools page shows 6 KPI cards, cognitive agents panel, and system analysis brief
  • Activity drawer shows enriched events (trigger consolidation to test)
  • Clicking pattern/abstraction events navigates to Explore tabs
  • curl -X POST /api/v1/embeddings/backfill works
  • curl /api/v1/retrieval/stats returns JSON
  • All 5 themes render correctly

🤖 Generated with Claude Code

CalebisGross and others added 3 commits March 21, 2026 17:36
…ization

Adds a new "Mind" tab to the dashboard that visualizes the memory
association network using D3.js force simulation. Uses the existing
/api/v1/graph endpoint that was previously unsurfaced.

Features:
- Force-directed graph with nodes sized by salience, colored by
  source/tone/significance/state (selectable)
- Network stats bar: node count, edges, clusters, orphans, avg degree
- 2-hop neighborhood focus on node click with detail panel
- Client-side search with pulse animation on matching nodes
- Concept click-through from detail panel to search
- Edge legend showing all 6 relation types (similar, caused_by,
  part_of, reinforces, temporal, contradicts)
- Controls: episodes/memories toggle, salience/strength sliders,
  node limit, color-by selector
- Drag, zoom, pan via D3 behaviors
- Theme-aware colors via CSS variables
- Keyboard shortcut: 4 for Mind tab

Also fixes: hash router missing 'tools', keyboard shortcuts now
cover all 7 tabs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Redesigns the Research Analytics section with proper KPI cards
(nDCG@5, Precision@5, Recall@5, MRR) featuring delta indicators
and target thresholds. Replaces flat session lanes with expandable
session rows showing quality dots, concept pills, duration, and
feedback badges.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Backend:
- Expand ConsolidationCompleted event with 5 new fields from CycleReport
  (transitioned_fading/archived, patterns_extracted/decayed,
  never_recalled_archived)
- Fix WS subscription gaps: add PatternDiscovered, AbstractionCreated,
  MemoryAmended, SessionEnded to WebSocket handler
- Add GET /api/v1/retrieval/stats exposing query volume and latency
- Add POST /api/v1/embeddings/backfill to re-embed memories missing
  embeddings (with FK-safe UpdateEmbedding store method)

Dashboard:
- Enrich activity drawer events with structured detail (consolidation
  metrics, dream cycle stats, concept/association counts, pattern
  titles, episode durations)
- Add 2 new KPIs: Network Density and Retrieval Performance
- Add Cognitive Agents summary panel (Encoding, Consolidation,
  Dreaming, Abstraction stats)
- Add System Analysis brief that interprets metrics and gives
  actionable insight into how mnemonic is performing
- Cross-page navigation: click events to jump to relevant Explore tab
- Nav memory count clickable to Explore/Memories

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CalebisGross
Copy link
Copy Markdown
Collaborator Author

Note: The Mind page (graph visualization tab) is WIP and has known bugs — the episodes/memories toggle loads additively instead of switching. Will fix in a follow-up before merging.

@CalebisGross CalebisGross merged commit aca26f7 into main Mar 21, 2026
@CalebisGross CalebisGross deleted the feat/mind-graph-page branch March 21, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant