Skip to content

Conversation

christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Jul 29, 2025

Summary

Fixed a critical issue where onGraphConfigured and onAfterGraphConfigured callbacks were only being triggered on root graph nodes, missing nodes within subgraphs.

Impact

This bug caused several functionality issues in subgraphs:

  • Widget input configurations not set up properly
  • Primitive nodes failing to initialize
  • Reroute nodes not propagating type changes
  • Audio upload widgets not restoring saved file paths

Changes

  • Updated #addAfterConfigureHandler in app.ts to use triggerCallbackOnAllNodes
  • This ensures callbacks reach all nodes in the graph hierarchy recursively

Testing

  • Existing tests pass
  • Pre-commit hooks (ESLint, Prettier) pass

Fixes #4569

┆Issue is synchronized with this Notion page by Unito

The onGraphConfigured and onAfterGraphConfigured callbacks were only being
triggered on nodes in the root graph, missing nodes within subgraphs. This
caused several critical issues:

- Widget input configurations not set up in subgraph nodes
- Primitive nodes not initializing properly in subgraphs
- Reroute nodes not updating connection types in subgraphs
- Audio upload widgets not restoring file paths in subgraphs

Updated #addAfterConfigureHandler to use triggerCallbackOnAllNodes which
recursively processes nodes in the entire graph hierarchy.

Fixes #4569
Copy link

github-actions bot commented Jul 29, 2025

⚠️ Warnings

⚠️ Warning: E2E Test Coverage Missing

If this PR modifies behavior that can be covered by browser-based E2E tests, those tests are required. PRs lacking applicable test coverage may not be reviewed until added. Please add or update browser tests to ensure code quality and prevent regressions.

⚠️ Warning: Visual Documentation Missing

If this PR changes user-facing behavior, visual proof (screen recording or screenshot) is required. PRs without applicable visual documentation may not be reviewed until provided.
You can add it by:

  • GitHub: Drag & drop media directly into the PR description

  • YouTube: Include a link to a short demo

@christian-byrne christian-byrne added the needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch label Jul 29, 2025
@christian-byrne christian-byrne merged commit 4b75528 into main Jul 29, 2025
19 checks passed
@christian-byrne christian-byrne deleted the fix/app-ts-subgraph-callbacks-clean branch July 29, 2025 07:17
@christian-byrne christian-byrne mentioned this pull request Jul 29, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:subgraph needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Audit and update graph.nodes iterations to support subgraph hierarchy
1 participant