Skip to content

Fix: remove debug console.log statements from reflection widget#5885

Merged
omsuneri merged 1 commit intosugarlabs:masterfrom
DhyaniKavya:fix/remove-reflection-debug-logs
Feb 25, 2026
Merged

Fix: remove debug console.log statements from reflection widget#5885
omsuneri merged 1 commit intosugarlabs:masterfrom
DhyaniKavya:fix/remove-reflection-debug-logs

Conversation

@DhyaniKavya
Copy link
Contributor

issue: #5884

Problem:-
-The reflection widget includes several leftover console.log statements used for development and debugging purposes.
-Debug messages are printed during normal widget operations (e.g., analysis generation and report saving).
-These logs do not indicate errors or user-facing issues.
-They create unnecessary console noise and expose internal execution details.
-While functionality is unaffected, retaining debug logs in production reduces code professionalism and makes real debugging more difficult.

Solution:-
-This PR removes debug-only logging from the reflection widget while preserving meaningful error handling.
-removes development/debug console.log statements
-preserves console.error and console.warn logs used for error handling
-removes an empty conditional branch created solely for debug logging
-does not modify logic or behavior

Changes Made:-
-File modified:
->js/widgets/reflection.js

  • removed debug console logs
  • removed empty conditional branch tied to debug logging

->ESLint: ✅ no lint errors
->Tests: ⚠️ pre-existing failures on master (unrelated to this change)

Impact:-
-Removes unnecessary console noise
-Improves developer debugging experience
-Enhances production code hygiene
-No functional changes

Notes:-
This change is intentionally minimal and non-breaking. It removes debug-only logs while preserving runtime error reporting and existing functionality.

Happy to adjust if maintainers prefer retaining any informational logs.

@github-actions
Copy link
Contributor

❌ Some Jest tests failed. Please check the logs and fix the issues before merging.

Failed Tests:

palette.test.js
logo.test.js
logoconstants.test.js

@DhyaniKavya
Copy link
Contributor Author

@omsuneri Please review the changes . There are pre-existing failures on master branch due to which :
->palette.test.js
->logo.test.js
->logoconstants.test.js
these three tests fails, they are not related to this change. Currently Vyagh is working on the issue and raised a PR. I will
re-run the CI after fixation and all test will pass then.
Thankyou.

Copy link
Contributor

@7se7en72025 7se7en72025 left a comment

Choose a reason for hiding this comment

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

LGTM !!

@DhyaniKavya DhyaniKavya force-pushed the fix/remove-reflection-debug-logs branch from 12cd646 to 34defc9 Compare February 25, 2026 04:55
@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@DhyaniKavya
Copy link
Contributor Author

@omsuneri @walterbender Rebase the branch successfully and got approval too for the changes. This PR is ready to merge, please review.

@omsuneri omsuneri merged commit 1440885 into sugarlabs:master Feb 25, 2026
7 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