Skip to content

experiment: graph explorer (/graph page and feed graph layout) - #2138

Draft
SHAcollision wants to merge 1 commit into
devfrom
experiment/graph-viz
Draft

experiment: graph explorer (/graph page and feed graph layout)#2138
SHAcollision wants to merge 1 commit into
devfrom
experiment/graph-viz

Conversation

@SHAcollision

Copy link
Copy Markdown
Contributor

experiment: an interactive social-graph explorer. Use together with the pubky-nexus branch experiment/graph-viz (API PR: pubky/pubky-nexus#976); runbook in docs/graph-explorer-experiment.md.

What it adds

  • /graph (top-nav Waypoints icon, ?user= deep link, public explore route): an ego-centric canvas of users, posts and tags. Click inspects (real post cards, reply in place, follow, social proof), double-click expands, hover shows the profile card. Legend filters classes with live counts; controls hold declutter, Louvain communities, the time machine and physics; "How am I connected?" traces the shortest follow path with particles.
  • Feed "Graph" layout (desktop layout switcher on Home/Custom/Search): the current stream rendered as a constellation. Authors carry their posts, reply/repost lineage draws chains, hot tags become hubs; "merge more" grows it a page at a time and the time machine replays the feed assembling.

How it is built

  • One organism (SocialGraph) isolates react-force-graph-2d; everything else is plain components over a pure, unit-tested view-model pipeline (time cap, class hiding, declutter, mutual-follow collapsing, tag aggregation, budget pruning).
  • Both surfaces share a single state-machine core (useGraphCore); the page and the feed layout only differ in where the graph comes from and how relationship colors derive.
  • Local-first: graph payload entities are backfilled into Dexie through the standard stream ingestion pipeline (details, counts, tags, relationships, TTL), so hover/selection are cache hits; the feed graph reads relationship flags reactively via useLiveQuery; view preferences persist in a zustand store.
  • Reuses the house building blocks throughout: UserInfoPopover content for the hover card, shared FollowButton, Popover atom with virtual anchors for canvas-point popovers, Tag/Input/Skeleton atoms, SearchUserSuggestion, useSearchAutocomplete, useTtlSubscription, PostPreviewCard, DialogReply.

Tests

Synthesizer, hooks, store, canvas chrome and application ingestion covered in vitest; cypress/e2e/graph.cy.ts and graph-public.cy.ts cover the page against a live stack. i18n in all nine locales.

We probably will not merge this as-is; it exists so the team can explore the feature end to end.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

URL: https://pubky-app-pr-2138-fzxmjul7ya-oa.a.run.app

pubky-app-pr-21389d13645

@SHAcollision
SHAcollision force-pushed the experiment/graph-viz branch 14 times, most recently from 30a393d to 0e395a9 Compare July 6, 2026 05:25
@SHAcollision
SHAcollision force-pushed the experiment/graph-viz branch from 0e395a9 to 9d13645 Compare July 6, 2026 07:10
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