Skip to content

fix: hide unmapped runtime frames by default in error overlay#6841

Merged
chenjiahan merged 1 commit intomainfrom
overlay_unmapped_1226
Dec 26, 2025
Merged

fix: hide unmapped runtime frames by default in error overlay#6841
chenjiahan merged 1 commit intomainfrom
overlay_unmapped_1226

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

When a stack frame cannot be resolved via source maps, it often points to raw bundle offsets, which are usually low-signal and not actionable for end users. Showing these frames by default can add unnecessary noise.

With this change, unmapped frames only show in verbose mode, this keeps the overlay clean by default.

Before

Screenshot 2025-12-25 at 22 40 30

After

Screenshot 2025-12-26 at 11 16 39

Checklist

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

Copilot AI review requested due to automatic review settings December 26, 2025 03:17
@netlify
Copy link
Copy Markdown

netlify bot commented Dec 26, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 944d0d3
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/694dfe385585b30008ee2b9e
😎 Deploy Preview https://deploy-preview-6841--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: 68 (🟢 up 1 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.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
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 improves the error overlay experience by hiding unmapped runtime frames by default, only showing them in verbose mode. This reduces noise in stack traces where frames cannot be resolved via source maps and typically point to raw bundle offsets that are not actionable for developers.

Key Changes

  • Modified stack trace formatting to track whether a frame was successfully parsed via source maps
  • Unmapped frames are now conditionally displayed based on verbose logging mode
  • Updated test expectations to reflect the cleaner default output

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/core/src/server/browserLogs.ts Adds parsed flag to track source map resolution success; wraps unmapped frame display in isVerbose() check to hide low-signal frames by default
e2e/cases/browser-logs/stack-trace-full/index.test.ts Updates expected output to exclude unmapped frame locations (e.g., http://localhost URLs) while preserving method names
Comments suppressed due to low confidence (1)

e2e/cases/browser-logs/stack-trace-full/index.test.ts:12

  • The new behavior hides unmapped frames by default, but the test suite doesn't verify that these frames ARE shown when verbose mode is enabled. Consider adding a test case that enables verbose logging and verifies unmapped frames appear in the output.
rspackTest('should display formatted full stack trace', async ({ dev }) => {
  const rsbuild = await dev();
  await rsbuild.expectLog(EXPECTED_LOG, { posix: true });
});

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chenjiahan chenjiahan merged commit 052a014 into main Dec 26, 2025
18 checks passed
@chenjiahan chenjiahan deleted the overlay_unmapped_1226 branch December 26, 2025 05:47
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.

2 participants