Skip to content

feat: Mainnet migration + Reality Tunnel trust-weighted filtering#47

Open
y4motion wants to merge 1 commit intointuition-box:devfrom
y4motion:feat/mainnet-migration-v2
Open

feat: Mainnet migration + Reality Tunnel trust-weighted filtering#47
y4motion wants to merge 1 commit intointuition-box:devfrom
y4motion:feat/mainnet-migration-v2

Conversation

@y4motion
Copy link
Copy Markdown

Summary

Resolves #45 — migrates graph.intuition.box from testnet to Intuition Mainnet and enhances the Reality Tunnel with a trust-weighted graph filter.


Changes

🌐 Mainnet Migration

File Change
src/api/Base.js testnet.intuition.shmainnet.intuition.sh/v1/graphql
src/api.js base endpoint URL + display name → Intuition Mainnet
src/App.js UI badge updated: pulsing green dot + "Intuition Mainnet" label

🔭 Reality Tunnel — Trust-Weighted Filtering

The Reality Tunnel panel now includes a Trust Threshold slider that filters the graph by vault share weight:

  • Slider range: 0% (show all) → 100% (only highest-trust nodes)
  • Filter logic: Nodes with vault.total_shares < threshold × max_shares are hidden; edges where either endpoint is hidden are also pruned
  • Pure derived view: filterGraphByTrust() applied via useMemo — base graph state is never mutated, filter is instant and reversible
  • Zero regressions: Existing Reality Tunnel address selector behaviour is unchanged
File Change
src/RealityTunnel.js Trust Threshold slider UI + exported filterGraphByTrust() pure helper
src/GraphVisualization.js Imports filterGraphByTrust, accepts trustThreshold prop, applies via useMemo as displayGraphData
src/App.css Trust slider pill styles, custom green range thumb, value label

How it works

User drags slider → trustThreshold (0–100%) → App state
  ↓
GraphVisualization useMemo → filterGraphByTrust(graphData, threshold)
  ↓
Nodes below % of max vault shares removed → linked edges pruned
  ↓
displayGraphData → ForceGraph2D / ForceGraph3D (no re-fetch)

Testing

  1. Open app → badge shows Intuition Mainnet with green pulse
  2. Data loads from mainnet.intuition.sh/v1/graphql
  3. Drag Trust ≥ slider → graph progressively filters to higher-trust connections
  4. Reset slider to 0% → full graph restored instantly
  5. Reality Tunnel address selector still works independently

… filtering

- api/Base.js: testnet.intuition.sh -> mainnet.intuition.sh/v1/graphql
- api.js: 'base' endpoint URL + displayName updated to Intuition Mainnet
- App.js: green Mainnet badge, trustThreshold state wired to GraphVisualization
- RealityTunnel.js: added Trust Threshold slider (0-100%) + filterGraphByTrust helper
- GraphVisualization.js: imports filterGraphByTrust, applies via useMemo as displayGraphData
- App.css: trust-threshold pill + custom range slider styles (green accent)

Closes intuition-box#45
@y4motion
Copy link
Copy Markdown
Author

Hi @jeremie-olivier and @danielamodu 👋

This PR implements the full scope of Mission 05 (#45):

Mainnet migration — all GraphQL endpoints now point to mainnet.intuition.sh/v1/graphql with the Mainnet badge reflecting the live network.

Reality Tunnel enhancement — added a Trust Threshold slider that filters graph nodes/edges by vault share weight (% of max total_shares). The filter is a pure useMemo derived view — no re-fetches, fully reversible by dragging back to 0%.

Happy to adjust anything based on your feedback. Let me know if you'd like the Reality Tunnel feature scoped differently!

@danielamodu
Copy link
Copy Markdown

Hey! Thanks for the tag. The mainnet migration looks clean — GraphQL endpoint switch and network badge update are exactly what was needed.

On the Reality Tunnel Trust Threshold slider:

  • The useMemo derived view is the right call — no re-fetches keeps it snappy
  • One thought: would it make sense to persist the threshold value in localStorage so users don't have to re-set it on page reload?
  • Also curious — at threshold 0% does the full graph render including nodes with zero vault share weight, or does it default to a minimum floor?

Happy to test on mainnet and report back if you need QA eyes on it.

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.

Mission 05: graph.intuition.box Mainnet Migration + Reality Tunnel

2 participants