Skip to content

DYN-9092: fix port entry issue and refactor#16326

Merged
chubakueno merged 2 commits into
DynamoDS:masterfrom
chubakueno:feature/DYN-9092
Jul 2, 2025
Merged

DYN-9092: fix port entry issue and refactor#16326
chubakueno merged 2 commits into
DynamoDS:masterfrom
chubakueno:feature/DYN-9092

Conversation

@chubakueno

@chubakueno chubakueno commented Jun 27, 2025

Copy link
Copy Markdown
Contributor

Purpose

Fix port entry issue and refactor Cluster and Single results. Related to PR #16281 where seach filtering was introduced.

Declarations

Check these if you believe they are true

  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB
  • This PR introduces new feature code involve network connecting and is tested with no-network mode.

Release Notes

Fix port entry issue and refactor Cluster and Single results.

Reviewers

@BogdanZavu
@johnpierson

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

@chubakueno chubakueno changed the title fix port entry issue and refactor DYN-9092: fix port entry issue and refactor Jun 27, 2025

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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-9092

@johnpierson johnpierson requested a review from Copilot June 27, 2025 20:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 an issue with port entry mapping and refactors how cluster and single auto-complete results are represented and filtered.

  • Changed Probability from string to double and updated related filtering logic
  • Refactored SingleResultItem to inherit from ClusterResultItem and consolidated properties
  • Simplified result population in NodeAutoCompleteBarViewModel, removed redundant lists, and introduced direct mapping to DNADropdownViewModel

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/NodeAutoCompleteViewExtension/Views/NodeAutoCompletePanelView.xaml.cs Updated Probability property type from string to double
src/NodeAutoCompleteViewExtension/ViewModels/SingleResultItem.cs Made SingleResultItem inherit from ClusterResultItem and replaced old score/port fields
src/NodeAutoCompleteViewExtension/ViewModels/NodeAutoCompleteBarViewModel.cs Adjusted confidence threshold, removed FullSingleResults, simplified filtering and item addition
src/NodeAutoCompleteViewExtension/ViewModels/DNADropdownViewModel.cs Added ClusterResultItem to carry underlying result data
src/DynamoCore/Search/NodeAutocompleteSearch.cs Changed data contract of Probability from string to double
Comments suppressed due to low confidence (4)

src/NodeAutoCompleteViewExtension/ViewModels/NodeAutoCompleteBarViewModel.cs:781

  • The parameter name filterredIndex contains a typo and is ambiguous. Rename to filteredIndex for clarity.
        internal void AddCluster(int filterredIndex)

src/DynamoCore/Search/NodeAutocompleteSearch.cs:286

  • Changing Probability from string to double is a breaking change in the data contract. Update any API documentation and ensure consumers handle the new numeric type.
        internal double Probability { get; set; }

src/NodeAutoCompleteViewExtension/ViewModels/NodeAutoCompleteBarViewModel.cs:171

  • This updated filtering logic should be covered by unit tests to verify that results are correctly included or excluded based on the new minClusterConfidenceScore threshold.
                return FullResults.Results.Where(x => x.Probability > minClusterConfidenceScore);

src/NodeAutoCompleteViewExtension/ViewModels/NodeAutoCompleteBarViewModel.cs:988

  • This collection initialization uses [], which is invalid for a Dictionary. Replace with new Dictionary<string, ImageSource>() or a valid C# 12 collection expression for dictionaries.
                        Dictionary<string, ImageSource> dict = [];

@BogdanZavu

Copy link
Copy Markdown
Contributor

LGTM!

@chubakueno

Copy link
Copy Markdown
Contributor Author

LGTM!

solved a merge conflict by rebase, lets check that the pipeline runs successfully

@chubakueno chubakueno merged commit 8989bee into DynamoDS:master Jul 2, 2025
25 of 28 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.

3 participants