Skip to content

Live run graph: animate per-target status without relayout#31

Draft
ChrisonSimtian wants to merge 1 commit into
feature/graph-controlfrom
feature/graph-live
Draft

Live run graph: animate per-target status without relayout#31
ChrisonSimtian wants to merge 1 commit into
feature/graph-controlfrom
feature/graph-live

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Owner

Stacked on feature/graph-control (Fallout-build#526). Diff here is the one Phase 3 commit.

Makes the control track a running build — statuses stream in and animate in place.

  • GraphControl splits layout (cached on the graph structure) from status (patched on top), so a status-only update reuses positions instead of re-laying-out. Edges feeding a running target animate.
  • mountLive(el, graph, { subscribe, onRunTarget }) keeps the graph in sync with a status source and returns a dispose. A source is any subscribe(push) that pushes a { target: status } patch or a whole graph. Adapters: pollStatus(url, ms) (fits the extension file-watcher / a status JSON) and sseStatus(url) (a live server stream).
  • npm run live → a self-contained looping demo driven by a scripted run.

Verified in a browser: statuses stream, running nodes spin, edges flow, no relayout, zero console errors.

Next (Phase 3, framework side): a BuildManager producer that emits per-target status as the build runs, plus the extension bridge that feeds it to the webview. This PR is the consumer half.

Built in an isolated git worktree.

Phase 3, control side. The control can now track a running build: each status
update animates in place instead of re-rendering from scratch.

- GraphControl splits layout from status. Layout is cached on the graph structure
  (names + relations + flags); a status-only change reuses the existing positions
  and just patches node data + edge animation. Edges feeding a running target
  animate ("flow into active work").
- mountLive(el, graph, { subscribe, onRunTarget }) keeps the graph in sync with a
  source and returns a dispose fn. A source is any subscribe(push) that pushes a
  { target: status } patch or a whole graph. Two adapters ship: pollStatus(url)
  (fits the extension file-watcher / a status JSON) and sseStatus(url) (a live
  server stream).
- `npm run live` builds a self-contained looping demo driven by a scripted run —
  the stand-in until the BuildManager status producer (framework side) exists.

Verified in a browser: statuses stream in, running nodes spin, edges flow, no
relayout. Next: the C# BuildManager producer + the extension bridge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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