Skip to content

fix: handle disconnected Meter Widget beat input - #8007

Open
Piyushrathoree wants to merge 1 commit into
sugarlabs:masterfrom
Piyushrathoree:fix/meter-widget-disconnected-input
Open

fix: handle disconnected Meter Widget beat input#8007
Piyushrathoree wants to merge 1 commit into
sugarlabs:masterfrom
Piyushrathoree:fix/meter-widget-disconnected-input

Conversation

@Piyushrathoree

Copy link
Copy Markdown
Contributor

Summary

  • Prevented the Meter Widget from dereferencing a missing beat-value block.
  • Made the Reset action safe when meter inputs are disconnected.
  • Added regression coverage for an unplugged beat-value input.

Issue

Fixes #8006

Testing

  • npx jest js/widgets/__tests__/meterwidget.test.js --runInBand
  • npm run lint
  • npx prettier --check js/widgets/meterwidget.js js/widgets/__tests__/meterwidget.test.js
  • npm test

Manual testing confirmed that the Meter Widget opens without the original TypeError.

  • Bug fix
  • Tests

@github-actions github-actions Bot added bug fix Fixes a bug or incorrect behavior tests Adds or updates test coverage size/S Small: 10-49 lines changed area/javascript Changes to JS source files area/tests Changes to test files labels Aug 9, 2026
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 23.07692% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.14%. Comparing base (51c0185) to head (9233071).

Files with missing lines Patch % Lines
js/widgets/meterwidget.js 23.07% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8007      +/-   ##
==========================================
- Coverage   62.15%   62.14%   -0.01%     
==========================================
  Files         187      187              
  Lines       58315    58317       +2     
==========================================
  Hits        36244    36244              
- Misses      22071    22073       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@walterbender

Copy link
Copy Markdown
Member

;Maybe you can include a screenshot of the test case you are addressing here. Not obvious to me what to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/javascript Changes to JS source files area/tests Changes to test files bug fix Fixes a bug or incorrect behavior size/S Small: 10-49 lines changed tests Adds or updates test coverage

Projects

Development

Successfully merging this pull request may close these issues.

[Bug] Meter Widget crashes when beat-value input is disconnected

2 participants