[dashboard] Simplify PR comment rendering#1310
Merged
Conversation
Drop the per-section merge mechanism in upsertPrComment — the sole caller always regenerates every configured section in one go, so section markers, header/footer parsing, and the defaultSections option were dead weight. The caller now assembles the full body in a fixed order (deploy preview, bundle size, benchmark) and passes it as a string. Also combine the benchmark section's two redundant links (the overflow "View full report" and the trailing "Details of benchmark changes") into a single compact trailer line.
Deploy previewhttps://deploy-preview-1310--mui-internal.netlify.app/ Bundle size
PerformanceTotal duration: 20.34 ms 🔺+4.21 ms(+26.1%) | Renders: 4 (+0) | Paint: 89.82 ms 🔺+20.84 ms(+30.2%)
Check out the code infra dashboard for more information about this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
upsertPrComment. We always generate the full comment when a sync request comes in. This simplifies the mechanism drastically and makes it easier to set a predictable order for the sections.