Skip to content

Conversation

@dnenov
Copy link
Collaborator

@dnenov dnenov commented Oct 16, 2025

Purpose

This PR addresses the issue where Custom nodes (.dyf files) published via "Publish → Publish Custom Node (.dyf)" menu didn't appear in the package contents in the publish wizard.

Cause
ShowNodePublishInfo() only populated CustomNodeDefinitions but not CustomDyfFilepaths. The wizard filters out CustomNode type items and only displays CustomNodePreview type items (created from CustomDyfFilepaths), resulting in empty package contents.

Solution

  • Populate CustomDyfFilepaths with file paths from CustomNodeInfo before setting CustomNodeDefinitions (which triggers RefreshPackageContents())
  • Added fallback to use workspace.FileName when CustomNodeInfo.Path is empty
  • Enhanced OnDataContextChanged to check CustomDyfFilepaths count in addition to HasChanges for proper pending update detection

Changes

DynamoSandbox_CJDm2P8HR5

Declarations

Check these if you believe they are true

Release Notes

  • now correctly refreshes the datacontext and triggers update to the UI

Reviewers

@zeusongit

FYIs

@benglin

- now correctly refreshes the datacontext and triggers update to the UI
@dnenov dnenov requested a review from zeusongit October 16, 2025 17:09
@dnenov dnenov changed the title correctly adds file information to pacman correctly adds file information to pacman when publishing from custom node workspace Oct 16, 2025
@zeusongit zeusongit changed the title correctly adds file information to pacman when publishing from custom node workspace DYN-9658: Correctly adds file information to pacman when publishing from custom node workspace Oct 16, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9658

@zeusongit zeusongit requested a review from Copilot October 16, 2025 18:23
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 fixes a bug where custom nodes (.dyf files) published via "Publish → Publish Custom Node (.dyf)" menu didn't appear in the package contents of the publish wizard. The issue was caused by the wizard only populating CustomNodeDefinitions without setting CustomDyfFilepaths, causing the UI to show empty package contents since it filters out CustomNode items and only displays CustomNodePreview items.

  • Populate CustomDyfFilepaths before setting CustomNodeDefinitions to ensure proper UI display
  • Add fallback to use workspace.FileName when CustomNodeInfo.Path is empty
  • Enhance pending update detection logic to check for actual content availability

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
PackageManagerClientViewModel.cs Adds logic to populate CustomDyfFilepaths dictionary and fallback for empty Path values
PublishPackageViewModel.cs Changes CustomDyfFilepaths property visibility from private to internal
PackageManagerWizard.xaml.cs Improves pending update detection by checking content availability and fixes typo in comment

Comment on lines +322 to +328
currentFunInfo = new CustomNodeInfo(
currentFunInfo.FunctionId,
currentFunInfo.Name,
currentFunInfo.Category,
currentFunInfo.Description,
ws.FileName, // Use workspace FileName
currentFunInfo.IsVisibleInDynamoLibrary);
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

[nitpick] Creating a new CustomNodeInfo object to modify only the Path property is inefficient. Consider adding a constructor overload or a method to update the Path property directly, or use object initialization syntax to make the intent clearer.

Suggested change
currentFunInfo = new CustomNodeInfo(
currentFunInfo.FunctionId,
currentFunInfo.Name,
currentFunInfo.Category,
currentFunInfo.Description,
ws.FileName, // Use workspace FileName
currentFunInfo.IsVisibleInDynamoLibrary);
currentFunInfo.Path = ws.FileName; // Update Path directly

Copilot uses AI. Check for mistakes.
@zeusongit zeusongit merged commit 8beb450 into DynamoDS:master Oct 16, 2025
27 of 32 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.

2 participants