-
-
Notifications
You must be signed in to change notification settings - Fork 363
feat(SpeechWave): remove Task.Run support wpf #5894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's Guide by SourceryThis pull request refactors the SpeechWave component to remove the explicit use of Task.Run, which is often problematic in UI contexts like WPF. It updates the internal timing mechanism and state management, and revises the associated unit tests to reflect these changes and use UnsafeAccessor for accessing private members for testing purposes. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ArgoZhang - I've reviewed your changes - here's some feedback:
Overall Comments:
- The title mentions 'wpf', but the changes appear to be within a Blazor component; consider updating the title for clarity.
- The condition
if (ShowUsedTime || Show == false)for callingStateHasChangedwithin the loop might need review; consider if the timer UI should update periodically even ifShowUsedTimeis false.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5894 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 661 661
Lines 30421 30418 -3
Branches 4321 4327 +6
=========================================
- Hits 30421 30418 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-Authored-By: Symin <[email protected]>
Link issues
fixes #5893
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Remove Task.Run from the SpeechWave component.
Enhancements:
SpeechWavecomponent to run its timer logic asynchronously withoutTask.Run.StateHasChangedconditionally within the timer loop.OnParametersSettoOnParametersSetAsync.Tests:
SpeechWavetests to align with asynchronous changes.UnsafeAccessorinstead of reflection for accessing private members in tests.