Skip to content

feat: live R3F effort graph viz with SSE subscriptions#223

Draft
tonyketcham wants to merge 4 commits into
mainfrom
toeknee/effort-graph-r3f-viz-081c
Draft

feat: live R3F effort graph viz with SSE subscriptions#223
tonyketcham wants to merge 4 commits into
mainfrom
toeknee/effort-graph-r3f-viz-081c

Conversation

@tonyketcham

@tonyketcham tonyketcham commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Add a Vercel-styled interactive Effort Graph visualization and the live channel it needs.

What's included

  • GET /events SSE on the GraphQL live server (ready + generation frames) so clients can subscribe to content reloads without polling
  • LiveSchemaReloader.subscribe for leak-free generation fan-out (SSE unsubscribes on disconnect)
  • examples/effort-viz: R3F orthographic 2D scene with space-colonization / slime-growth physics, soft repulsion displacement on add/remove, deterministic vibrant OKLCH colors per effort, light/dark theme
  • Dogfoods the monorepo's .flatbread-efforts via flatbread start --watch
  • Convenience script: pnpm play:efforts

How to try

pnpm install
pnpm build
pnpm play:efforts

Open http://localhost:3000 — GraphQL on :5057, live updates via /events.

Tests

  • packages/flatbread/src/graphql/liveServerEvents.test.ts — SSE ready + generation frames
  • packages/core liveSchema subscribe coverage
  • examples/effort-viz physics unit tests (pnpm --filter effort-viz test)

Manual verification

  • Live status with 64 nodes / ~117 edges from dogfood efforts
  • Select node → detail drawer
  • Light/dark theme toggle
  • Pan/zoom + camera auto-fit after layout settles

effort-graph-viz-demo.mp4

Effort Graph light mode
Effort Graph dark mode
Detail drawer

Open in Web Open in Cursor 

Add a Vercel-styled interactive Effort Graph visualization and the
live channel it needs.

- Mount GET /events SSE on the GraphQL live server (ready + generation)
- Expose LiveSchemaReloader.subscribe for leak-free generation fans-out
- Ship examples/effort-viz: R3F 2D scene, space-colonization growth
  physics, deterministic OKLCH effort colors, light/dark theme
- Dogfoods ../../.flatbread-efforts via flatbread start --watch
- Convenience script: pnpm play:efforts

Change-Id: I85953a7374dcfea1e84c52dc48cc286e71165881
Frame the orthographic camera on settled simulation bounds so the
graph fills the viewport, show labels on hover, and fetch rejected_by /
mitigated_by / decision invalidates for richer live edges.

Change-Id: I41dec139e1489ccb286314b1b51e6fcc9e1bbdaf
Drop invalidates/rejected_by/mitigated_by selections that the dogfood
content graph does not currently expose on Decision/Risk, restoring a
valid live GraphQL document.

Change-Id: I2019b14f534695707452a27f02c2b11180cdf685
Use deterministic OKLCH samples in the kind legend instead of muted grey dots.

Change-Id: Ia2294aac2e76fb152ab8a5ffb8b1aa747643c286
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.

2 participants