Skip to content

[code-infra] Avoid creating error codes for development-only code - #3869

Merged
Janpot merged 5 commits into
mui:masterfrom
Janpot:error-codes
Jan 30, 2026
Merged

Janpot merged 5 commits into
mui:masterfrom
Janpot:error-codes

Conversation

@Janpot

@Janpot Janpot commented Jan 26, 2026 •

Copy link
Copy Markdown
Member

Applying mui/mui-public#1069

Working on flagging errors being thrown inside of NODE_ENV guarded blocks in the eslint plugin.

@pkg-pr-new

pkg-pr-new Bot commented Jan 26, 2026 •

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/react@3869
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@3869
    

commit: 413b88e

@mui-bot

mui-bot commented Jan 26, 2026 •

Copy link
Copy Markdown

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Jan 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 413b88e
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/697cb868a2762b0008de217c
😎 Deploy Preview https://deploy-preview-3869--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@Janpot Janpot added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Jan 26, 2026
@Janpot
Janpot marked this pull request as ready for review January 28, 2026 16:09
@greptile-apps

greptile-apps Bot commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This PR updates the error code infrastructure to avoid creating error codes for development-only code. The main change removes the /* minify-error-disabled */ comment from a development-only error message in useRenderElement.tsx, which was previously preventing error code minification. The error message format was also simplified from an array join to direct string concatenation.

Key changes:

  • Updated @mui/internal-code-infra from 0.0.3-canary.75 to 0.0.3-canary.78
  • Removed /* minify-error-disabled */ comment from development-only error
  • Changed error message from array with .join('\n') to direct string concatenation

Issues found:

  • Missing spaces in error message string concatenation will cause the error message to display without proper spacing between sentences

Confidence Score: 4/5

  • Safe to merge after fixing the string concatenation spacing issue
  • The changes are straightforward and align with the PR's objective. The dependency update is standard, and the removal of error code minification for dev-only code is correct. However, the string concatenation introduces a formatting bug that will affect error message readability
  • packages/react/src/utils/useRenderElement.tsx needs the spacing fix in the error message

Important Files Changed

Filename Overview
packages/react/src/utils/useRenderElement.tsx Removed /* minify-error-disabled */ comment and simplified error message string concatenation from array join to direct string concatenation
package.json Updated @mui/internal-code-infra dependency from version 0.0.3-canary.75 to 0.0.3-canary.78
pnpm-lock.yaml Lockfile update reflecting the dependency version bump and new transitive dependencies including babel-plugin-transform-import-meta

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Janpot and others added 2 commits January 28, 2026 18:04
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: Jan Potoms <[email protected]>
@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jan 29, 2026
@Janpot
Janpot requested a review from a team January 30, 2026 13:54
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jan 30, 2026
@Janpot
Janpot merged commit 3d8adbd into mui:master Jan 30, 2026
@oliviertassinari oliviertassinari added the type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. label Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants