Skip to content

[Chore] Remove leftover debug console.log statements shipped to production - #7995

Open
Ayush-1812 wants to merge 1 commit into
layer5io:masterfrom
Ayush-1812:fix/remove-debug-console-logs
Open

[Chore] Remove leftover debug console.log statements shipped to production#7995
Ayush-1812 wants to merge 1 commit into
layer5io:masterfrom
Ayush-1812:fix/remove-debug-console-logs

Conversation

@Ayush-1812

@Ayush-1812 Ayush-1812 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes #7993

Debug logging left behind in component code was shipping in the production bundle and writing to every visitor's browser console. This removes it.

File Change
src/components/SistentNavigation/intra-page.js Removed console.log(anchors). IntraPage is rendered by SistentLayout, so this logged a NodeList on every Sistent documentation page load.
src/sections/Learn-Layer5/Course-Overview/index.js Removed two console.log calls embedded directly in JSX, which fired on every render of the course overview page.
src/sections/Home/So-Special-Section/index.js Removed commented-out console.log calls.
src/sections/Meshery/Meshery-integrations/Individual-Integrations/CatalogGrid.js console.logconsole.error in the fetch catch block.
src/sections/Meshery/Features-Col/index.js console.logconsole.error in the fetch .catch handler.

Notes for Reviewers

  • The last two entries are the log-level change the issue suggested rather than removals — that error reporting is intentional and stays, it just now uses the level that matches what it reports. Happy to drop those two lines from this PR if you would rather keep it purely to deletions.
  • Removing the Course-Overview logs does not orphan any variable: availableServiceMeshes is still used at lines 47 and 54.
  • src/sections/Projects/Sistent/getting-started/usage/index.js:95 also contains a console.log, and is deliberately left untouched — it sits inside a documentation code-sample string displayed to readers as example code, not executed code.
  • src/assets/images/learning-path/embed-test/embedded-design-embed1.js contains console.log calls as well, but it is a vendored embed-test asset rather than site component code, so it is out of scope here.
  • After this change, the only console.log remaining under src/ in component code is the documentation sample noted above. All five modified files were syntax-checked before committing.

Signed commits

  • Yes, I signed my commits.

Summary by CodeRabbit

  • Bug Fixes

    • Improved error reporting for failed performance and catalog data requests.
    • Errors are now clearly distinguished from standard application activity in diagnostics.
  • Chores

    • Removed leftover debug logging from navigation, news, and service-mesh components.
    • No changes to user-facing functionality or application behavior.

Debug logging left in component code shipped in the production bundle
and wrote to every visitor's console.

- SistentNavigation/intra-page.js: drop console.log(anchors), which
  logged a NodeList on every Sistent documentation page load.
- Learn-Layer5/Course-Overview: drop two console.log calls embedded in
  JSX that fired on every render.
- Home/So-Special-Section: drop commented-out console.log calls.

Error reporting in catch blocks is intentional and stays, but the two
sites that used console.log now use console.error, matching what they
report.

The console.log in Sistent getting-started/usage is deliberately left
alone: it is inside a documentation code sample shown to readers, not
executed code.

Fixes layer5io#7993

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Ayush-1812 <ayushjangid5102@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e32a98a-a96d-4bed-a321-113c9bd00938

📥 Commits

Reviewing files that changed from the base of the PR and between 981b50f and 9943277.

📒 Files selected for processing (5)
  • src/components/SistentNavigation/intra-page.js
  • src/sections/Home/So-Special-Section/index.js
  • src/sections/Learn-Layer5/Course-Overview/index.js
  • src/sections/Meshery/Features-Col/index.js
  • src/sections/Meshery/Meshery-integrations/Individual-Integrations/CatalogGrid.js
💤 Files with no reviewable changes (3)
  • src/sections/Home/So-Special-Section/index.js
  • src/components/SistentNavigation/intra-page.js
  • src/sections/Learn-Layer5/Course-Overview/index.js

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The changes remove debug logging from navigation, home, and course overview components. Fetch failure handlers in Meshery components now use console.error.

Changes

Logging cleanup

Layer / File(s) Summary
Remove debug output and classify fetch errors
src/components/SistentNavigation/intra-page.js, src/sections/Home/So-Special-Section/index.js, src/sections/Learn-Layer5/Course-Overview/index.js, src/sections/Meshery/Features-Col/index.js, src/sections/Meshery/Meshery-integrations/Individual-Integrations/CatalogGrid.js
Debug console.log statements are removed. Fetch failure handlers now call console.error.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to 99432

This change removes production debug output and preserves intentional error reporting, with no actionable merge-blocking risk remaining beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the removal of leftover production debug logging and matches the primary changes.
Linked Issues check ✅ Passed The changes satisfy issue #7993 by removing debug logs and changing intentional fetch-handler logs to console.error.
Out of Scope Changes check ✅ Passed All changes are limited to the logging cleanup described in issue #7993, with no unrelated code changes.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/sections/Meshery/Features-Col/index.js

Parsing error: The keyword 'import' is reserved

src/sections/Meshery/Meshery-integrations/Individual-Integrations/CatalogGrid.js

Parsing error: The keyword 'import' is reserved


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for PR #7995 removed.

This PR preview was automatically pruned because we keep only the 3 most recently updated previews on GitHub Pages to stay within deployment size limits.

If needed, push a new commit to this PR to generate a fresh preview.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Chore] Remove leftover debug console.log statements shipped to production

1 participant