chore: add constant for default browserLogs trace#6791
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
This PR introduces a constant DEFAULT_STACK_TRACE to centralize the default value ('summary') for browser log stack traces, improving code maintainability and reducing duplication.
Key changes:
- Added
DEFAULT_STACK_TRACEconstant inconstants.tswith value'summary' - Replaced hardcoded
'summary'string literals with the new constant in configuration and runtime code - Refactored defensive null-checking in
socketServer.tsto use explicit early return pattern
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
packages/core/src/constants.ts |
Defines the new DEFAULT_STACK_TRACE constant with value 'summary' |
packages/core/src/defaultConfig.ts |
Imports and uses DEFAULT_STACK_TRACE for the default browserLogs.stackTrace configuration |
packages/core/src/server/socketServer.ts |
Imports and uses DEFAULT_STACK_TRACE as fallback for browser log stack trace handling, with improved null-checking |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Summary
Introduced a new constant to centralize the default value for browser log stack traces.
Checklist