Skip to content

feat(control-plane): add Constellation view with Pretext canvas rendering#831

Merged
nicoloboschi merged 1 commit intomainfrom
feat/constellation-view
Apr 1, 2026
Merged

feat(control-plane): add Constellation view with Pretext canvas rendering#831
nicoloboschi merged 1 commit intomainfrom
feat/constellation-view

Conversation

@nicoloboschi
Copy link
Copy Markdown
Collaborator

Summary

  • New Constellation view as the default memory visualization in the control plane, powered by @chenglou/pretext for DOM-free text layout on canvas
  • Canvas-rendered zoomable/pannable memory map with spatial label deconfliction — handles 1000+ nodes at 60fps
  • Nodes colored by link-count heat gradient (brand teal → cyan → blue), with star-like varied size/opacity
  • Hover shows rich tooltip with full memory metadata (text, entities, tags, dates, document ID, proof count)
  • Hover highlights connected nodes and links, dims unrelated ones
  • Click to select nodes and view details in the side panel
  • Fullscreen mode toggle (Esc to exit)
  • Graph API performance fix: entity query was doing a full table scan (missing WHERE clause), links query was returning 500k+ uncapped edges with an expensive DISTINCT ON sort — now filters by visible units and caps at 10k edges sorted by weight. ~10x faster (8s → 0.8s for 1000 nodes).

Test plan

  • Open control plane, navigate to a bank with memories
  • Verify Constellation is the default view and renders nodes/links
  • Scroll to zoom, drag to pan, hover to see tooltips and link highlights
  • Click a node to open the detail panel
  • Test fullscreen toggle
  • Switch to Graph/Table/Timeline views and back — verify they still work
  • Test with Observations tab — verify observation link inheritance still works
  • Verify graph API response time is fast (~1s for 1000 nodes)

…ring

Add a new "Constellation" memory visualization as the default view in the
control plane, powered by @chenglou/pretext for DOM-free text layout on canvas.

- Canvas-rendered zoomable/pannable memory map with spatial label deconfliction
- Nodes colored by link-count heat gradient (Hindsight brand teal→cyan→blue)
- Star-like rendering with varied size/opacity based on connectivity
- Hover shows rich tooltip with full memory metadata (text, entities, tags, dates)
- Hover highlights connected nodes and their links, dims the rest
- Click to select and view memory details in the side panel
- Fullscreen mode toggle
- Link type legend and heat gradient legend on the HUD

Also optimizes the graph API endpoint:
- Entity query now filters by visible unit IDs (was doing full table scan)
- Links query caps at 10k edges sorted by weight (was returning 500k+ uncapped)
- Replaced expensive DISTINCT ON with LEAST/GREATEST sort with simple ORDER BY
@nicoloboschi nicoloboschi merged commit 36783df into main Apr 1, 2026
43 of 46 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

Development

Successfully merging this pull request may close these issues.

1 participant