fix: hide import traces by default for warnings#6785
Merged
chenjiahan merged 3 commits intomainfrom Dec 16, 2025
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces log noise by hiding import/module traces from warning messages by default while keeping them visible for errors and in verbose/debug mode.
Key Changes:
- Added a
levelparameter toformatStatsError()to distinguish between errors and warnings - Module traces are now only shown for errors or when verbose mode is enabled
- Updated warning call sites to pass 'warning' as the level parameter
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/core/src/helpers/format.ts | Added optional level parameter to formatStatsError() and conditional logic to hide module traces for warnings unless in verbose mode |
| packages/core/src/helpers/stats.ts | Updated warning formatting to pass 'warning' as the level parameter |
| packages/core/src/server/socketServer.ts | Updated socket server warning handler to pass 'warning' as the level parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Import traces are no longer shown by default for warnings to reduce log noise and improve readability.
Error messages remain unchanged and still include full import traces. Import traces for warnings can be enabled via debug mode.
Before
After
Checklist