DYN-9679: Auto-revert to ObjectType when ML autocomplete agreement is unchecked#16616
DYN-9679: Auto-revert to ObjectType when ML autocomplete agreement is unchecked#16616QilongTang merged 5 commits intoDynamoDS:masterfrom
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9679
There was a problem hiding this comment.
Pull Request Overview
This PR implements automatic fallback behavior for ML-based node autocomplete when users revoke their data collection agreement. When the ML Terms of Use checkbox is unchecked, the system now automatically switches from ML recommendation mode to ObjectType matching mode, preventing users from remaining in an inconsistent state.
Key Changes:
- Added automatic mode switching logic in the
IsMLAutocompleteTOUApprovedproperty setter - System now reverts to ObjectType matching when ML agreement is unchecked
| isMLAutocompleteTOUApproved = value; | ||
|
|
||
| // If user unchecks the agreement, automatically revert to ObjectType matching | ||
| if (!value && defaultNodeAutocompleteSuggestion == NodeAutocompleteSuggestion.MLRecommendation) | ||
| { | ||
| defaultNodeAutocompleteSuggestion = NodeAutocompleteSuggestion.ObjectType; | ||
| AutocompletePreferencesChanged?.Invoke(); | ||
| } | ||
|
|
||
| RaisePropertyChanged(nameof(IsMLAutocompleteTOUApproved)); |
There was a problem hiding this comment.
The property change notification for IsMLAutocompleteTOUApproved should be raised before potentially triggering AutocompletePreferencesChanged. The current order may cause event handlers to observe inconsistent state where the autocomplete mode has changed but IsMLAutocompleteTOUApproved hasn't been signaled yet. Move RaisePropertyChanged(nameof(IsMLAutocompleteTOUApproved)) to line 821, immediately after setting the backing field.
| if (!value && defaultNodeAutocompleteSuggestion == NodeAutocompleteSuggestion.MLRecommendation) | ||
| { | ||
| defaultNodeAutocompleteSuggestion = NodeAutocompleteSuggestion.ObjectType; | ||
| AutocompletePreferencesChanged?.Invoke(); |
There was a problem hiding this comment.
It automatically switches the "the default ranking method" from "Recommended Nodes/ MLRecommendation" to "Node Type Match/ ObjectType" when the user unchecks the agreement, because to use the Recommended Nodes ranking method with Node Autocomplete, user must agree to data collection in Dynamo.
QilongTang
left a comment
There was a problem hiding this comment.
One comment then LGTM
… unchecked (#16616) Co-authored-by: Aaron (Qilong) <[email protected]> (cherry picked from commit f88de06)
|
Successfully created backport PR for |
Purpose
When users uncheck the "Agreement for Data Collection" checkbox for ML-based node autocomplete, the system now automatically reverts to ObjectType matching mode.
Problem:
Users could uncheck the ML agreement but remain in ML recommendation mode, they had to manually switch back to ObjectType mode
Solution:
Added automatic fallback logic in
IsMLAutocompleteTOUApprovedsetterDeclarations
Check these if you believe they are true
Release Notes
ML autocomplete now automatically reverts to ObjectType matching when users uncheck the data collection agreement.
Reviewers
@DynamoDS/eidos @DynamoDS/synapse
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of