Skip to content

feat: Graph mode frontend#702

Merged
leszko merged 21 commits intomainfrom
rafal/graph-mode-frontend-rebased
Mar 24, 2026
Merged

feat: Graph mode frontend#702
leszko merged 21 commits intomainfrom
rafal/graph-mode-frontend-rebased

Conversation

@leszko
Copy link
Copy Markdown
Collaborator

@leszko leszko commented Mar 17, 2026

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 17, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 99716bac-79b2-4a94-8a97-ef92a0e8bb7f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rafal/graph-mode-frontend-rebased

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 17, 2026

🚀 fal.ai Preview Deployment

App ID daydream/scope-pr-702--preview
WebSocket wss://fal.run/daydream/scope-pr-702--preview/ws
Commit e8eaba8

Testing

Connect to this preview deployment by running this on your branch:

uv run build && SCOPE_CLOUD_APP_ID="daydream/scope-pr-702--preview/ws" uv run daydream-scope

🧪 E2E tests will run automatically against this deployment.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 17, 2026

✅ E2E Tests passed

Status passed
fal App daydream/scope-pr-702--preview
Run View logs

Test Artifacts

Check the workflow run for screenshots.

@leszko leszko marked this pull request as ready for review March 17, 2026 12:39
@leszko leszko marked this pull request as draft March 17, 2026 12:39
@gioelecerati gioelecerati force-pushed the rafal/graph-mode-frontend-rebased branch from e7ad3c9 to b5095b1 Compare March 17, 2026 12:54
@gioelecerati gioelecerati mentioned this pull request Mar 17, 2026
4 tasks
@gioelecerati gioelecerati changed the title Graph Mode frontend rebased feat: Graph mode frontend Mar 17, 2026
@gioelecerati gioelecerati force-pushed the rafal/graph-mode-frontend-rebased branch from f88bb22 to 27c0870 Compare March 19, 2026 15:36
@gioelecerati gioelecerati marked this pull request as ready for review March 20, 2026 10:55
@leszko leszko force-pushed the rafal/graph-mode-frontend-rebased branch from cd7a6bf to 0872579 Compare March 23, 2026 08:58
leszko and others added 2 commits March 23, 2026 10:02
…ow support

Cherry-picked from 7d1eb0e with conflict resolution.

Signed-off-by: Rafał Leszko <[email protected]>
Signed-off-by: gioelecerati <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafal Leszko <[email protected]>
@leszko leszko force-pushed the rafal/graph-mode-frontend-rebased branch from dcf827d to 0da42df Compare March 23, 2026 10:23
leszko and others added 16 commits March 23, 2026 12:26
Route graph mode source changes through handleModeChange so the backend
receives input_source parameter updates during streaming. Add a useEffect
to sync input_source config over WebRTC when it changes mid-stream.

Also: move resolution display from toolbar to SinkNode, support nullable
enums in PipelineNode.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafał Leszko <[email protected]>
Graph mode export now matches the Perform Mode flow: clicking Export
opens the same ExportDialog with options to download a workflow file
(with a name input dialog) or publish directly to daydream.live.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafal Leszko <[email protected]>
Graph mode was not applying the same VRAM-based quantization logic as
perform mode, leaving quantization as None even when the device VRAM
is below the pipeline recommended threshold.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafał Leszko <[email protected]>
…AM threshold

Matches perform mode behavior where quantization is reset to null when
the pipeline has no recommended_quantization_vram_threshold.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafał Leszko <[email protected]>
…aming in graph mode

These are runtime parameters (used in OSC, DMX, modulation, and UpdateParams) but were
incorrectly marked as is_load_param=True, causing them to be disabled during streaming
in graph mode. Also fix the default isLoadParam logic in PipelineNode to not assume
params without an explicit is_load_param are load params.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafał Leszko <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafał Leszko <[email protected]>
…aph mode

Graph mode was unconditionally enabling VACE and missing per-node
quantization defaults, causing OOM on GPUs that require FP8.
Quantization now computes the VRAM-based default per pipeline node,
and VACE is only enabled when edges connect to vace_input_frames or
vace_input_masks ports.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafal Leszko <[email protected]>
…stream start

The PipelineNode warning said resolution would be adjusted, but the actual
adjustment was not happening. Node params (height/width) now get adjusted
before being passed to loadPipeline, matching Perform mode behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafał Leszko <[email protected]>
Expose updateNodeParam on GraphEditorHandle so StreamPage can update
the PipelineNode height/width values after resolution adjustment,
making the UI reflect the corrected values like Perform mode does.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafał Leszko <[email protected]>
Round height/width from node params to integers before sending as
load_params, preventing torch.zeros float errors. Also always update
the node UI with the final integer values at stream start.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafał Leszko <[email protected]>
…ale overrides

Move resolution adjustment to happen immediately after capturing the graph
config, before any downstream code reads the values. Also strip height/width
from schemaFieldOverrides in both loadParams and initialParameters to prevent
stale perform-mode values from overriding the adjusted resolution — the
pipeline's __call__ writes all kwargs into state, so leaked height/width
would override the correctly-adjusted values on every frame.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafal Leszko <[email protected]>
Replace destructuring with Object.fromEntries/filter to exclude
height/width from schemaFieldOverrides without creating unused vars.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafal Leszko <[email protected]>
Replace destructuring-to-discard pattern with Object.fromEntries/filter
to avoid unused variable lint errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafal Leszko <[email protected]>
Extract isVideoAsset to shared mediaUtils, fix React hook dependency
arrays in workflow dialogs and graph persistence, add JSON fingerprint
dedup for auto-save, add parameter send dedup in value forwarding, and
prune stale subgraph eval state for removed nodes.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafał Leszko <[email protected]>
…erns

Remove unused code (useWebRTC hook, tryExtractLinearSettings, NodeSection),
extract shared utilities (EditableLabel, useSlider, workflow dialog helpers,
nodeColors), and improve file organization (move typeResolution to utils/,
canonicalize BOUNDARY ID imports). Net reduction of ~1,168 lines.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafał Leszko <[email protected]>
When Workflow Builder has been used, the Settings panel now shows a
"Clear Graph" button so users can return to Perform Mode controls
without switching back to the graph editor.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafał Leszko <[email protected]>
leszko and others added 3 commits March 24, 2026 10:12
…type resolution

Rebuild edge IDs from constituent parts instead of using string replacement,
which could corrupt unrelated edges when a port name is a substring of another.
Make reroute upstream walk explicitly single-input with edges.find() instead of
a for-loop with early return.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafał Leszko <[email protected]>
Unify duplicated PARAM_TYPE_COLORS/HANDLE_COLORS definitions into
nodeColors.ts as the single source of truth, removing local
redefinitions from constants.ts, PipelineNode.tsx, and SubgraphNode.tsx.

Extract pure functions (enrichNodes, colorEdges, resetAutoHeightNodes,
attachNodeParams, extractNodeParams) from useGraphPersistence into a
new utils/nodeEnrichment.ts module, reducing the hook from 843 to ~580
lines and improving reusability.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafał Leszko <[email protected]>
Parameter forwarding depended on isStreamingRef (a stable ref object)
which never triggered effect re-runs when streaming started. Combined
with lastSentRef and prevNodeDataRef never being cleared between
sessions, stopping and restarting a stream with unchanged graph values
caused the new backend session to receive no parameter initialization.

Replace isStreamingRef with an isStreaming boolean in the dependency
array so the effect re-runs on stream state changes, and clear the
dedup refs on each false→true transition.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Rafał Leszko <[email protected]>
@leszko leszko merged commit 38545da into main Mar 24, 2026
10 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