Skip to content

[code-infra] Split PR comment table into sections#1490

Open
JCQuintas wants to merge 1 commit into
masterfrom
feat/benchmark-comment-sections
Open

[code-infra] Split PR comment table into sections#1490
JCQuintas wants to merge 1 commit into
masterfrom
feat/benchmark-comment-sections

Conversation

@JCQuintas

Copy link
Copy Markdown
Member

Summary

Reworks the performance benchmark PR comment table into clearly separated sections instead of one flat list.

Sections (rendered in this order, each omitted when empty):

  • #### 🔺 Regressions — duration or render-count got worse
  • #### ▼ Improvements — duration or render-count got better
  • #### ➕ Added & removed — new tests (no baseline) and removed tests (~~name~~ (removed)), no diff columns
  • No-change / within-noise entries get no row — they collapse into the footer count + [details] link

Regressions take priority in the shared maxRows budget so a wall of new/improved tests can't bury a regression. The no-baseline path (single plain table, no diffs) is unchanged.

Test plan

  • pnpm test --run buildMarkdownReport compareBenchmarkReports — 32 passing
  • Added an inline-snapshot test pinning the exact comment markdown for a report exercising every mutation: duration regression, duration improvement, render-count regression, added, removed, within-noise, totals line, details link
  • pnpm typescript + pnpm eslint clean

🤖 Generated with Claude Code

Group the performance benchmark comment into Regressions, Improvements,
and Added & removed sections. Within-noise entries no longer get a row —
they collapse into the footer count and the details link only.

Add an inline-snapshot test pinning the exact comment markdown across
every mutation (duration regression/improvement, render-count change,
added, removed, within-noise).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@oliviertassinari oliviertassinari temporarily deployed to feat/benchmark-comment-sections - code-infra-dashboard PR #1490 May 18, 2026 12:05 — with Render Destroyed
@oliviertassinari oliviertassinari temporarily deployed to feat/benchmark-comment-sections - mui-tools-public PR #1490 May 18, 2026 12:05 — with Render Destroyed
@code-infra-dashboard

code-infra-dashboard Bot commented May 18, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-1490--mui-internal.netlify.app/

Bundle size

Total Size Change: 0B(0.00%) - Total Gzip Change: 0B(0.00%)
Files: 29 total (0 added, 0 removed, 0 changed)

Show details for 29 more bundles

@mui/internal-docs-infra/abstractCreateDemoparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/abstractCreateDemoClientparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/abstractCreateTypesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeControllerContextparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeExternalsContextparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeHighlighterparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeHighlighter/errorsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeHighlighter/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createDemoDataparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createDemoData/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createSitemapparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createSitemap/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCodeparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCodeWindowparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCopierparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useDemoparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useErrorsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useLocalStorageStateparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/usePreferenceparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useScrollAnchorparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useSearchparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useSearch/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useTypeparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useTypesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useUrlHashStateparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/withDocsInfraparsed: 0B(0.00%) gzip: 0B(0.00%)
createParseSourceWorkerClientparsed: 0B(0.00%) gzip: 0B(0.00%)
grammarsparsed: 0B(0.00%) gzip: 0B(0.00%)

Details of bundle changes

Performance

Total duration: 15.97 ms +0.17 ms(+1.0%) | Renders: 4 (+0) | Paint: 70.45 ms +0.76 ms(+1.1%)

No significant changes — details


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

@JCQuintas JCQuintas self-assigned this May 18, 2026
@JCQuintas JCQuintas added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). labels May 18, 2026
@JCQuintas JCQuintas marked this pull request as ready for review May 18, 2026 12:15
@JCQuintas JCQuintas changed the title feat(benchmark): split PR comment table into sections [code-infra] Split PR comment table into sections May 18, 2026
@zannager zannager requested a review from Janpot May 18, 2026 14:06
const renders = `${renderCount}${report.hasBase && entry.renderCount ? formatDiff(entry.renderCount, 'count') : ''}`;
lines.push(`| ${entry.name} | ${duration} | ${renders} |`);
}
renderSection('🔺 Regressions', visibleRegressions);

@oliviertassinari oliviertassinari May 29, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In #673 I was arguing about he potential to optimize the visual feedback, based on the importance of the change.

For having sections, I'm not sure to get the value of sections. The root value seems to be more about how rows are sorted and what information is easy to see first in each row, which seems to be an equivalent problem as with bundle size (#673).

In any case, I do see the ease of quickly scanning the results as equally important as having the data, since we need to see what's stand out to not introduce regressions. So +1 for exploring improvements.


I guess it could use the constant value instead of the emoji for consistency.

Suggested change
renderSection('🔺 Regressions', visibleRegressions);
renderSection(`${SEVERITY_PREFIX.error} Regressions`, visibleRegressions);

@Janpot

Janpot commented Jun 3, 2026

Copy link
Copy Markdown
Member

Should we align the way we render benchmarks and bundle size regressions?

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.

3 participants