Skip to content

Composite nodes#19

Merged
miltonlaufer merged 4 commits intomainfrom
feature/composite-nodes
Dec 23, 2025
Merged

Composite nodes#19
miltonlaufer merged 4 commits intomainfrom
feature/composite-nodes

Conversation

@miltonlaufer
Copy link
Owner

Describe your changes

  • Nodes can get very complicated, so we decided to add resusable complex nodes.

Type of change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 🛠️ Re-factoring or improvement
  • 🚩 Add or update tests

@miltonlaufer miltonlaufer requested a review from Copilot December 23, 2025 01:42
@miltonlaufer miltonlaufer self-assigned this Dec 23, 2025
@miltonlaufer miltonlaufer added the enhancement New feature or request label Dec 23, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces composite nodes - reusable, complex node structures that can encapsulate entire audio processing chains. The implementation includes both preset composite nodes and user-created custom composites, with a dedicated editor for building and managing these nodes.

Key changes:

  • Added composite node infrastructure with definition store, strategy pattern for audio graph building, and serialization support
  • Implemented a composite editor with visual graph editing, port management, and save/load functionality
  • Created unified keyboard/clipboard operations that work across main graph and composite editor contexts

Reviewed changes

Copilot reviewed 68 out of 79 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/stores/NodeModels.ts Added 'composite' and 'user-composite' category enumerations
src/stores/NodeAdapter.ts Added composite node categories to adapter model
src/stores/MainGraphContext.ts New adapter wrapping AudioGraphStore to implement IGraphContext interface
src/stores/GraphOperationsStore.ts Centralized graph operations with shared clipboard across contexts
src/stores/GraphOperationsStore.test.ts Comprehensive tests for graph operations store
src/stores/GraphFocusStore.ts Manages active context switching between main graph and composite editor
src/stores/GraphContext.ts Interface definitions for unified graph operations
src/stores/CompositeNodeDefinitionStore.ts Store for managing composite node definitions with IndexedDB persistence
src/stores/CompositeGraphContext.ts Adapter for composite editor implementing IGraphContext
src/stores/CompositeGraphContext.test.ts Tests for composite graph context implementation
src/stores/CompositeEditorStore.ts Manages composite editor state and node addition requests
src/stores/AudioGraphStore.ts Enhanced with composite node support including metadata generation and connection handling
src/services/prompts/systemPrompt.ts Extracted system prompts with composite node documentation
src/services/prompts/index.ts Exports for prompt utilities
src/services/LangChainService.ts Refactored to use extracted prompts with composite node info
src/hooks/useUnifiedKeyboardShortcuts.ts Centralized keyboard handling routing to active context
src/hooks/useMainGraphOperations.ts Adapts AudioGraphStore to IGraphOperations interface
src/hooks/useGraphUndoRedo.ts Reusable hook for undo/redo with clipboard operations
src/hooks/useGraphUndoRedo.test.ts Comprehensive tests for graph undo/redo hook
src/hooks/useCompositeGraphContext.ts Hook wrapping CompositeGraphContext for React integration
src/hooks/useCompositeEditorState.ts Centralizes composite editor state management
src/hooks/useCompositeEditorOperations.ts Adapts composite editor to IGraphOperations interface
src/hooks/index.ts Exports for custom hooks
src/domain/nodes/strategies/index.ts Added CompositeNodeStrategy export
src/domain/nodes/strategies/CompositeNodeStrategy.ts Strategy for building and managing composite node internal graphs
src/domain/nodes/NodeRegistry.ts Enhanced with composite node registration and metadata generation
src/components/customNodes/InternalNodeComponent.tsx Simplified node component for composite editor
src/components/customNodes/EdgeConnectorNode.tsx Visual connector for composite node boundary ports
src/components/customNodes/CompositeNodeComponent.tsx Visual representation of composite nodes in main graph
src/components/PropertyPanel.tsx Enhanced to display composite node definition names
src/components/NodePalette.tsx Added composite node sections with initialization and management
src/components/GraphCanvas.tsx Integrated composite editor with keyboard shortcuts and double-click handling
src/components/Examples.test.tsx Updated tests to use composite nodes in examples
src/components/CompositeEditor/index.ts Exports for composite editor sub-components
src/components/CompositeEditor/CompositeEditorToolbar.tsx Floating toolbar for editor operations
src/components/CompositeEditor/CompositeEditorAlerts.tsx Alert component for editor messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@miltonlaufer miltonlaufer merged commit 57bcaa7 into main Dec 23, 2025
4 checks passed
@miltonlaufer miltonlaufer deleted the feature/composite-nodes branch December 23, 2025 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants