Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

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

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings December 16, 2025 13:39
@netlify
Copy link

netlify bot commented Dec 16, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 653b1fe
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/694160fc1d4f8c00073eb6b6
😎 Deploy Preview https://deploy-preview-6791--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 69 (🟢 up 4 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_TRACE constant in constants.ts with value 'summary'
  • Replaced hardcoded 'summary' string literals with the new constant in configuration and runtime code
  • Refactored defensive null-checking in socketServer.ts to 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.

@chenjiahan chenjiahan merged commit 2a75fac into main Dec 16, 2025
18 checks passed
@chenjiahan chenjiahan deleted the stack_const_1216 branch December 16, 2025 13:47
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.

2 participants