Skip to content

Conversation

christian-byrne
Copy link
Contributor

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

Ensures subgraph title changes are immediately reflected in the node library sidebar. When users rename a subgraph node, the node library shows the updated display name without requiring a reload.

Implementation preserves object references while updating both nodeDefsByName and nodeDefsByDisplayName mappings, plus LiteGraph registered node type titles for new instance creation.

subgraph-node-library-update-demo.mp4

┆Issue is synchronized with this Notion page by Unito

When a subgraph node is renamed, the node library sidebar now immediately reflects the updated display name. This ensures consistency between the canvas, breadcrumb navigation, and node library.

Key changes:
- Add updateNodeDefDisplayName method to nodeDefStore with reference preservation
- Update TitleEditor to call nodeDefStore for subgraph title changes
- Organize subgraph browser tests into dedicated folder
- Add comprehensive unit test coverage for nodeDefStore
@christian-byrne christian-byrne requested review from a team as code owners July 15, 2025 19:42
@@ -336,4 +336,54 @@ test.describe('Node library sidebar', () => {
await comfyPage.page.waitForTimeout(1000)
expect(await tab.getNode('KSampler (Advanced)').count()).toBe(2)
})

test('Subgraph node display name updates in library when renamed', async ({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will skip this test later and then re-enable when subgraphs are re-added to sidebar.

@christian-byrne christian-byrne added area:subgraph subgraph-v2 Things slated for 2nd release of subgraph which will introduce linked instance, sharing/saving, etc. and removed area:subgraph labels Aug 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:subgraph subgraph-v2 Things slated for 2nd release of subgraph which will introduce linked instance, sharing/saving, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant